升级系统内核

参考文章:
https://computingforgeeks.com/install-linux-kernel-5-on-centos-7/
https://www.cnblogs.com/xzkzzz/p/9627658.html

操作

yum -y install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available | grep kernel-ml
yum --enablerepo=elrepo-kernel install kernel-ml -y
yum -y --enablerepo=elrepo-kernel install kernel-ml-{devel,headers,perf}




reboot
uname -r
vim /etc/default/grub

GRUB_TIMEOUT=1
GRUB_DEFAULT=0 
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto"
GRUB_DISABLE_RECOVERY="true"
grub2-mkconfig -o /boot/grub2/grub.cfg

批量升级

升级系统内核提高ceph可靠性:
ansible k8s-master -m copy -a "src=kernel-ml-4.18.9.tar.gz dest=/root/" -b
ansible k8s-master -m shell -a 'tar -zxf /root/kernel-ml-4.18.9.tar.gz' -b
ansible k8s-master -m shell -a 'yum -y  localinstall /root/kernel-ml-4.18.9/*' -b
ansible k8s-master -m shell -a 'grub2-set-default 0' -b
ansible k8s-master -m shell -a 'grub2-mkconfig -o /boot/grub2/grub.cfg ' -b
ansible k8s-master -m shell -a 'reboot now ' -b
ansible k8s-master -m shell -a 'uname -r' -b

你可能感兴趣的:(升级系统内核)