RHEL 7에서 httpd를 시작할 수 없습니다.
[root@machine]# systemctl restart httpd
Failed to restart httpd.service: Unit not found.
나는 노력했다 ...
yum update -y
yum install httpd -y
systemctl restart httpd
같은 결과. Apache 구성은 괜찮아 보입니다.
[root@machine]# httpd -t
Syntax OK
Red Hat Enterprise Linux 서버 버전 7.7(Maipo)
[root@machine me]# rpm -q httpd
httpd-2.4.6-90.el7.x86_64
...
[root@machine me]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-01-27 15:38:54 CST; 1 day 16h ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 36851 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 36849 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 36849 (code=exited, status=1/FAILURE)
Jan 27 15:38:54 faspbsy0002 httpd[36849]: (98)Address already in use: AH0007...0
Jan 27 15:38:54 faspbsy0002 httpd[36849]: (98)Address already in use: AH0007...0
Jan 27 15:38:54 faspbsy0002 httpd[36849]: no listening sockets available, sh...n
Jan 27 15:38:54 faspbsy0002 httpd[36849]: AH00015: Unable to open logs
Jan 27 15:38:54 faspbsy0002 systemd[1]: httpd.service: main process exited, ...E
Jan 27 15:38:54 faspbsy0002 kill[36851]: kill: cannot find process ""
Jan 27 15:38:54 faspbsy0002 systemd[1]: httpd.service: control process exite...1
Jan 27 15:38:54 faspbsy0002 systemd[1]: Failed to start The Apache HTTP Server.
Jan 27 15:38:54 faspbsy0002 systemd[1]: Unit httpd.service entered failed state.
Jan 27 15:38:54 faspbsy0002 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
답변1
httpd
찾을 수 없는 장치가 제대로 서비스되지 않는 것 같습니다 .
다음을 시도해 보세요
systemctl is-enabled httpd
systemctl is-active httpd
둘 다 다시 나타나면 먼저 구성을 백업하고 다시 설치해 unit not found
보십시오 .httpd
yum remove httpd
yum search apache
yum install httpd
답변2
문제는 표준 버전과 Red Hat Software Collections 버전이라는 두 가지 버전의 Apache가 설치되어 있다는 것입니다.
[root@faspbsy0002 httpd24]# yum list installed | grep httpd
httpd.x86_64 2.4.6-90.el7 @rhel-7-server-rpms
httpd-tools.x86_64 2.4.6-90.el7 @rhel-7-server-rpms
httpd24-httpd.x86_64 2.4.34-7.el7.1 @rhel-server-rhscl-7-rpms
httpd24-httpd-tools.x86_64 2.4.34-7.el7.1 @rhel-server-rhscl-7-rpms
httpd24-libcurl.x86_64 7.61.1-2.el7 @rhel-server-rhscl-7-rpms
httpd24-libnghttp2.x86_64 1.7.1-7.el7 @rhel-server-rhscl-7-rpms
httpd24-mod_ssl.x86_64 1:2.4.34-7.el7.1 @rhel-server-rhscl-7-rpms
httpd24-runtime.x86_64 1.1-18.el7 @rhel-server-rhscl-7-rpms
Apache를 다시 시작하려면 다음을 수행해야 합니다.
systemctl restart httpd24-httpd
아마도 사용하지 않는 Apache 버전도 제거해야 할 것입니다.
나도 찾았어httpd-V이 경우에는 표준 Apache httpd_root 및 document_root를 제공하지만 이는 사용되는 Apache가 아니기 때문에 오해의 소지가 있습니다.