Linux cent OS 7 service management and firewall configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.