0

Essentially I am installing apache2.4 onto centOs6.6 using the Apache2 CHEF cookbook. I have it working to the point where all the service commands work minus the

 sudo service httpd24-httpd graceful 

command, unfortunately the chef script will not complete without that service. It provides me with the following error:

/opt/rh/httpd24/root/usr/sbin/apachectl: line 112: /usr/bin/systemctl: No such file or directory

sure enough that file (systemctl) isn't there. The cookbook is just deferring to yum to install apache - so I am a bit confused as to why it isn't installed, IF it is needed. How is systemctl installed on centos?

Folow up question: Isn't systemctl an ubuntu app? If is my apache24 install messed up OR does apache24 have a reliance on this?


So I retried on a fresh VM

 cd /yum/repos.d
 wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
sudo yum install httpd24
sudo service httpd24-httpd graceful

Then a

/opt/rh/httpd24/root/usr/sbin/apachectl: line 116: /usr/bin/systemctl: No such file or directory

It doesn't look to be associated with the cookbook at all. It looks tobe completely associated with the httpd24 install

8
  • 1
    Looks like you have cookbook, written for Centos 7. systemctl doesn't present in Centos 6 Apr 21, 2016 at 9:34
  • I am not sure it is the cookbok though. Isn't apachectl installed by httd24? If so wouldn't that be a bug in the apache instal? If it is in the cookbook it should be easier to fix...
    – akaphenom
    Apr 21, 2016 at 11:15
  • It looks like httpd24 to me...
    – akaphenom
    Apr 21, 2016 at 12:25
  • So repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo has another version of httpd24. with systemctl use in init script. I'll try to reproduce your issue on my environment Apr 21, 2016 at 12:43
  • Is that not the repo to use? I am really not a devops or even ops guy - I am trying to plug a hole for a couple of weeks... And this is keping my engineers from deploying, so it has become my priority. And thank you for your assistance
    – akaphenom
    Apr 21, 2016 at 12:46

2 Answers 2

0

Looks like a some bug. I reproduced your steps and received the same. With this package you can use all commands except "graceful". so try

sudo service httpd24-httpd restart or
sudo service httpd24-httpd reload

instead of sudo service httpd24-httpd graceful

0

The new init system on CentOS 7 is systemd. You control that with systemctl.

1
  • I am on centOs 6, it looks as though the httpd24 - particualrtly th egraceful command isn't working on centOs 6. If you peak at my update, you can see my experiment.
    – akaphenom
    Apr 21, 2016 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .