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サービスの起動
SElinuxを閉じる:
ファイアウォールを完全に閉じる:
タスク#タスク#
古い命令
新しいコマンド
サービスを自動的に開始
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