본문 바로가기
Infra/Linux

[Linux; 리눅스] 서비스 상태 확인 / 시작 / 중지 / 재시작 명령

by daddydontsleep 2023. 10. 24.
728x90
728x90

Linux Tux

[ 카페 24 ]

< apache >

시작: /opt/apache/bin/apachectl start

재시작: /opt/apache/bin/apachectl restart

중지: /opt/apache/bin/apachectl stop

< mysql >

시작: /opt/mysql/support-files/mysql.server start

재시작: /opt/mysql/support-files/mysql.server restart

중지: /opt/mysql/support-files/mysql.server stop

 

우분투 Ubuntu
명령어 systemctl service /etc/init.d/
상태 확인 systemctl status apache2 service apache2 status /etc/init.d/apache2 status
시작 systemctl start apache2 service apache2 start /etc/init.d/apache2 start
정지 systemctl stop apache2 service apache2 stop /etc/init.d/apache2 stop
재시작 systemctl restart apache2 service apache2 restart /etc/init.d/apache2 restart
리로드 systemctl reload apache2 service apache2 reload /etc/init.d/apache2 reload
CentOS 센트오에스
명령어 systemctl service /etc/init.d/ httpd
상태 확인 systemctl status httpd service httpd stauts /etc/init.d/httpd status httpd -k status
시작 systemctl start httpd service httpd start /etc/init.d/httpd start httpd -k start
정지 systemctl stop httpd service httpd stop /etc/init.d/httpd stop httpd -k stop
재시작 systemctl restart httpd service httpd restart /etc/init.d/httpd restart httpd -k restart
리로드 systemctl reload httpd service httpd reload /etc/init.d/httpd reload httpd -k reload
728x90
300x250