Upgrading Apache 2.2 to 2.4 on CentOS 6.x
-sh-4.1$ /usr/local/apache2/bin/apachectl -v
Server version: Apache/2.4.20 (Unix) Server built: Apr 9 2018 13:16:08 -sh-4.1$ httpd -v Server version: Apache/2.2.15 (Unix) Server built: Aug 15 2017 19:44:58 -sh-4.1$ cat /etc/redhat-release CentOS release 6.9 (Final) All - As above mentioned details, CentOs 6.x doesn't support Http v2.4 and it needs to be installed through Apr/Apr-Util packages. I have both the http versions running. I would like to know how to make my existing application to use new version of apache ? If i stop older http version (2.2) , "httpd -v" command won't work but i need to use "apachectl -v". Kindly advise. |
Hi and welcome to LQ,
Quote:
For this run, as root: Code:
chkconfig httpd off Code:
/usr/local/apache2/bin/apachectl start Regards |
"If you want to be more productive, you can edit the original /etc/init.d/httpd startup script and add your apache installation as the httpd service, instead of the original httpd. "
Hi Bathory - Would you let me know in detail on above ? I want to print version 2.4 on httpd command. |
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd} prog=httpd Above are the line in /etc/init.d/httpd script. If i change as below, will it work ? apachectl=/usr/sbin/apachectl httpd=$apachectl prog=httpd |
Quote:
Code:
export PATH=/usr/local/apache2/bin:$PATH Quote:
|
Awesome Bathory !
It worked -sh-4.1$ httpd -v Server version: Apache/2.4.20 (Unix) Server built: Apr 9 2018 13:16:08 |
Quote:
Now that it worked, consider updating it to the latest version (2.4.33) for security reasons. Regards |
All times are GMT -5. The time now is 11:54 PM. |