欧美激情aaaa_伊人久久久大香线蕉综合直播_日韩在线卡一卡二_亚洲成人人体

systemctl

系統服務管理器指令

補充說明

systemctl命令 是系統服務管理器指令,它實際上將 service 和 chkconfig 這兩個命令組合到一起。

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

實例

systemctl start nfs-server.service . # 啟動nfs服務
systemctl?enable?nfs-server.service # 設置開機自啟動
systemctl?disable?nfs-server.service # 停止開機自啟動
systemctl?status?nfs-server.service # 查看服務當前狀態
systemctl?restart?nfs-server.service # 重新啟動某服務
systemctl?list-units?--type=service # 查看所有已啟動的服務

開啟防火墻22端口

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

如果仍然有問題,就可能是SELinux導致的

關閉SElinux:

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

徹底關閉防火墻:

sudo?systemctl?status firewalld.service
sudo?systemctl?stop?firewalld.service??????????
sudo?systemctl?disable?firewalld.service
主站蜘蛛池模板: 长子县| 巴东县| 大庆市| 治县。| 阳信县| 东平县| 鄂尔多斯市| 靖西县| 洪泽县| 鞍山市| 松江区| 涞水县| 伊通| 华池县| 武定县| 柳林县| 吉安县| 仲巴县| 文登市| 田东县| 华蓥市| 大丰市| 临夏县| 奎屯市| 阿拉善盟| 金溪县| 乐陵市| 汪清县| 应用必备| 长海县| 浦县| 贵州省| 井陉县| 通道| 稷山县| 精河县| 堆龙德庆县| 葵青区| 仙居县| 沈阳市| 神农架林区|