Saturday, January 26, 2013
Failure when start service httpd on Fedora 18
Follow @drayanaindra
hai guys, i try install Feodra 18
mmm.. when i try install and start service httpd on my fedora 18. i find problem when will start service httpd.
this tutorial i can share the solution for this problem.
when typing :
sudo service httpd start
service respone and show this message :
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
you can check for the problem using :
sudo systemctl status httpd.service
and will show log:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Sun 2013-01-27 00:26:20 WIT; 9s ago
Process: 7518 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=0/SUCCESS)
Process: 7516 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
and then,
sudo journalctl -xn
and will show log:
-- Unit httpd.service has failed.
--
-- The result is failed.
Jan 27 00:26:20 tkl systemd[1]: Unit httpd.service entered failed state
Jan 27 00:26:30 tkl systemd[1]: SELinux Got Sender :1.132
Jan 27 00:26:50 tkl yum[6634]: Installed: libmng-1.0.10-8.fc18.x86_64
Jan 27 00:26:51 tkl yum[6634]: Installed: kde-filesystem-4-42.fc18.x86_64
Jan 27 00:26:52 tkl yum[6634]: Installed: qt-settings-4.9-16.fc18.1.noarch
Jan 27 00:26:53 tkl sudo[7598]: drayanaindra : TTY=pts/1 ; PWD=/home/drayanaindra ; USER=root ; COMMAND=/bin/journalctl -xn
now, you can cek your ServerName in /etc/httpd/conf/httpd.conf and config same with this :
ServerName localhost
cek your error log when will start your service using :
sudo tail -f /var/log/httpd/error_log
and in my fedora show :
[Sun Jan 27 00:29:38.704621 2013] [core:notice] [pid 7770] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Sun Jan 27 00:29:38.706668 2013] [suexec:notice] [pid 7770] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jan 27 00:29:39.201736 2013] [unique_id:alert] [pid 7770] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "tkl"
AH00016: Configuration Failed
check your hostname in /etc/hostname
tkl
and check your /etc/hosts, if in your configuration sam with this :
127.0.0.1 localhost.localdomain localhost
you can change with example :
127.0.0.1 localhost tkl
now, edit your SELINUX in /etc/selinux/config, SELINUX=disable
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
now, you can try
sudo service httpd start
and enjoy guys.. :)
Labels:
Linux
Subscribe to:
Post Comments (Atom)
thanks, got me out of trouble
ReplyDeleteyou are welcome...
DeleteThis comment has been removed by the author.
ReplyDeletethanks men!!! this tutorial helped me so much!! my regards from Mexico city :)
ReplyDelete