Linux Service and Process Management with Nginx
This guide explains how to install Nginx on a Linux server, manage it with systemctl commands, verify its operation using netstat, and control related processes via ps and kill utilities, providing practical command examples for each step.
Linux service and process management tutorial covering installation, control, verification, and monitoring of the Nginx web server on a Linux system.
Linux Service Process Management
Service management
Process management
Preparation – Install Nginx Service
Install an Nginx web server (default port 80) for testing purposes.
yum -y install nginxService Management – systemctl
Use systemctl (or legacy service ) to control the Nginx service:
Start: systemctl start nginx
Stop: systemctl stop nginx
Restart: systemctl restart nginx
Reload: systemctl reload nginx
Status: systemctl status nginx
Enable at boot: systemctl enable nginx
Disable at boot: systemctl disable nginx
Service Verification
Check listening ports with netstat (TCP: -anlpt , UDP: -anlpu ).
[root@myserver ~]# netstat -anlpt | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6416/nginx: master
tcp6 0 0 :::80 :::* LISTEN 6416/nginx: masterProcess Management
View Nginx processes with ps :
[root@myserver ~]# ps aux | grep nginx
root 6416 0.0 0.5 118672 9920 ? Ss 09:10 0:00 nginx: master process /usr/sbin/nginx
nginx 6447 0.0 0.4 150020 9000 ? S 09:10 0:00 nginx: worker process
root 6635 0.0 0.0 12108 1088 pts/0 S+ 09:15 0:00 grep --color=auto nginxTerminate processes using kill (graceful -15 , force -9 ) or killall to stop all Nginx processes:
kill PID
kill -9 123
kill -15 123
killall nginx ## stop all nginx processesMonitor system processes with top .
More content and community: Follow DevOps Cloud Classroom for additional resources.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.