- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯網協會理事單位
- 安全聯盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數碼
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 |
實例:
1.啟動nfs服務
systemctl start nfs-server.service
2.設置開機自啟動
systemctl enable nfs-server.service
3.停止開機自啟動
systemctl disable nfs-server.service
4.查看服務當前狀態
systemctl status nfs-server.service
5.重新啟動某服務
systemctl restart nfs-server.service
6.查看所有已啟動的服務
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
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP