1 Service Management:
View all services started: Systemctl list-units--type=service
Show list of services: Systemctl List-unit-files
Description of the value:
Enable: Boot up. Was SYSTEMD enabled, that is, SYSTEMD has loaded it into memory. At this time Systemd knew (know) it
Disable: Disable boot start. is not enabled, that is, the unit is not loaded into memory by SYSTEMD, at this time it is just a text file
Static: The unit file does not use the install item, it can not be set to boot.
Masked: Similar to lock, at this time the unit can not be started anyway.
Displays the current status of a service: Systemctl status Crond.service
Shows if a service is Active:systemctl is-active Crond.service
Stop a service: Systemctl stop Crond.service
Start a service: Systemctl start Crond.service
Restart a service: Systemctl restart Crond.service
Prohibit a service from starting: Systemctl disable Crond.service
Allow a service to start from: Systemctl Enable Crond.service
Check if a service is booting: Systemctl is-enabled crond.service
2 Firewall Management:
Installation: Yum Install Firewalld
Start: Systemctl start Firewalld.service
Stop: Systemctl Stop Firewalld.service
Disable self-booting: Systemctl Disable Firewalld.service
View current detailed status: Systemctl status Firewalld.service
Display Status: Firewall-cmd--state
Open port: Firewall-cmd--zone=public--add-port=80/tcp--permanent(--permanent parameter means permanent, otherwise it will expire after reboot)
Delete port: Firewall-cmd--zone=public--remove-port=23/tcp--permanent
Reload: Firewall-cmd--reload
Show open Services and ports: Firewall-cmd--list-all
Get all supported services: Firewall-cmd--get-services
This article from "10,000 years too long, seize" blog, please be sure to keep this source http://zengwj1949.blog.51cto.com/10747365/1932758
Linux cent OS 7 service management and firewall configuration