복사금지 블로그 짜증나서 만든 개발문서
아파치, 우분투 서비스 상태 확인, 시작, 중지, 재시작 명령어
vnamu
2021. 3. 10. 11:45
반응형
명령어 종류 | systemctl | service | /etc/init.d/ | httpd |
우분투 (서비스명: apache2) | ||||
아파치 상태 확인 | 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 (서비스명: httpd) | ||||
아파치 상태 확인 | systemctl status httpd | service httpd status | /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 |
위의 표는 기본적인 아파치 상태 확인, 시작, 정지, 재시작, 리로드 명령어이다.
만약 카페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 (중지)
반응형