How to configure linux service

Linux Service configuration

The service configuration is how to start, stop, restart, enable and disable the Linux service. In Linux basic, this service use after the installation or some stops the service under the run software.

1. Configuration services 

In Linux systemctl command is used for the start the services and stop services. systemctl is used to examine and control the state of “systemd” system and service manager.

Check the status of services

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl status firewalld

Start  the services 

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl stert firewalld

Stop the services

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl stop firewalld

Restart the services 

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl restart firewalld

Disable the services 

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl disable firewalld

Enable the services 

# systemctl [OPTIONS...] COMMAND [NAME...]
# systemctl enable firewalld

 

2. How to disable SELinux security 

what is SELinux?

A SELinux is a Security-Enhanced Linux (SELinux)  is a Linux Kernal security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC). In Linux a SELinux file go to the open the Selinux config file

vi /etc/selinux/config

Then after show SELInux is  SELINUX=enforcing  press i for edit and change  SELINUX=disable  press the ESC key in keyboard the after click :wq   save to change the file now SELinux is disabled.

3. List-sockets

It lists sockets addresses ordered by listening address.

# systemctl list-sockets

 

Was this article helpful?

Related Articles