背景:python
特殊需求,須要使用kernel 4.x版本,在雲上ECS如何更換呢?
慫一下先:
請對生產環境,保持敬畏之心,務必作好快照備份!
請對生產環境,保持敬畏之心,務必作好快照備份!
請對生產環境,保持敬畏之心,務必作好快照備份!linux
1,看下內核先sql
# uname -r 3.10.0-514.26.2.el7.x86_64
2,升級內核須要先導入elrepo的key,而後安裝elrepo的yum源:curl
# rpm -import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm Retrieving http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm Retrieving http://elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:elrepo-release-7.0-3.el7.elrepo ################################# [100%]
3,看下源上的內核版本url
# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available Loaded plugins: fastestmirror elrepo-kernel | 2.9 kB 00:00:00 elrepo-kernel/primary_db FAILED ] 4.1 kB/s | 83 kB 00:06:58 ETA http://elrepo.org/linux/kernel/el7/x86_64/repodata/b970175c81e43b64f8ed487034e08db0f81ba50f2ba1a770606d4a85f7c3c1ab-primary.sqlite.bz2: [Errno 14] curl#18 - "transfer closed with 1740046 bytes remaining to read" Trying other mirror. elrepo-kernel/primary_db FAILED http://mirrors.coreix.net/elrepo/kernel/el7/x86_64/repodata/b970175c81e43b64f8ed487034e08db0f81ba50f2ba1a770606d4a85f7c3c1ab-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.coreix.net; Unknown error" Trying other mirror. elrepo-kernel/primary_db | 1.7 MB 00:00:02 Determining fastest mirrors * elrepo-kernel: mirrors.tuna.tsinghua.edu.cn Available Packages kernel-lt.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-devel.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-doc.noarch 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-headers.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-tools.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-tools-libs.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-lt-tools-libs-devel.x86_64 4.4.131-1.el7.elrepo elrepo-kernel kernel-ml.x86_64 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-devel.x86_64 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-doc.noarch 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-headers.x86_64 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-tools.x86_64 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-tools-libs.x86_64 4.16.8-1.el7.elrepo elrepo-kernel kernel-ml-tools-libs-devel.x86_64 4.16.8-1.el7.elrepo elrepo-kernel perf.x86_64 4.16.8-1.el7.elrepo elrepo-kernel python-perf.x86_64 4.16.8-1.el7.elrepo elrepo-kernel
4,安裝內核.net