~ $ service httpd restart
# or
~ $ systemctl restart httpd
위와 비슷하게 서비스를 시작/중지할 때,
Failed to restart httd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status httd.service' for details.
1. 해당 에러가 발생한다면 우선 메세지대로 "systemctl status httpd.service"를 실행합니다.
~ $ systemctl status httpd.service
2. 이 때, 오류의 원인은 매우 다양하므로 위 명령어 결과를 유심히 확인합니다.
저의 경우에는 권한이 문제인 경우만 확인했지만, 다른 분들의 글들을 확인해보면
다른 기타 문제인 경우에는 'no listening...', 'fail...'와 같은 메세지가 표시되는 것으로 보입니다.
3. 만약 그런 메세지가 안보이고 정상처럼 보인다면
현재 명령어를 실행하는 계정이 root가 아닌 일반 사용자라서 권한이 문제인 경우일 가능성이 크므로
아래처럼 명령어 앞에 sudo를 붙여줘서 해당 명렁어를 root 권한으로 실행할 수 있도록 합니다.
~ $ sudo service httpd restart
# or
~ $ sudo systemctl restart httpd
- 문의와 피드백은 언제나 환영입니다 ( •̀ .̫ •́ )✧ -
'Server > Linux' 카테고리의 다른 글
[Linux][Laravel] npm run prod(production) 오류(sh: mix: command not found) (0) | 2023.04.05 |
---|---|
[Linux] Java 설치하기 (0) | 2023.04.04 |
[Amazon Linux 2] php 버전 업그레이드 (0) | 2023.03.23 |
[Linux][MySQL] 패스워드를 분실한 경우 재설정하는 방법 (0) | 2023.03.16 |
[Linux] 파일 위치 찾기 (0) | 2023.03.16 |