自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

四步輕松升級CentOS內(nèi)核

系統(tǒng) Linux
在RHEL 6.0發(fā)布整整8個月之后,CentOS 6.0終于發(fā)布了。作者因要測試一些軟件,需要2.6.30以上的內(nèi)核,安裝好CentOS 5.5,內(nèi)核是2.6.18-194.el5。因此作者進行了CentOS內(nèi)核升級。

 因要測試一些軟件,需要2.6.30以上的內(nèi)核,安裝好CentOS 5.5,內(nèi)核是2.6.18-194.el5.這次的升級還算比較順利,具體的過程如下:

[root@localhost ~]# uname -r
2.6.18-194.el5

1.下載linux-2.6.30內(nèi)核包到/usr/src目錄

cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.gz
tar -xzvf linux-2.6.30.tar.bz2 -C /usr/src
cd linux-2.6.30
make mrproper 清除環(huán)境變量,即清除配置文件
make menuconfig 在菜單模式下選擇需要編譯的內(nèi)核模塊:

networking support—>networking options—>network packet filtering framework(netfilter)

(1).core netfilter configuration

A 勾中”Netfilter connection tracking support” -m state相關(guān)模塊是依賴它的,不選則沒有。

B 將netbios name service protocal support(new) 編譯成模塊,不然后面升級iptables后啟動時會出錯

C 勾中“Netfilter Xtables support (required for ip_tables)”

(2).IP: Netfilter Configuration

A 將 “IPv4 connection tracking support (require for NAT)” 編譯成模塊。

B 勾中IP tables support (required for filtering/masq/NAT) 。

C 將 “Full NAT” 下的 “MASQUERADE target support” 和 “REDIRECT target support” 編譯成模塊

(3).其它模塊可以根據(jù)自己的需要進行選擇,若不懂可以參考內(nèi)核配置手冊.

make clean 確保所有東西均保持***狀態(tài).

make bzImage 生成內(nèi)核文件

make modules 編譯模塊

make modules_install 安裝模塊

make install 安裝

mkinitrd /boot/initrd_2.6.30.img 2.6.30 根據(jù)內(nèi)核版本和指定參數(shù)生成映像文件

cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.30

cp /usr/src/linux-2.6.30/System.map /boot/System.map-2.6.30

2.在/etc/grub.conf添加如下2.6.30的信息,并把default=1改為default=0

[root@localhost ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-194.el5.img
title CentOS (2.6.30)
root (hd0,0)
kernel /vmlinuz-2.6.30 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.30.img

3.此步若沒有操作,重啟會報錯”insmod: error inserting ‘/lib/dm-region-hash.ko’: –1 File exits”,原因是重復(fù)了,根據(jù)網(wǎng)上查到的資料,2.6.x自編譯內(nèi)核會有這個小bug,我測試過不修改直接重啟,雖然有報錯,但仍然可以進入系統(tǒng)的.

[root@localhost]cp /boot/initrd-2.6.30.img /tmp
[root@localhost]cd /tmp/
[root@localhost tmp]mkdir newinitrd
[root@localhost tmp]cd newinitrd/
[root@localhost newinitrd]zcat ../initrd-2.6.30.img |cpio -i
[root@localhost newinitrd]vi init 刪掉重復(fù)的如下兩行:
echo “Loading dm-region-hash.ko module”
insmod /lib/dm-region-hash.ko
[root@localhost newinitrd]# find .|cpio -c -o > ../initrd
14765 blocks
[root@localhost newinitrd]# cd ..
[root@localhost tmp]# gzip -9 < initrd > initrd-2.6.30.img
[root@localhost tmp]# ls
gconfd-root initrd initrd-2.6.30.img mapping-root newinitrd scim-panel-socket:0-root
[root@localhost tmp]# mv /boot/initrd-2.6.30.img /home/
[root@localhost tmp]# cp initrd-2.6.30.img /boot/
[root@localhost tmp]#reboot

4.重啟成功后,再看看內(nèi)核,是2.6.30,ok了。

[root@localhost ~]# uname -r
2.6.30

原文:http://blog.haohtml.com/archives/10347

【編輯推薦】

  1. CentOS 6.0 正式發(fā)布(附下載地址)
  2. 手把手教你在CentOS 5.6下安裝Xen虛擬機
  3. 利用CentOS快速構(gòu)建自己的發(fā)行版
責(zé)任編輯:黃丹 來源: haohtml's blog
相關(guān)推薦

2011-07-28 10:56:55

CentOS 5.6CentOS 6.0升級

2010-06-12 13:49:16

學(xué)習(xí)UML

2010-06-02 17:29:02

svnserve服務(wù)

2010-04-20 10:12:05

2010-05-28 09:47:43

SVN項目創(chuàng)建

2010-06-02 18:22:43

SVN本地設(shè)置

2010-03-17 18:14:45

Java多線程程序

2009-09-10 16:24:23

思科IOS配置思科IOS

2013-03-07 10:25:53

在線追蹤隱私保護

2009-10-12 13:41:00

RHEL 內(nèi)核

2018-01-02 09:26:28

Ubuntuzzupdate版本升級

2010-06-28 17:38:59

Visio畫UML類圖

2021-07-26 09:35:26

SQL數(shù)據(jù)庫優(yōu)化

2015-03-11 09:55:15

運維管理

2010-04-28 12:02:37

Forefront網(wǎng)絡(luò)優(yōu)化

2021-11-23 23:43:16

MySQL數(shù)據(jù)庫Docker

2010-06-13 14:19:40

學(xué)習(xí)UML

2010-09-06 11:58:39

ppp撥號Linux

2010-09-14 17:35:52

2017-04-17 12:31:45

SDN網(wǎng)絡(luò)虛擬化
點贊
收藏

51CTO技術(shù)棧公眾號