CentOS7 服務啓動命令

【CentOS7】服務啓動命令與【CentOS5/6】不一樣

常用的命令有:

systemctl disable networkmanager.service            //disable禁止開機啓動 enable開機啓動    

systemctl stop networkmanager.service                 //stop關閉網絡還原服務 start/restart

systemctl disable firewalld.service                                        //禁止firewalld防火牆開機啓動

systemctl stop firewalld.service                                             //關閉firewalld防火牆

systemctl disable iptables.service                                       //禁止iptables防火牆開機啓動

systemctl stop iptables.service                                           //關閉iptables防火牆

systemctl restart network                                        //重啓網卡服務

systemctl list-unit-files                                            //列出服務

ip addr                                                                       //查看IP


PS:

centos5/6:service 服務名 start|stop|restart             ifconfig  //查看IP

centos7:   systemctl start|stop|restart 服務名        ip addr  //查看IP


啓用iptables防火牆:yum install iptables-services

                                   systemctl enable iptables.service

                                   systemctl restart iptables.service


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章