In CentOS/RHEL, the System service uses the System v startup script control, which mainly uses two Commands: chkconfig and service, in/etc/init. d/bottom. the new systemd system and service management program are used in Fedora. systemctl control is mainly used and configured under/etc/systemd. more powerful. The following uses the mysqld service as an example: 1. start mysqld service # systemctl start mysqld. service 2. set Automatic startup # systemctl enable mysqld. service 3, stop auto-start # systemctl disable mysqld. service 4. view the current status of the service # systemctl status mysqld. service 5. restart a service # systemctl restart mysqld. service 6. view all started services # systemctl list-units -- type = service enable port 22 of the firewall # iptables-I INPUT-p tcp -- dport 22-j ACCEPT if the problem persists, SELinux may be disabled due to selinux: Modify selinux = "" to disabled in the/etc/SELINUX/config file, then restart ========================================== [root @ CC init. d] # systemctl start sshd. service [root @ CC init. d] # systemctl enable sshd. service ln-S'/usr/lib/systemd/system/sshd. service ''/etc/systemd/system/multi-user.target.wants/sshd. service '[root @ CC init. d] # iptables-I INPUT-p tcp -- dport 22-j ACCEPT