Автор Тема: Компиляция ядра  (Прочитано 5024 раз)

xxnikolayxx

  • Newbie
  • *
  • Сообщений: 1
    • Просмотр профиля
    • Команда разработки
Компиляция ядра
« : Мая 13, 2013, 06:40:26 am »
Привет форумчане.
Вдруг я решил перейти на CentOS с FreeBSD и тут же посыпались проблеммы.
# cat /etc/redhat-release
CentOS release 6.4 (Final)
Начал пересобирать ядро и тут:
# make rpm
make clean
set -e; cd -P ..; ln -sf /usr/src/kernel_src/linux-3.9.2 kernel-3.9.2asterisk_kernel
/bin/sh /usr/src/kernel_src/linux-3.9.2/scripts/setlocalversion --save-scmversion
set -e; cd -P ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-3.9.2asterisk_kernel.tar.gz kernel-3.9.2asterisk_kernel/.
set -e; cd -P ..; rm kernel-3.9.2asterisk_kernel
rm -f /usr/src/kernel_src/linux-3.9.2/.scmversion
set -e; \
/bin/sh /usr/src/kernel_src/linux-3.9.2/scripts/mkversion > /usr/src/kernel_src/linux-3.9.2/.tmp_version
set -e; \
mv -f /usr/src/kernel_src/linux-3.9.2/.tmp_version /usr/src/kernel_src/linux-3.9.2/.version
rpm  --target x86_64 -ta ../kernel-3.9.2asterisk_kernel.tar.gz
--target: неизвестный параметр
make[1]: *** [rpm] Ошибка 1
make: *** [rpm] Ошибка 2
Подскажите, кто-нибудь встречался с чем-то подобным?
В интернете ничего не нашел на эту тему...

gofgof

  • Newbie
  • *
  • Сообщений: 3
    • Просмотр профиля
    • игры на двоих
Re: Компиляция ядра
« Ответ #1 : Июля 27, 2013, 10:06:41 pm »
If you are running a centos server for example then you might need to check the version number and kernel version. This is important to know if you are running the latest version or not and what updates are available for your version.


 
This is an absolutely basic task for a sys admin to find out the version of the linux distro installed on a system or server.

To find your centos version use any or all of the following commands

# cat /etc/redhat-release
CentOS release 6.4 (Final)
Another command

# cat /etc/centos-release
CentOS release 6.4 (Final)
Or output all of the files suffixed with '-release'.

# cat /etc/*-release
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
Another file that contains the centos version information is /etc/issue and /etc/issue.net

# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
# cat /etc/issue.net
CentOS release 6.4 (Final)
Kernel \r on an \m
Or output both of them together

# cat /etc/issue*
CentOS release 6.4 (Final)
Kernel \r on an \m

CentOS release 6.4 (Final)
Kernel \r on an \m
The rpm command can also be used to query for the centos version information.

# rpm -q centos-release
centos-release-6-4.el6.centos.10.x86_64
Check the kernel version

Along with the centos version information it is also useful to know what version of the kernel is running. Keeping the kernel uptodate is necessary to get bug fixes and security fixes.

The kernel version can be easily checked with the uname command

# uname -r
2.6.32-358.11.1.el6.x86_64
The kernel version in the above output is 2.6.32
The architecture is 64bit.

To display only the machine architecture information with uname use the '-m' option.

# uname -m
x86_64
The architecture information can also be checked using the arch command

# arch
x86_64
For more information check the /proc/version content.

# cat /proc/version
Linux version 2.6.32-358.11.1.el6.x86_64 (mockbuild@c6b7.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Wed Jun 12 03:34:52 UTC 2013
Those were a bunch of commands to check the version of your centos linux.

Lsb_release

The lsb_release command is not available on centos by default. It can be installed by installing the redhat lsb packages from the base repository.


 
# yum install redhat-lsb
Or

# yum install redhat-lsb-core
Now you can use the lsb_release command to check the version information of your centOS system

# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.4 (Final)
Release:        6.4
Codename:       Final


Если не понятно я писал читай здесь
binarytides.com/command-check-centos-version/