Style:Mac
Series:Java
Since:2018-09-10
End:2018-09-10
Total Hours:1
Degree Of Diffculty:5
Degree Of Mastery:5
Practical Level:5
Desired Goal:5
Archieve Goal:3
Gerneral Evaluation:3
Writer:kingdelee
Related Links:
http://www.cnblogs.com/kingdelee/
https://blog.csdn.net/kikajack/article/details/79396793
1.查看内核
[root@localhost var]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7" [root@localhost var]#
[root@localhost var]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost var]# uname -r
3.10.0-327.3.1.el7.x86_64
[root@localhost var]# uname -a
Linux localhost.localdomain 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost var]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost var]#
[root@localhost var]# cat /proc/version
Linux version 3.10.0-327.3.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed Dec 9 14:09:15 UTC 2015
[root@localhost var]#
2.
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum --enablerepo=elrepo-kernel install kernel-ml
yum repolist all
[root@localhost var]# sudo awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-327.3.1.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
3 : CentOS Linux (0-rescue-79847a30a0af40bc89e14a28ff29af6f) 7 (Core)
sudo grub2-set-default 0
vi /etc/default/grub
GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=0 GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet" GRUB_DISABLE_RECOVERY="true"
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot
kingdelee@kingdeleedeiMac ~/lee/vagrant_centos7.2 vagrant ssh
Last login: Sun Oct 28 07:11:27 2018 from 10.0.2.2
[vagrant@localhost ~]$ uname -r
4.19.0-1.el7.elrepo.x86_64
[vagrant@localhost ~]$
yum install yum-utils
package-cleanup --oldkernels
[root@localhost vagrant]# rpm -qa | grep kernel
kernel-devel-3.10.0-327.el7.x86_64
kernel-headers-3.10.0-327.3.1.el7.x86_64
kernel-tools-3.10.0-327.3.1.el7.x86_64
kernel-3.10.0-327.3.1.el7.x86_64
kernel-devel-3.10.0-327.3.1.el7.x86_64
kernel-ml-4.19.0-1.el7.elrepo.x86_64
kernel-tools-libs-3.10.0-327.3.1.el7.x86_64
kernel-3.10.0-327.el7.x86_64
[root@localhost vagrant]#
yum remove kernel-devel-3.10.0-327.el7.x86_64 kernel-headers-3.10.0-327.3.1.el7.x86_64 kernel-tools-3.10.0-327.3.1.el7.x86_64 kernel-3.10.0-327.3.1.el7.x86_64 kernel-devel-3.10.0-327.3.1.el7.x86_64 kernel-tools-libs-3.10.0-327.3.1.el7.x86_64 kernel-3.10.0-327.el7.x86_64
[root@localhost vagrant]# rpm -qa | grep kernel
kernel-ml-4.19.0-1.el7.elrepo.x86_64
[root@localhost var]# cat /proc/versionLinux version 3.10.0-327.3.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed Dec 9 14:09:15 UTC 2015[root@localhost var]#
升级到Centos7.5版本----------------------------
yum clean all -y
yum update -y