Tuesday, May 30, 2017

linux - installing latest apache on centos



I'm trying to install the newest version of apache on my centos server. I did the following:




Download   $ wget http://httpd.apache.org/path/to/latest/version/
Extract $ gzip -d httpd-2_0_NN.tar.gz
$ tar xvf httpd-2_0_NN.tar
Configure $ ./configure
Compile $ make
Install $ make install
Test $ PREFIX/bin/apachectl start


And that all worked except the last step, when i type apachectl start it says 'command not found'. I ran this command from /usr/local/apache2/bin/ where it is installed but no cigar. Any idea what i am doing wrong? Thanks.


Answer




It's not working because you're literally giving it the string PREFIX/bin/apachectl start instead of replacing PREFIX with the location into which you installed Apache, as the instructions you are following intend.



In your case, that's apparently /usr/local/apache2, so run



/usr/local/apache2/bin/apachectl start


But, that still leaves us with the larger issue of Why Are You Doing This? The vendor packages provided by CentOS include bug fixes and security patches, and in fact are regularly updated to ensure that newly-discovered issues are fixed.



Meanwhile, Apache development within the 2.2.x branch is rather conservative, and there aren't major new features (if any!) you'll gain by going with 2.2.17 (the current latest). And, that's not even going into the fact that you seem to have gotten the rather old 2.0 version. Did you maybe want the incompatible, unstable 2.3 development version?



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...