명령어 종류 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 (중지)
'터미널' 카테고리의 다른 글
catalina.out 초기화하기 (톰캣재시작x) (0) | 2022.01.27 |
---|---|
디렉토리 용량 확인 (0) | 2022.01.26 |
터미널 간단 명령어 (0) | 2022.01.18 |
Vim - Vi 복사 붙이기 합치기 (0) | 2021.12.27 |
Vim - Vi 편집기 시작_ [커서이동 화면이동] (0) | 2021.12.27 |