linux 内核升级 nat,CentOS 6.4系统内核升级

CentOS 6.4系统内核升级

1.查看现有系统的内核版本

[root@localhost ~]# uname -a

Linux localhost.localdomain 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux

[root@localhost ~]#

2.下载交解压新内核文件

[root@localhost home]# tar xvf linux-2.6.38.7.tar.gz

[root@localhost home]# cd linux-2.6.38.7

[root@localhost linux-2.6.38.7]#

3.升级内核的具体步骤

[root@localhost linux-2.6.38.7]# make mrproper  --清除环境变量,即清除配置文件

[root@localhost linux-2.6.38.7]# make menuconfig  --在菜单模式下选择需要编译的内核模块

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

(1).core netfilter configuration

A 勾中”Netfilter connection tracking support”  -m state相关模块是依赖它的,不选则没有。

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” 编译成模块

[root@localhost linux-2.6.38.7]# make clean    --确保所有东西均保持最新状态.

[root@localhost linux-2.6.38.7]# make bzImage  --生成内核文件

[root@localhost linux-2.6.38.7]# make modules  --编译模块

[root@localhost linux-2.6.38.7]# make modules_install  --安装模块

[root@localhost linux-2.6.38.7]# make install      --安装

[root@localhost linux-2.6.38.7]# vim /etc/grub.conf

default=0            --将这一行改为0(选择启动时加载哪个内核)

[root@localhost linux-2.6.38.7]# reboot    --重启系统

4. 验证内核是否成功

(1)系统启动时可以看到内核

8e39dc199b57aaf51b0839fe797769c4.png

(2)在系统中查看内核

7d8c9bd351bdeb6d67b7c475be56b3d2.png

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值