systemctl


Systemctlコマンドは、実際にserviceとchkconfigの2つのコマンドを組み合わせたシステムサービスマネージャコマンドです.
タスク#タスク#
古い命令
新しいコマンド
サービスを自動的に開始
chkconfig --level 3 httpd on
systemctl enable httpd.service
サービスを自動的に開始しない
chkconfig --level 3 httpd off
systemctl disable httpd.service
サービスステータスの確認
service httpd status
systemctl status httpd.サービス(サービス詳細)systemctl is-active httpd.サービス(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
≪インスタンス|Instance|emdw≫
1.nfsサービスの起動
systemctl start nfs-server.service
2.POSTの設定
systemctl enable nfs-server.service
3.POSTを停止する
systemctl disable nfs-server.service
4.サービスの現在のステータスの表示
systemctl status nfs-server.service
5.サービスの再起動
systemctl restart nfs-server.service
6.開始したすべてのサービスの表示
systemctl list -units --type=service
ファイアウォール22ポートのオープン
 -I INPUT -p tcp --dport 22 -j
まだ問題がある場合は、SELinuxによる可能性があります.
SElinuxを閉じる:/etc/selinux/configファイルのSELINUX=””をdisabledに変更し、再起動します.
ファイアウォールを完全に閉じる:
systemctl status firewalld.service
sudo systemctl stop firewalld.service          
sudo systemctl disable firewalld.service