Current Environment: 12 [root @ localhost ~] # Uname-r
Current environment:
| 12 |
[Root @ localhost ~] # Uname-r 2.6.18-348. el5 |
Configuration process:
1. prepare the yum library to install g ++ gcc
| |
[Root @ localhost ~] # Cat/etc/yum. repos. d/rh_5.9.repo [rhel-server] name = Red serverbaseurl = file: // misc/cd/Serverenabled = 1 gpgcheck = 0 gpgkey = file: /// etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [root @ localhost ~] # Yum-y install gcc g ++ |
2nd release installation xz-5.0.5.tar.gz
| |
[Root @ localhost ~] # Tar-zxf xz-5.0.5.tar.gz/usr/[root @ localhost ~] # Cd/usr/[root @ localhost ~] # Cd/usr/xz-5.0.5/[root @ localhost xz-5.0.5] #. /configure -- prefix =/usr/local/[root @ localhost xz-5.0.5] # make [root @ localhost xz-5.0.5] # make install |
2、verify whether xz-5.0.5.tar.gz is successfully installed
| |
[Root @ localhost xz-5.0.5] # which xzcat/usr/local/bin/xzcat |
32.16install linux-2.6.32.61.tar. xz
| |
[Root @ localhost usr] # cd/root/[root @ localhost ~] # Unxz linux-2.6.32.61.tar.xz [root @ localhost ~] # Tar-xf linux-2.6.32.61.tar-C/usr/4, copy/boot/config-2.6.18-348.el5. config to the position just extracted named "config" to speed up and reduce errors. |
| |
[Root @ localhost ~] # Cd/usr/[root @ localhost usr] # cp/boot/config-2.6.18-348.el5. config |
5. configuration
| |
[Root @ localhost usr] # cd linux-2.6.32.61/[root @ localhost linux-2.6.32.61] # make menuconfig *** Unable to find the ncurses libraries or the *** required header files. * ** 'make menuconfig' requires the ncurses libraries. * ***** Install ncurses (ncurses-devel) and try again. * ** make [1]: *** [scripts/kconfig/dochecklxdialog] Error 1 make: * [menuconfig] error 2 [root @ localhost linux-2.6.32.61] # yum-y install ncurses-devel // the on-site error occurs, install this package to [root @ localhost linux-2.6.32.61] # make menuconfig |
Expand File systems ---> DOS/FAT/NT Filesystems ---> NTFS file system support, set to [M]
Expand Device Drivers ---> IEEE 1394 (FireWire) supports ---> FireWire driver stack, set to []
(Exit and press Enter. repeat multiple times. finally, select yes to confirm and save it to the. config configuration file.) // edit the module and add or delete the module according to your custom settings.
Edit ". config" and add
| |
CONFIG_DEBUG_SECTION_MISMATCH = y // view more detailed output CONFIG_SYSFS_DEPRECATED_V2 = y // enable the new version of sysfs path |
It takes about 40 minutes to compile the kernel.
| |
[Root @ localhost linux-2.6.32.61] # make // compile the kernel [root @ localhost linux-2.6.32.61] # make modules // compile the module [root @ localhost linux-2.6.32.61] # make modules_install // install the kernel make modules_install write make modules install [root @ localhost lmake install |
16. enable the new kernel and modify the default boot item
[Root @ localhost lvim/etc/grub. conf
Adjust the default item in the configuration file, from 1 to 0, and then restart.
| |
[Root @ localhost ~] # Uname-r2.6.32.61 |
Note: If the kernel version is too different, it may fail.