


全文預(yù)覽已結(jié)束
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
安裝完CentOS 7 minimal后,無力吐槽,變化之大,發(fā)現(xiàn)以前常用的一些命令都沒有。一、常用命令安裝查看anaconda-ks.cfg,原來是沒裝base group的包rootcentos7 # cat anaconda-ks.cfg #version=RHEL7# System authorization informationauth -enableshadow -passalgo=sha512# Use CDROM installation mediacdrom# Run the Setup Agent on first bootfirstboot -enableignoredisk -only-use=sda# Keyboard layoutskeyboard -vckeymap=us -xlayouts=us# System languagelang en_US.UTF-8 -addsupport=zh_CN.UTF-8# Network informationnetwork -bootproto=dhcp -device=eno16777736 -onboot=off -ipv6=autonetwork -hostname=localhost.localdomain# Root passwordrootpw -iscrypted $6$Zz5VMf1HPPRm0YRL$QSoaU9pAUApXMj9BXuK5qlUFGAfCv9Y/ylVGUcDYv.lrxfNodTiI/7DO1UR7carvL1EdgwQpuiwDt524f6.GR.# System timezonetimezone Asia/Chongqing -isUtc -nontp# System bootloader configurationbootloader -location=mbr -boot-drive=sdaautopart -type=lvm# Partition clearing informationclearpart -none -initlabel %packagescore # 這里只有core%endrootcentos7 # yum groupinstall base # 安裝完后ifconfig、service、chkconfig等命令就都有了二、運(yùn)行級別切換rootcentos7 # cat /etc/inittab # 系統(tǒng)運(yùn)行級別的設(shè)置方式也變化了# inittab is no longer used when using systemd.# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target# systemd uses targets instead of runlevels. By default, there are two main targets:# multi-user.target: analogous to runlevel 3# graphical.target: analogous to runlevel 5# To set a default target, run:# ln -sf /lib/systemd/system/.target /etc/systemd/system/default.target這里寫的很明白了,做個軟鏈修改默認(rèn)運(yùn)行級別rootcentos7 system# ll /lib/systemd/system/runlevel*.target # 系統(tǒng)0-6 7個運(yùn)行級別,2 3 4 運(yùn)行指向同一個文件lrwxrwxrwx 1 root root 15 Oct 11 03:51 /lib/systemd/system/runlevel0.target - poweroff.targetlrwxrwxrwx 1 root root 13 Oct 11 03:51 /lib/systemd/system/runlevel1.target - rescue.targetlrwxrwxrwx 1 root root 17 Oct 11 03:51 /lib/systemd/system/runlevel2.target - multi-user.targetlrwxrwxrwx 1 root root 17 Oct 11 03:51 /lib/systemd/system/runlevel3.target - multi-user.targetlrwxrwxrwx 1 root root 17 Oct 11 03:51 /lib/systemd/system/runlevel4.target - multi-user.targetlrwxrwxrwx 1 root root 16 Oct 11 03:51 /lib/systemd/system/runlevel5.target - graphical.targetlrwxrwxrwx 1 root root 13 Oct 11 03:51 /lib/systemd/system/runlevel6.target - reboot.target三、systemctl管理系統(tǒng)服務(wù)systemctl可以看作是service和chkconfig的組合jobchkconfig、servicesystemctl服務(wù)開機(jī)自啟動chkconfig -level 3 httpd onsystemctl enable httpd服務(wù)不開機(jī)自啟動chkconfig -level 3 httpd offsystemctl disable httpd服務(wù)狀態(tài)service httpd statussystemctl status httpd(服務(wù)詳細(xì)信息)systemctl is-active httpd(只顯示是否active)所有服務(wù)的啟動狀態(tài)chkconfig -listsystemctl list-units -type=service啟動服務(wù)service httpd startsystemctl start httpd停止服務(wù)service httpd stopsystemctl stop httpd重啟服務(wù)service httpd restartsystemctl restart httpdcentos 7之前的
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公司猜燈謎抽獎活動方案
- 公司粽子定做活動方案
- 公司紅色培訓(xùn)活動方案
- 2025年現(xiàn)代物流管理師職業(yè)資格考試試題及答案
- 2025年思想政治理論與教育考試試卷及答案
- 2025年商品經(jīng)濟(jì)學(xué)考試試卷及答案
- 高危人群自檢策略-洞察及研究
- 2025年科技創(chuàng)新創(chuàng)業(yè)導(dǎo)師職業(yè)資格考試卷及答案
- 2025年旅游管理專業(yè)考試試卷及答案
- 2025年會計職業(yè)資格考試試卷及答案
- 年產(chǎn)5萬噸趣味酥性餅干生產(chǎn)車間設(shè)計
- 肝內(nèi)膽管結(jié)石詳解
- 發(fā)電機(jī)勵磁系統(tǒng)檢修與維護(hù)
- 2023-2024學(xué)年福建省泉州市小學(xué)語文六年級期末自測模擬試卷
- GB 29541-2013熱泵熱水機(jī)(器)能效限定值及能效等級
- 控規(guī)用地代碼
- 2023年上杭縣社區(qū)工作者招聘考試筆試題庫及答案解析
- 2021年曹楊二中自招數(shù)學(xué)試卷
- 新能源汽車底盤檢修全套課件
- 幼兒園大班數(shù)學(xué)口算練習(xí)題可打印
- 江蘇特種作業(yè)人員體檢表
評論
0/150
提交評論