红联Linux门户
Linux帮助

Amazon EC2 Linux实例定制内核

发布时间:2014-11-03 09:47:29来源:linux网站作者:warrenwyf

# 启动EC2 AMI实例

# 获取内核源码
get_reference_source -p kernel
sudo rpm -Uvh /usr/src/srpm/debug/kernel-3.2.21-1.32.6.amzn1.src.rpm

# 安装依赖包
sudo yum install -y gcc gcc44 system-rpm-config m4 rpm-build gdb xmlto asciidoc elfutils-devel zlib-devel binutils-devel python-devel perl gettext newt-devel perl-ExtUtils-Embed

cd /usr/src/rpm/SOURCES/
# 修改内核配置
sudo vi config-generic
# 修改版本号
sudo vi kernel.spec

# 编译并安装内核
sudo rpmbuild -bb kernel.spec
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/kernel-3.2.21-1.32.7.amzn1.x86_64.rpm