国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè)

這篇具有很好參考價(jià)值的文章主要介紹了Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

一、背景

某業(yè)務(wù)系統(tǒng)因建設(shè)較早,使用的OS比較過(guò)時(shí),還是centos6.5的系統(tǒng),因國(guó)產(chǎn)化需要,需將該系統(tǒng)升級(jí)到BClinux 8.6,但官方顯示不支持centos 6.x升級(jí)到8,需先將centos6.5升級(jí)到centos7的最新版,即centos7.9后再升級(jí)。后結(jié)合相關(guān)實(shí)踐,Centos6.5只支持升級(jí)到最高Centos7.2版本(1511版本),之后再升級(jí)到7.9;因升級(jí)跨大版本升級(jí),且Redhat官網(wǎng) 6.5YUM源已過(guò)期不可用,綜上,特整理記錄該升級(jí)過(guò)程,以作后期參考指導(dǎo),不妥之處,感謝批評(píng)指正。注意:升級(jí)到 RHEL 8 分為兩個(gè)階段。首先需要將系統(tǒng)從 RHEL 6 升級(jí)到 RHEL 7,然后再升級(jí)到 RHEL 8。升級(jí)前對(duì)重要數(shù)據(jù)備份,或?qū)μ摂M機(jī)做好快照,甚至整機(jī)備份。

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè),linux_FAQ,python,跨大版本升級(jí),centos6.5,libsasl.so.0,centos7.9
RHEL 6 原位升級(jí)到 RHEL 8 需要以下主要步驟:

1、為 RHEL 6 系統(tǒng)進(jìn)行準(zhǔn)備,將 RHEL 6 系統(tǒng)更新到 RHEL 6.10 的最新版本。
2、對(duì) RHEL 6 系統(tǒng)進(jìn)行升級(jí)前評(píng)估,并解決報(bào)告的問(wèn)題。
3、執(zhí)行到 RHEL 7.9 的原位升級(jí)。
4、準(zhǔn)備 RHEL 7 系統(tǒng)以升級(jí)到 RHEL 8,并將 RHEL 7 系統(tǒng)更新至 RHEL 7.9 的最新版本。
5、對(duì) RHEL 7 系統(tǒng)進(jìn)行升級(jí)前評(píng)估,并解決在這個(gè)階段中發(fā)現(xiàn)的問(wèn)題。
6、執(zhí)行到 RHEL 8 的原位升級(jí)。
7、檢查升級(jí)的系統(tǒng)狀態(tài)。

?
? 資源鏈接:從 RHEL 6 升級(jí)至 RHEL 8、wiki、Release Notes、kernel鏡像站、RHEL 6 系統(tǒng)升級(jí)前準(zhǔn)備

二、6.5升級(jí)7.2前準(zhǔn)備

?
1)升級(jí)前版本確認(rèn):cat /etc/redhat-release

升級(jí)步驟: Centos6.X —>Centos7.2 ----> Centos7.9

注意:7.2是支持升級(jí)的最高版本,升級(jí)其余版本將會(huì)出現(xiàn)Downloading failed: invalid data in .treeinfo: No section:'checksums’的錯(cuò)誤提示;

解決單獨(dú)分區(qū)掛載的/usr目錄問(wèn)題

mkdir /mnt/usr/
mkdir /mnt/root
mount --bind / /mnt/root
mount --bind /usr /mnt/usr
rsync -aHAXv /mnt/usr/* /mnt/root/usr/

刪除/etc/fstab相關(guān)開(kāi)機(jī)自動(dòng)掛載配置項(xiàng)后,reboot重啟

2)更換YUM源:

由于 CentOS 6 已停產(chǎn),我們需要將 yum 指向 vault 倉(cāng)庫(kù),執(zhí)行以下命令:

#備份原有的
cd /etc/yum.repos.d/
mkdir repo6_backup
mv *.repo ./repo6_backup
#下載vault 倉(cāng)庫(kù)的repo
curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo
或
wget  https://www.getpagespeed.com/files/centos6-eol.repo -O /etc/yum.repos.d/CentOS-Base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
#因官方源不可用,故需修改配置更新源到其他鏡像站
vi /etc/yum.repos.d/upgrade.repo  //如下所示
[upgrade]
name=upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enable=1
gpgcheck=0

#安裝升級(jí)助手
yum erase openscap -y   #由于centos 6.5自帶的安全助手版本較高,卸載了裝個(gè)更老的,更多參見(jiàn)http://www.open-scap.org/,Security Content Automation Protocol(SCAP)
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
yum install redhat-upgrade-tool preupgrade-assistant-contents -y  #或者嘗試以下鏈接
yum install ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.5/x86_64/updates/fastbugs/openscap-1.0.8-1.el6_5.x86_64.rpm  -y   
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y

#如果提示:No package redhat-upgrade-tool available,執(zhí)行
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.0.5.el6.centos.noarch.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm -y

3)升級(jí)助力檢測(cè)升級(jí)環(huán)境確認(rèn)正常后update

#升級(jí)前檢測(cè),該過(guò)程會(huì)看到哪些包將受到此升級(jí)的影響
preupg -l    //該命令會(huì)耗費(fèi)幾分鐘到幾十分鐘時(shí)間
preupg -s CentOS6_7  //運(yùn)行模擬升級(jí)工具,不過(guò)真的升級(jí),相當(dāng)于升級(jí)檢測(cè),升級(jí)檢測(cè)通過(guò)后,在線下載centos7鏡像,或本地上傳后使用本地鏡像也可以
Preupg tool doesn’t do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade
that would require a full re-install of the system from installation media.
Do you want to continue? y/n
y #此處輸入y
Gathering logs used by preupgrade assistant:
All installed packages : 01/11 …finished (time 00:00s)
All changed files : 02/11 …finished (time 02:44s)
Changed config files : 03/11 …finished (time 00:00s)
All users : 04/11 …finished (time 00:00s)
All groups : 05/11 …finished (time 00:00s)
Service statuses : 06/11 …finished (time 00:00s)
All installed files : 07/11 …finished (time 00:02s)
…
Tarball with results is stored here /root/preupgrade-results/preupg_results-210324171443.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some critical issues. In-place upgrade is not advised.
Read the file /root/preupgrade/result.html for more details.
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .

#根據(jù)模擬升級(jí)的檢測(cè)結(jié)果進(jìn)行確認(rèn)和評(píng)估,存在EXTREME錯(cuò)誤則無(wú)法進(jìn)行下一步升級(jí)操作
preupg --riskcheck --verbose

#導(dǎo)入RPM簽名證書(shū),下面任選其一
rpm --import https://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-7
rpm --import http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
rpm --import http://vault.centos.org/centos/7.0.1406/os/x86_64/RPM-GPG-KEY-CentOS-7
#在線update,一般不滿足條件,任選其一執(zhí)行,建議使用清華大學(xué)的源:
centos-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64
centos-upgrade-tool-cli --network 7 --instrepo=https://mirrors.ustc.edu.cn/centos/7/os/x86_64  #或
centos-upgrade-tool-cli --network 7 --force --instrepo=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.2.1511/os/x86_64/
centos-upgrade-tool-cli --network 7 --instrepo=http://vault.centos.org/centos/7.0.1406/os/x86_64/
…
Continue with the upgrade [Y/N]? y
…
rpm install 100% [============================================================================================]
setting up system for upgrade
Finished. Reboot to start upgrade.

#離線update
wget --no-check-certificate https://archive.kernel.org/centos-vault/7.2.1511/isos/x86_64/CentOS-7-x86_64-Everything-1511.iso  #可以用CentOS-7-x86_64-DVD-1511.iso ,只有4G
wget --no-check-certificate https://vault.centos.org/7.2.1511/isos/x86_64/CentOS-7-x86_64-Everything-1511.iso(7.2G)
md5sum     //CentOS-7-x86_64-Everything-1511.iso
dba29c59117400b111633be2bf2aaf0e  CentOS-7-x86_64-Everything-1511.iso
mout -o -loop -t iso9660 /home/CentOS-7-x86_64-Everything-1511.iso /mnt/cdrom
centos-upgrade-tool-cli --iso=/home/CentOS-7-x86_64-Everything-1511.iso  #或
centos-upgrade-tool-cli --device=/dev/cdrom   //輸出類(lèi)似如下:
……
setting up repos...
.treeinfo                                                                                                | 1.1 kB     00:00
getting boot p_w_picpaths...
vmlinuz-redhat-upgrade-tool                                                                              | 4.7 MB     01:38
initramfs-redhat-upgrade-tool.img                                                                        |  32 MB     14:45
setting up update...
finding updates 100% [=====================================================================================================]
(1/272): acl-2.2.51-12.el7.x86_64.rpm                                                                    |  81 kB     00:00
(2/272): attr-2.4.46-12.el7.x86_64.rpm                                                                   |  66 kB     00:00
(3/272): audit-2.3.3-4.el7.x86_64.rpm                                                                    | 223 kB     00:01
(4/272): audit-libs-2.3.3-4.el7.x86_64.rpm                                                               |  77 kB     00:00
(5/272): authconfig-6.2.8-8.el7.x86_64.rpm                                                               | 399 kB     00:08
(6/272): basesystem-10.0-7.el7.centos.noarch.rpm                                                         | 5.0 kB     00:00
(7/272): bash-4.2.45-5.el7.x86_64.rpm                                                                    | 1.0 MB     00:17
(270/272): yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm                                             |  28 kB     00:03
(271/272): zlib-1.2.7-13.el7.x86_64.rpm                                                                  |  89 kB     00:06
(272/272): zlib-devel-1.2.7-13.el7.x86_64.rpm                                                            |  49 kB     00:01

setting up system for upgrade
Finished. Reboot to start upgrade.

#或者直接執(zhí)行:
cd /etc/yum.repos.d
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget https://mirrors.aliyun.com/repo/epel-7.repo
或
mount -t iso9660 -o loop CentOS-7-x86_64-DVD-1511.iso /mnt/iso #或者
mount -t auto /dev/cdrom /mnt/iso/
vi /etc/yum.repos.d/centos7.repo  //如下

[centos7]
name=CentOS 7
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0

yum clean all
yum makecache
yum update  #升級(jí)所有包同時(shí)也升級(jí)軟件和系統(tǒng)內(nèi)核

#更新lib庫(kù)
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2
ln -s /usr/lib64/libpcre.so.1.2.0 /usr/lib64/libpcre.so.0

#升級(jí)完成后重啟。重啟后,將使用 redhat-upgrade-tool 內(nèi)核啟動(dòng)完成CentOS 6升級(jí)
reboot   //若是提示The requested URL returned error: 404 Not Found等錯(cuò)誤,基本上說(shuō)明當(dāng)前系統(tǒng)不支持直接升級(jí),恢復(fù)后重裝替換吧

#驗(yàn)證
cat /etc/centos-release

#更新軟件版本
yum upgrade

rpm -qa | grep el6  #查看系統(tǒng)上殘留的軟件包,盡量清理掉

:當(dāng)preupg命令在沒(méi)有其他選項(xiàng)的情況下運(yùn)行時(shí),它會(huì)在目錄中生成result.html和preupg_results-*.tar.gz文件/root/preupgrade/;評(píng)估結(jié)果保存在/root/preupgrade-results/preupg_results-190130083547.tar.gz,進(jìn)行系統(tǒng)升級(jí)前評(píng)估,用圖形界面打開(kāi)查看評(píng)估報(bào)告,解決對(duì)應(yīng)問(wèn)題。另,/var/log/upgrade.log文件列出了升級(jí)階段發(fā)現(xiàn)的問(wèn)題。利用yum check dependencies命令檢查依賴(lài)錯(cuò)誤;

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè),linux_FAQ,python,跨大版本升級(jí),centos6.5,libsasl.so.0,centos7.9

4)重啟后配置調(diào)整共享庫(kù):相關(guān)經(jīng)驗(yàn)表明升級(jí)后會(huì)出現(xiàn)共享庫(kù)導(dǎo)致ssh,命令執(zhí)行登異常問(wèn)題

三、7.2升級(jí)到7.9過(guò)程

#yum配置參考上文,這里如果想先升級(jí)到6.10,配置本地6.10的YUM
wget https://vault.centos.org/6.10/isos/x86_64/CentOS-6.10-x86_64-LiveDVD.iso
mount /dev/sr0 /mnt/
cat /etc/yum.repos.d/dev.repo

[dev]
name=dev
baseurl=file:///mnt
gpgcheck=0
enabled=1

yum clean all
yum makecache
yum update -y   #就地從centos6.5升級(jí)到6。10



#下載7.9安裝包
wget https://mirrors.ustc.edu.cn/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso

#本地掛載
mount /dev/sr0 /centos10/
#配置7.10本地yum源
cat /etc/yum.repos.d/centos10.repo

[centos10]
name=centos10
baseurl=file:///centos10/
gpgcheck=0
#6.9升級(jí)到7.10,參考上文先評(píng)估
yum install preupgrade-assistant preupgrade-assistant-ui preupgrade-assistant-el6toel7 redhat-upgrade-tool
preupg -l  //無(wú)報(bào)錯(cuò)后再執(zhí)行升級(jí)
redhat-upgrade-tool --device /mnt/

四、過(guò)程報(bào)錯(cuò)處理

4.1、安裝redhat-upgrade-tool時(shí)報(bào)錯(cuò)File contains no section headers

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè),linux_FAQ,python,跨大版本升級(jí),centos6.5,libsasl.so.0,centos7.9
這是因?yàn)閞epo配置文件錯(cuò)誤,缺少YUM repo頭信息;解決方案:將缺少的yum頭信息添加上 [centos6-upgrade],如下所示:

[centos6-upgrade]
name=CentOS-$releasever - Upgrade Tool
baseurl=http://dev.centos.org/centos/6/upg/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

4.2、安裝redhat-upgrade-tool時(shí)報(bào)錯(cuò)Couldn’t resolve host dev.centos.org

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè),linux_FAQ,python,跨大版本升級(jí),centos6.5,libsasl.so.0,centos7.9
centos官網(wǎng)已經(jīng)停止centos6相關(guān)服務(wù),網(wǎng)站dev.centos.org已經(jīng)停止服務(wù)。這里我們用離線方式手動(dòng)安裝redhat-upgrade-tool相關(guān)的rpm包?;驌Q成https://buildlogs.centos.org/centos/6/upg/x86_64/

4.3、模擬升級(jí)時(shí)報(bào)錯(cuò):無(wú)法導(dǎo)入openscap相關(guān)文件

Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè),linux_FAQ,python,跨大版本升級(jí),centos6.5,libsasl.so.0,centos7.9
上圖報(bào)錯(cuò)是因?yàn)閛penscap版本太高,需要降級(jí);解決方案:卸載當(dāng)前安裝的openscap版本,下載并安裝openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm,執(zhí)行:

rpm -qa |grep openscap  //驗(yàn)證當(dāng)前版本
openscap-1.2.13-2.el6.x86_64
rpm -e --nodeps openscap-1.2.13-2.el6.x86_64
wget  https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
yum localinstall openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y  #或執(zhí)行
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm

4.4、模擬升級(jí)的檢測(cè)結(jié)果報(bào)錯(cuò):X11的EXTREME問(wèn)題

preupg --riskcheck --verbose   //報(bào)錯(cuò)如下
……
INPLACERISK: EXTREME:You have GMOME Desktop Environment session as an option in your X11 session manager. CHOME Desktop Environment as a part of the yum group’Desktop’undervent serious redesign in its user interface as well as underlying technologies in Centos 7.
TCLACERISK: EXTREME: You have kDE Desktop Envirom ent session as an option in your X11session manager. KDE Desktop Environment as a part of the yum group’KDE Desktop’undervent a redesign in its user interface as well as underlying technologies in Centos 7.
TMPLACERISK: FXTREE:The kernel driver’ncnet32’reauired to service hardware present in vour svsten is not available in Centos 7. This suggests that your systen contains hardware that is not supported in CentOS 7 release.

這是由于centos7對(duì)X11桌面環(huán)境進(jìn)行了重新設(shè)計(jì);而centos6當(dāng)前安裝軟件沒(méi)有桌面要求,選擇卸載X11桌面環(huán)境。執(zhí)行:yum groupremove -y “Desktop” “X Window System”

4.5、模擬升級(jí)的檢測(cè)結(jié)果存在:關(guān)于pcnet32的EXTREME問(wèn)題

報(bào)錯(cuò)信息:

INPLACERISK: EXTREME: The kernel driver ‘pcnet32’ required to service hardware present in your system is not available in
CentOS 7. This suggests that your system contains hardware that is not supported in CentOS 7 release.

這是因某些資源采用vmware,它提供的默認(rèn)網(wǎng)卡類(lèi)型是pcnet32,el7默認(rèn)沒(méi)有提供pcnet32的網(wǎng)卡驅(qū)動(dòng)。

解決方案:在vmware指定的虛擬機(jī)存儲(chǔ)位置找到.vmx的文件,ethernet0.virtualDev = “pcnet32” 或是別的。將其修改為:
ethernet0.virtualDev = “e1000”’ (如果沒(méi)有收到添加)

4.6、升級(jí)后提示庫(kù)文件加載失敗,報(bào)錯(cuò):grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or director

ls -l /usr/lib64/libpcre.so*  //查看升級(jí)后centos7的相關(guān)庫(kù)
 
lrwxrwxrwx 1 root root 16 315 14:13 /usr/lib64/libpcre.so -> libpcre.so.1.2.0
 
lrwxrwxrwx 1 root root 16 315 14:12 /usr/lib64/libpcre.so.1 -> libpcre.so.1.2.0
 
-rwxr-xr-x 1 root root 398272 1120 2015 /usr/lib64/libpcre.so.1.2.0

#相關(guān)實(shí)踐表明,centos7中只需對(duì)libpcre.so.0做軟連接指向就行,執(zhí)行
ln -s /usr/lib64/libpcre.so.1.2.0 /usr/lib64/libpcre.so.0
ln -s /lib64/libpcre.so.1 /lib64/libpcre.so.0
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2

4.7、yum update出現(xiàn)python問(wèn)題

#掛載7的鏡像

mount -t iso9660 -o loop CentOS-7-x86_64-DVD-1511.iso /mnt/iso或者
mount -t auto /dev/cdrom /mnt/iso/

#備份
mv yum.repos.d yum.repos.d_backup
mkdir yum.repos.d

#7 YUM源
vi /etc/yum.repos.d/centos7.repo  //如下

[centos7]
name=CentOS 7
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0

#重裝python2
yum reinstall python -y

相關(guān)資源:yum FAQ

4.8、升級(jí)后無(wú)法進(jìn)行ssh登錄(缺失文件libsasl2.so.2)

1)本地控制臺(tái)登錄后,執(zhí)行:journalctl -f -u sshd,可以看到報(bào)錯(cuò)缺失文件libsasl2.so.2,如下所示:

libsasl2.so.2: cannot open shared object file: No such file or directory

2)yum也不能使用也是因?yàn)榇_實(shí)libsasl2.so.2文件,這里我們也做下軟連接:

##Centos 7中是有l(wèi)ibsasl2.so.2這個(gè)庫(kù)的,只不過(guò)換了名字,進(jìn)入到/usr/lib64/目錄下查看
cd /usr/lib64
ls libsasl2.so.* -l  //如下所示
lrwxrwxrwx. 1 root root     17 Oct 17  2016 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x. 1 root root 121296 Jun 10  2014 libsasl2.so.3.0.0
#做軟連接到libsasl2.so.2
ln -s libsasl2.so.3 libsasl2.so.2
ls libsasl2.so.* -l  //如下所示
lrwxrwxrwx  1 root root     13 Nov 19 18:00 libsasl2.so.2 -> libsasl2.so.3
lrwxrwxrwx. 1 root root     17 Oct 17  2016 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x. 1 root root 121296 Jun 10  2014 libsasl2.so.3.0.0
#重啟ssh
systemctl start sshd
#更新yum源
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget https://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

4.9、grep命令報(bào)錯(cuò),缺失libpcre.so.0文件

grep   //報(bào)錯(cuò)如下
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
#方法同4.6,加軟連接
cd /usr/lib64
ls libpcre.so*   //顯示如下
libpcre.so  libpcre.so.1  libpcre.so.1.2.0
ln -s libpcre.so.1 libpcre.so.0

4.10、網(wǎng)卡啟動(dòng)失敗,但是ip地址獲取正常,報(bào)錯(cuò):Failed to start LSB: Bring up/down networking.

造成網(wǎng)卡不能使用的原因是,系統(tǒng)后MAC地址已經(jīng)更改但是在系統(tǒng)內(nèi)部的配置文件還沒(méi)有更,這就導(dǎo)致了真實(shí)的MAC地址與配置文件中的MAC地址不一致。Failed to start LSB: Bring up/down networking 的報(bào)錯(cuò)就是因?yàn)樯?jí)后真實(shí)的MAC地址與配置文件的MAC地址不相符造成的,可采用如下3種辦法調(diào)試恢復(fù),最后不要忘了重啟系統(tǒng)。

第一種辦法直接關(guān)閉NetworManager,執(zhí)行:systemctl stop NetworkManager ,centos7系統(tǒng)沒(méi)啟動(dòng)這個(gè)服務(wù)

第二種辦法修改配置文件

/etc/udev/rules.d/70-persistent-net.rules只要70-persistent-net.rules配置文件中的MAC地址與ifcfg-xxx的MAC地址相同就可以了。但是我打開(kāi)70-persistent-net.rules配置文件發(fā)現(xiàn)配置文件全是注釋?zhuān)缓缶椭苯釉趇fcfg-xxx文件中添加了HWADDR=MAC 對(duì)應(yīng)的MAC地址,但修改完配置文件后發(fā)現(xiàn)還是提示錯(cuò)誤。vim /etc/udev/rules.d/70-persistent-net.rules 網(wǎng)卡中添加了也不好使

第三種辦法:使用這一條命令將清除協(xié)議地址,盡然還是不管用,無(wú)奈之下重啟系統(tǒng),發(fā)現(xiàn)重啟后網(wǎng)絡(luò)服務(wù)恢復(fù)正常。

ip addr flush dev ens33/eth0 這個(gè)方法是可以成功解決問(wèn)題的

4.11、YUM清理卸載openldap導(dǎo)致libldap-2.4.so.2: cannot open shared object file

注意:當(dāng)卸載掉openldap后,出現(xiàn)了yum、sshd奔潰的問(wèn)題;

wget http://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.4/x86_64/updates/fastbugs/openldap-2.4.23-32.el6_4.1.x86_64.rpm

rpm -ivh --force --nodeps openldap-2.4.23-32.el6_4.1.x86_64.rpm

五、Centos 7.9升級(jí)到BCLinux 8.6

六、附錄:其他

6.1、CentOS 8中執(zhí)行命令報(bào)錯(cuò):Failed to set locale, defaulting to C.UTF-8

原因:

1、沒(méi)有安裝相應(yīng)的語(yǔ)言包。
2、沒(méi)有設(shè)置正確的語(yǔ)言環(huán)境。

解決方法1:

安裝語(yǔ)言包,設(shè)置語(yǔ)言環(huán)境需使用命令 locale
locale -a #查看目前系統(tǒng)已安裝的語(yǔ)言包
yum install glibc-langpack-zh #安裝中文語(yǔ)言包
dnf install glibc-langpack-en #安裝英文語(yǔ)言包,或
dnf install langpacks-en glibc-all-langpacks -y #安裝英文語(yǔ)言包

解決方法2:

設(shè)置正確的語(yǔ)言環(huán)境
echo “export LC_ALL=en_US.UTF-8” >> /etc/profile
source /etc/profile #或執(zhí)行:
locale -gen en_US.UTF-8

6.2、內(nèi)核版本的定義:

版本性質(zhì):主分支ml(mainline),穩(wěn)定版(stable),長(zhǎng)期維護(hù)版lt(longterm)
版本命名格式為 “A.B.C”:

數(shù)字 A 是內(nèi)核版本號(hào):版本號(hào)只有在代碼和內(nèi)核的概念有重大改變的時(shí)候才會(huì)改變,歷史上有兩次變化:
第一次是1994年的 1.0 版,第二次是1996年的 2.0 版,第三次是2011年的 3.0 版發(fā)布,但這次在內(nèi)核的概念上并沒(méi)有發(fā)生大的變化
數(shù)字 B 是內(nèi)核主版本號(hào):主版本號(hào)根據(jù)傳統(tǒng)的奇-偶系統(tǒng)版本編號(hào)來(lái)分配:奇數(shù)為開(kāi)發(fā)版,偶數(shù)為穩(wěn)定版
數(shù)字 C 是內(nèi)核次版本號(hào):次版本號(hào)是無(wú)論在內(nèi)核增加安全補(bǔ)丁、修復(fù)bug、實(shí)現(xiàn)新的特性或者驅(qū)動(dòng)時(shí)都會(huì)改變文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-706462.html

#內(nèi)核升級(jí)

#yum源
wget http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm  #Centos 6 YUM源:
wget http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm   #Centos 7 YUM源:
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
#查看可用的內(nèi)核
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
#安裝最新主線穩(wěn)定版
yum -y --enablerepo=elrepo-kernel install kernel-ml

#方式2:直接rpm安裝
wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-lt-4.4.185-1.el7.elrepo.x86_64.rpm
rpm -ivh kernel-lt-4.4.185-1.el7.elrepo.x86_64.rpm

#方式3:編譯安裝

#升級(jí)完成,修改grub內(nèi)核啟動(dòng)順序,內(nèi)核升級(jí)完畢后,目前內(nèi)核還是默認(rèn)的版本,如果此時(shí)直接執(zhí)行reboot命令,重啟后使用的內(nèi)核版本還是默認(rèn)的3.10,不會(huì)使用新的5.2.2
cat /boot/grub2/grub.cfg | grep menuentry   //查看當(dāng)前內(nèi)核數(shù)
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg   //查看默認(rèn)啟動(dòng)順序
#在grub.conf文件中決定開(kāi)機(jī)使用哪個(gè)內(nèi)核版本做啟動(dòng)的參數(shù)是default,默認(rèn)值為0,代表從最新的內(nèi)核啟動(dòng)。代表啟動(dòng)的內(nèi)核版本從上往下依次是0、1、2等,修改新內(nèi)核的啟動(dòng)順序?yàn)?:
vim /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=0    #參數(shù)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"

#重新生成內(nèi)核配置
grub2-mkconfig -o /boot/grub2/grub.cfg
#或者
grub2-set-default ‘CentOS Linux (3.10.0-123.9.3.el7.x86_64) 7 (Core)#驗(yàn)證
grub2-editenv list
#CentOS 8 系統(tǒng)更改內(nèi)核啟動(dòng)順序與centos 7有了一些變化
grubby --default-kernel  //查看默認(rèn)啟動(dòng)內(nèi)核
grubby --info=ALL   //查看所有內(nèi)核
rubby --set-default /boot/vmlinuz-4.18.0-80.11.2.el8_0.x86_64   //cenots8設(shè)置需要設(shè)置的啟動(dòng)的默認(rèn)的內(nèi)核

#對(duì)于ubuntu
vim /etc/default/grub  #將GRUB_DEFAULT=0 修改為
GRUB_DEFAULT=“Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-166-generic”

#更新修改后的grub
update-grub

#完成后,重啟
reboot

到了這里,關(guān)于Centos 6.5 升級(jí)到Centos7指導(dǎo)手冊(cè)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Linux Centos7內(nèi)網(wǎng)服務(wù)器離線升級(jí)openssh9.3

    Linux Centos7內(nèi)網(wǎng)服務(wù)器離線升級(jí)openssh9.3

    內(nèi)網(wǎng)服務(wù)器需要升級(jí)openssh,被折磨了一整天,覺(jué)得有必要記錄一下,不然對(duì)不起這差點(diǎn)崩潰的一天,主要的幾個(gè)難點(diǎn)就是不能yum一鍵安裝,需要自己找到對(duì)應(yīng)的依賴(lài)版本然后通過(guò)堡壘機(jī)上傳到內(nèi)網(wǎng),還有就是服務(wù)器很干凈,什么都沒(méi)有,需要離線安裝的包太多,又不知道依賴(lài)

    2024年02月16日
    瀏覽(27)
  • linux|操作系統(tǒng)|centos7物理機(jī)安裝網(wǎng)卡驅(qū)動(dòng)8188gu(內(nèi)核升級(jí),firmware固件,USB設(shè)備管理,module管理)

    linux|操作系統(tǒng)|centos7物理機(jī)安裝網(wǎng)卡驅(qū)動(dòng)8188gu(內(nèi)核升級(jí),firmware固件,USB設(shè)備管理,module管理)

    目前服務(wù)器領(lǐng)域centos7基本是主流的操作系統(tǒng),而linux相對(duì)于Windows來(lái)說(shuō),軟硬件方面的支持是差很多的,在硬件方面來(lái)說(shuō),以一個(gè)免驅(qū)的網(wǎng)卡為例,window xp可能不會(huì)自動(dòng)識(shí)別到,但Windows10基本都會(huì)自動(dòng)識(shí)別到,簡(jiǎn)簡(jiǎn)單單的即插即用。根本原因在Windows隨著版本的升級(jí),內(nèi)置的各

    2024年01月20日
    瀏覽(37)
  • linux內(nèi)網(wǎng)替換redhat-6.5為CentOS6.5操作

    http://mirror.nsc.liu.se/centos-store/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso http://mirror.nsc.liu.se/centos-store/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm http://mirror.nsc.liu.se/centos-store/6.5/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm http://mirror.nsc.liu.se/centos-store/6.5/os/x86_64/Packages/yum-plugin-f

    2023年04月22日
    瀏覽(19)
  • 瀚高企業(yè)版數(shù)據(jù)庫(kù)V6單機(jī)安裝指導(dǎo)手冊(cè)(Linux)

    瀚高企業(yè)版數(shù)據(jù)庫(kù)V6單機(jī)安裝指導(dǎo)手冊(cè)(Linux)

    目錄 瀚高企業(yè)版數(shù)據(jù)庫(kù)V6單機(jī)安裝指導(dǎo)手冊(cè)(Linux) 1. 環(huán)境準(zhǔn)備 1.1 防火墻設(shè)置 1.1.1 開(kāi)放數(shù)據(jù)庫(kù)使用端口 1.1.2 關(guān)閉防火墻 1.2 檢查時(shí)區(qū)和時(shí)間 1.3 創(chuàng)建highgo用戶(hù) 1.4 檢驗(yàn)安裝包 2. 軟件安裝 2.1 圖形化安裝 3. 設(shè)置highgo用戶(hù)環(huán)境變量 4. 數(shù)據(jù)庫(kù)配置 4.1 配置數(shù)據(jù)庫(kù)參數(shù) 4.2 ?配置數(shù)據(jù)

    2024年02月16日
    瀏覽(65)
  • CentOS7升級(jí)openssl

    CentOS7升級(jí)openssl

    公司服務(wù)器等保要求,修復(fù)openssl的高危漏洞。 本機(jī)使用centos7.9系統(tǒng),openssl版本是1.0.2k,計(jì)劃升級(jí)到1.1.1q 在執(zhí)行下列操作前,務(wù)必要打快照做好備份,以防升級(jí)失敗引起的生產(chǎn)事故。 因?yàn)閛penssl屬于非?;A(chǔ)的服務(wù),可能影響實(shí)際生產(chǎn)中的許多服務(wù),因此建議先在同一業(yè)務(wù)下

    2024年04月22日
    瀏覽(26)
  • centos7升級(jí)mariadb

    1、備份原數(shù)據(jù)庫(kù) 按數(shù)據(jù)庫(kù)名導(dǎo)出:mysqldump -uroot -p --database database_name name.dump 導(dǎo)出所有數(shù)據(jù)庫(kù):mysqldump -u root -p --all-databases alldb.sql 如出錯(cuò),嘗試這個(gè):mysqldump --single-transaction -u root -p --all-databases alldb.sql 2、停止服務(wù)運(yùn)行 systemctl stop mariadb systemctl status mariadb 3、卸載mariadb yum

    2024年02月09日
    瀏覽(19)
  • centos7 升級(jí) gcc 版本

    centos7 升級(jí) gcc 版本

    GNU Mirror List 查看動(dòng)態(tài)庫(kù)版本 查找gcc生成的最新動(dòng)態(tài)庫(kù) 查看libstdc++.so 進(jìn)入libstdc++.so配置目錄 CentOS 7官方源的gcc最新版本是4.8.5,發(fā)布于2015年,年代久遠(yuǎn)且不支持c++14。要編譯c++14及以上項(xiàng)目,必須要升級(jí)現(xiàn)有版本或者安裝高版本的gcc。紅帽其實(shí)已經(jīng)編譯好了高版本的gcc,但未

    2023年04月26日
    瀏覽(26)
  • centos7.9 openssl升級(jí)

    軟件下載 依賴(lài)安裝 編譯安裝 更新系統(tǒng)庫(kù) 備份并軟連接至新版本 查看當(dāng)前版本

    2024年02月11日
    瀏覽(22)
  • Centos7服務(wù)器同步網(wǎng)絡(luò)發(fā)現(xiàn)漏洞與修復(fù)手冊(cè)(每周更新3次)

    期望通過(guò)每一次分享,讓技術(shù)的門(mén)檻變低,落地更容易。 —— around 作者公司有8臺(tái)云服務(wù)器,本地有2臺(tái)物理服務(wù)器,并且都聯(lián)網(wǎng)了。云服務(wù)器的安全防護(hù)到期了,公司也不太想續(xù)費(fèi)了,遂自己從代碼上添加了一系列軟件防護(hù),但漏洞是一直再出,誰(shuí)也無(wú)法保障是永遠(yuǎn)安全,

    2024年02月04日
    瀏覽(59)
  • CentOS7中升級(jí)OpenSSL詳細(xì)教程

    OpenSSL : 是用于保護(hù)數(shù)據(jù)安全的重要工具。它能提供加密,解密等多項(xiàng)功能。 然而,隨著技術(shù)的發(fā)展和新的安全漏洞的出現(xiàn),使用最新版本的 OpenSSL 成為了重要的需求。 想了解更多可進(jìn)入官網(wǎng):https://www.openssl.org/ 有些較新的應(yīng)用只能安裝在openssl3上,所以不更換centos7只能升級(jí)

    2024年02月03日
    瀏覽(30)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包