service httpd start doesn't work

Issues related to configuring your network
Post Reply
WygufSeak
Posts: 1
Joined: 2014/07/20 14:41:14

service httpd start doesn't work

Post by WygufSeak » 2014/07/20 14:57:08

I want to start apache.

Code: Select all

service httpd start
returns the following:

Code: Select all

redirecting to /sbin/systemctl start httpd.service
job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details
this returns I have a syntax error in /etc/httpd/conf/httpd.conf on line 36

What is the default server root path? I must've changed this by accident..

Is there an official alternative to the service command in CentOS7?
Now I have to

Code: Select all

/etc/init.d/httpd start
instead of just

Code: Select all

service httpd start
Is this depreciated? What command is superseeded?

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: service httpd start doesn't work

Post by scottro » 2014/07/20 16:50:18

Yes, I think it's supposed to still work, but now one uses systemd. There are various cheatsheets around. https://fedoraproject.org/wiki/SysVinit ... Cheatsheet is pretty good.

In this case it's systemctl start httpd.service

Defautl ServerRoot should be /etc/httpd
New users should check the FAQ and Read Me First pages

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: service httpd start doesn't work

Post by TrevorH » 2014/07/20 17:18:05

Running service httpd start still works but it tells you that it's going to run the correct thing for you, as your output clearly shows. But if you have a syntax error then neither one will work so you need to fix that first.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

igsmigs88
Posts: 29
Joined: 2014/07/23 20:46:29

Re: service httpd start doesn't work

Post by igsmigs88 » 2014/07/24 16:53:54

run systemctl start httpd.service

Greg_E
Posts: 143
Joined: 2014/04/04 18:53:45

Re: service httpd start doesn't work

Post by Greg_E » 2014/08/03 17:02:10

I'm pretty sure I've been lazy and used just systemctl start httpd leaving off the .service and it is smart enough to still start the service. Isn't the d for daemon which is pretty much the same thing as a service?

altiris
Posts: 334
Joined: 2013/05/31 01:27:50

Re: service httpd start doesn't work

Post by altiris » 2014/08/04 05:19:00

Greg_E wrote:I'm pretty sure I've been lazy and used just systemctl start httpd leaving off the .service and it is smart enough to still start the service. Isn't the d for daemon which is pretty much the same thing as a service?
Same with me, there's a bit of weird things in this version. This is off topic but I've noticed now to install mysql it's been re branded to mariadb yet I can still use "mysql -u root -p" to log in, as well as using the php mysql extension. I understand this may make it easier for previous CentOS users but it makes even harder for new users. Existing centos users aren't dumb, we will know just to replace mysql with mariadb if that's what's being used now, instead we need to use a mix of both commands.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: service httpd start doesn't work

Post by gerald_clark » 2014/08/04 05:33:36

MariaDB is a fork of MySQL
It wouldn't be a dropin replacement if all the clients and libraries had their names changed.

Post Reply