3

I extracted the httpd...tar.gz from here, but I don't see apachectl.

[vagrant@centos48 opt]$ ls
httpd-2.2.23  httpd-2.2.23.tar.gz
[vagrant@centos48 httpd-2.2.23]$ find . -name apachectl
[vagrant@centos48 httpd-2.2.23]$ 
0

2 Answers 2

5

This is because you did not build the code. You downloaded the source code. So, you need to build it first to create the binaries and libraries.

5
  • 1
    So apachectl doesn't come with the binary? Why? Jan 15, 2013 at 15:41
  • @Kevin: It seems to me that you downloaded the source code not the binary. If you downloaded the binary, you should find it already there.
    – Khaled
    Jan 15, 2013 at 15:42
  • I downloaded httpd-2.2.23.tar.gz from the above link, and then extracted it using 'tar -zxvf {file.tar.gz}' Jan 15, 2013 at 15:47
  • 1
    @Kevin: Yes, that's the source code.
    – mattdm
    Jan 15, 2013 at 16:01
  • Doh! #Homer. I should've noticed that there wasn't a bin directory. Thanks Jan 15, 2013 at 16:11
4

You have downloaded the source code. apachectl is in there, but it's only in source form. You'd have to compile that and install the resulting binary.

But, unless you have a special need, don't. Instead,

yum install httpd

That will get you the compiled package, properly configured with a basic setup, and with all of the tools, including /usr/sbin/apachectl.

The version of Apache is slightly older than the one you've downloaded, but it includes backported security patches, and we're way past the era when new minor releases of Apache included very exciting new features, so it's unlikely that you really need it.

You must log in to answer this question.

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