新聞中心
如果說(shuō) Ubuntu 是現(xiàn)今最受桌面用戶(hù)歡迎的 Linux 操作系統(tǒng),那么 CentOS 就是最受公司、企業(yè)、網(wǎng)站喜愛(ài)的 Linux 發(fā)行版了。得益于極為出色的穩(wěn)定性,全球范圍內(nèi)無(wú)數(shù)著名網(wǎng)站均選用它,異次元的服務(wù)器也正是使用它,本篇文章重點(diǎn)為大家講解一下CentOS6和CentOS7異同。

創(chuàng)新互聯(lián)公司專(zhuān)注于臨高網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供臨高營(yíng)銷(xiāo)型網(wǎng)站建設(shè),臨高網(wǎng)站制作、臨高網(wǎng)頁(yè)設(shè)計(jì)、臨高網(wǎng)站官網(wǎng)定制、微信小程序開(kāi)發(fā)服務(wù),打造臨高網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供臨高網(wǎng)站排名全網(wǎng)營(yíng)銷(xiāo)落地服務(wù)。
init 技術(shù)
2 沒(méi)有網(wǎng)絡(luò)的多用戶(hù)模式
——-
啟動(dòng)需要腳本 ————>串行,可能會(huì)卡死,啟動(dòng)慢
進(jìn)程為 1 的 init 就是 cs6
upstart 技術(shù)
CentOS6采用了Upstart技術(shù)代替INIT進(jìn)行引導(dǎo),但是為了簡(jiǎn)便管理員的操作,操作習(xí)慣還是和INIT一樣。
So,Upstart技術(shù)作為一個(gè)過(guò)渡技術(shù),因?yàn)楦?jìng)爭(zhēng)對(duì)手太強(qiáng)大,而被淘汰。
代表系統(tǒng):CentOS6,Ubuntu14,從CentOS7,Ubuntu15開(kāi)始使用systemd
Systemd技術(shù)
新系統(tǒng)都會(huì)采用的技術(shù)(RedHat7,CentOS7,Ubuntu15等);
設(shè)計(jì)目標(biāo)是克服INIT固有的缺點(diǎn),提高系統(tǒng)的啟動(dòng)速度;
和INIT兼容,降低遷移成本;
最主要優(yōu)點(diǎn):并行啟動(dòng)
Pid為1的進(jìn)程
[root@centos7~]#ps -ef |head -2
UID PID PPID C STIME TTY TIME CMD root10011:13?00:00:01/usr/lib/systemd/systemd--
switched-root--system--deserialize 21
pid 1 是system
B 任務(wù)看到A任務(wù)啟動(dòng)了才啟動(dòng)。system 偽造讓兩個(gè)系統(tǒng)同時(shí)啟動(dòng)
要虛擬化,升級(jí)內(nèi)核,boot 1024
cobbler 管理界面
補(bǔ)充安裝軟件包
yum -y install free nmap lrzsz dos2unix telnet screen vim lsof
自動(dòng)話(huà)安裝時(shí)添加軟件
CentOS6和CentOS7的異同
區(qū)別1:網(wǎng)卡名稱(chēng)eth0和enp5s0
傳統(tǒng)的Linux的網(wǎng)絡(luò)接口命令為為eth0、eth1.
從CentOS7/RHEL7起,引入了一致和可預(yù)測(cè)的網(wǎng)絡(luò)設(shè)備命名網(wǎng)絡(luò)接口的方法。即使添加或移除網(wǎng)絡(luò)設(shè)備,接口名稱(chēng)仍然保持固定,而無(wú)需重新枚舉,和壞掉的硬件可以無(wú)縫替換。
但是這個(gè)新的特性對(duì)我們自動(dòng)化運(yùn)維造成了干擾!
因此,先進(jìn)的技術(shù)向我們屈服了…
CentOS7修改網(wǎng)卡名稱(chēng)為eth0
已經(jīng)安裝完系統(tǒng)修改
http://oldboy.blog.51cto.com/2561410/1722101
上面方法,只適合第一次安裝,很繁瑣
自動(dòng)化安裝時(shí),直接配置
區(qū)別2:網(wǎng)絡(luò)配置相關(guān)命令
ip: yum -y install iproute
CentOS7主推使用ip命令。
ifconfig: yum -y install net-tools
setup: yum -y install setuptool 廢棄命令
nmtui:替代 setup 命令
安裝完改網(wǎng)卡名字,沒(méi)用
區(qū)別3:主機(jī)名與字符集
修改主機(jī)名
hostname CentOS7
/etc/hostname
hostnamectl set-hostname CentOS7
修改字符集
.UTF-8
/etc/locale.conf
localectl set-locale.UTF-8
區(qū)別4:兼容的/etc/rc.local
Please note that you must run ‘ chmod +x /etc/rc.d/rc.local’ to ensure that this script will be executed during boot.
簡(jiǎn)單介紹CentOS6和CentOS7的異同簡(jiǎn)單介紹CentOS6和CentOS7的異同
[root@lewen ~]# systemctl get-default
multi-user.target
區(qū)別5:管理服務(wù)
systemct:融合service和chkconfig的功能于一體。
systemctl start crond.service 啟動(dòng)服務(wù)。
systemctl stop crond.service 停止服務(wù)。
systemctl restart crond.service 重啟服務(wù)。
systemctl reload crond.service. 重載服務(wù)。
systemctl status crond.service 查看服務(wù)運(yùn)行狀態(tài)。
systemctl list-unit-files 查看所有開(kāi)機(jī)服務(wù)。
systemctl enable crond.service 開(kāi)機(jī)自啟動(dòng)。
systemctl disable crond.service 開(kāi)機(jī)不啟動(dòng)。
systemctl is-enabled crond.service 檢查是否開(kāi)機(jī)自啟動(dòng)。
分享名稱(chēng):講解CentOS6和CentOS7的異同
本文URL:http://m.fisionsoft.com.cn/article/djedgic.html


咨詢(xún)
建站咨詢(xún)
