久久国产乱子伦精品免费M,亚洲一区二区三区91,欧美国产在线视频,国产精品视频久久

Linux進程管理之systemctl命令解析【每日一個知識點第110期-Linux】

使用Linux系統(tǒng)必備的技能之一就是Linux進程管理,系統(tǒng)運行的過程正是無數(shù)進程在運行的過程。這些進程的運行需要占用系統(tǒng)的內(nèi)存等資源,做好系統(tǒng)進程的管理,對于我們合理分配、使用系統(tǒng)資源有非常大的意義。今天我們來看進程管理命令中的systemctl命令。


systemctl命令是系統(tǒng)服務(wù)管理器指令,它實際上將?service?和?chkconfig?這兩個命令組合到一起。

任務(wù) 舊指令 新指令
使某服務(wù)自動啟動 chkconfig --level 3?httpd?on systemctl?enable?httpd.service
使某服務(wù)不自動啟動 chkconfig --level 3 httpd off systemctl disable httpd.service
檢查服務(wù)狀態(tài) service httpd status systemctl status?httpd.service (服務(wù)詳細信息) systemctl is-active httpd.service (僅顯示是否 Active)
顯示所有已啟動的服務(wù) chkconfig --list systemctl list-units --type=service
啟動某服務(wù) service httpd start systemctl start httpd.service
停止某服務(wù) service httpd stop systemctl stop httpd.service
重啟某服務(wù) service httpd restart systemctl restart httpd.service

實例

1.啟動nfs服務(wù)

systemctl?start?nfs-server.service

2.設(shè)置開機自啟動

systemctl?enable?nfs-server.service

3.停止開機自啟動

systemctl?disable?nfs-server.service

4.查看服務(wù)當(dāng)前狀態(tài)

systemctl?status?nfs-server.service

5.重新啟動某服務(wù)

systemctl?restart?nfs-server.service

6.查看所有已啟動的服務(wù)

systemctl?list?-units?--type=service

開啟防火墻22端口

iptables?-I?INPUT?-p?tcp?--dport?22?-j?accept

如果仍然有問題,就可能是SELinux導(dǎo)致的

關(guān)閉SELinux:

修改/etc/seLinux/config文件中的SELINUX=””為disabled,然后重啟。

徹底關(guān)閉防火墻:

sudo?systemctl?status firewalld.service
sudo?systemctl?stop?firewalld.service??????????
sudo?systemctl?disable?firewalld.service

《Linux學(xué)習(xí)每日一個知識點》欄目是馬哥教育Linux云計算年薪20萬+的學(xué)員社群特別發(fā)起,分享Linux工具、Linux語法、Linux項目等知識點,幫助大家快速的了解Linux學(xué)習(xí),快速步入Linux高薪的快車道。

http://haohuigou.com/74163.html

相關(guān)新聞

歷經(jīng)多年發(fā)展,已成為國內(nèi)好評如潮的Linux云計算運維、SRE、Devops、網(wǎng)絡(luò)安全、云原生、Go、Python開發(fā)專業(yè)人才培訓(xùn)機構(gòu)!

    1. 主站蜘蛛池模板: 都匀市| 安仁县| 宜君县| 泽州县| 韩城市| 舒兰市| 沙雅县| 安庆市| 德兴市| 阿巴嘎旗| 汕尾市| 栾川县| 尉氏县| 九台市| 行唐县| 赫章县| 昌宁县| 白沙| 防城港市| 辉县市| 个旧市| 曲阳县| 平原县| 舞钢市| 理塘县| 新龙县| 中江县| 文昌市| 宜宾市| 麻城市| 肇州县| 安图县| 健康| 广元市| 霍邱县| 越西县| 南投市| 大宁县| 湖州市| 兴山县| 桐梓县|