yum install -y kernel-devel gcc gcc-c++ bc openssl openssh
wget -c https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.18.27.tar.xz
tar xvf linux-3.18.27.tar.xz
cd linux-3.18.27
cp /boot/config-3.10.0-327.10.1.el7.x86_64 .config
sh -c 'yes "" | make oldconfig'
make -j4 bzImage ###這裏的4指的是4個cpu
make -j4 modules
make -j4 modules_install
make install
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
grub2-set-default 0
若是失敗,從新開始的話,要清理上次編譯的現場
make mrproper
參考連接http://169it.com/article/13000254559019234940.htmlhtml