Install Apache 2.4 on CentOS using yum
Apache 2.4 on CentOS:
Step 1:
cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
Step 2:
yum install httpd24.x86_64
Step 3:
$ /opt/rh/httpd24/root/usr/sbin/httpd -version
Server version: Apache/2.4.6 (Red Hat)
Server built: Sep 25 2013 05:25:46
NOTE: config files are in: /opt/rh/httpd24/root/etc/httpd
$ ls
conf conf.d conf.modules.d logs modules run
EDIT: in case you want to switch off Apache 2.2
$ chkconfig httpd off
$ chkconfig --list | grep httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
httpd24-httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
EDIT 2: http://wiki.apache.org/httpd/PHP-FPM
yum install php-fpm
/etc/init.d/php-fpm start
Related videos on Youtube
roaima
International IT Director for Mission Without Borders, an international Christian charity helping families and children in six of the poorest countries in Eastern Europe: Albania, Bosnia and Herzegovina, Bulgaria, Moldova, Romania, and Ukraine. Longtime Unix/Linux user (first used 1984, professional since 1988). Enjoying a bit of a change with Windows (professional, on and off, since 1988). Know which I prefer. Ad hoc consulting enquiries welcome by email to info @ roaima.co.uk. (I try to reply to everyone. Please check your spam folder for replies as Gmail really doesn't like me.) Feel free to buy me a coffee should you want to do so. I can particularly recommend Machu Picchu from Café Direct if you'd like to try something yourself. Or you can donate to Mission Without Borders and help our ongoing work in Ukraine and Eastern Europe. Have you tried the English tradition of bell ringing? You can read a story or a poem about it, or even watch a video if you prefer.
Updated on September 18, 2022Comments
-
roaima over 1 year
I need Apache 2.4 in CentOS because with Apache 2.2
mod_proxy_wstunnel
is not possible. I have tried this, but unfortunately its for RHEL. After installing, I can't execute the Apache 2.4.Can anyone show me how to install a complete working Apache 2.4 in CentOS, please?
EDIT:
# yum list installed | grep httpd Failed to set locale, defaulting to C httpd.x86_64 2.2.15-30.el6.centos @updates httpd-tools.x86_64 2.2.15-30.el6.centos @updates httpd24.x86_64 1-6.el6 @epel-httpd24 httpd24-apr.x86_64 1.4.8-2.el6 @epel-httpd24 httpd24-apr-util.x86_64 1.5.2-5.el6 @epel-httpd24 httpd24-httpd.x86_64 2.4.6-5.el6 @epel-httpd24 httpd24-httpd-tools.x86_64 2.4.6-5.el6 @epel-httpd24 httpd24-mod_ssl.x86_64 1:2.4.6-5.el6 @epel-httpd24 httpd24-runtime.x86_64 1-6.el6 @epel-httpd24
-
garethTheRed almost 10 years
-
Admin almost 10 yearsThank you. See my answer please, they way i requested, cause the original link is still confusing for someone to get started.
-
Admin over 9 yearsyou'll need to run yum install httpd24-httpd how do you install this to replace the Apache 2.2.15 that comes with the distro so I can install the update and use
httpd
instead ofhttpd24-httpd
with theservice start
andstop
commands? -
CpnCrunch about 6 yearsThe easiest way is to install the SCL version, as described here: unix.stackexchange.com/questions/412122/…
-
-
garethTheRed almost 10 yearsYou should be able to start the service with
# service httpd24-httpd start
. Before that you must either stop the original httpd service (apache 2.2) or configure your apache 2.4 to listen on an alternative port (not port 80). -
kc_sazzal over 9 years@garethTheRed: how to get ECDHE-RSA-AES256-SHA? with this its not available as a result you cant use SSLCiperSuite ECHDE.. is there any other repo which has this fixed?
-
garethTheRed over 9 yearsI'm not certain of the details of indivdual repos. If you can't find what you need, you could always compile the correct version for your system. If you don't want to do that on the actual server, you could also consider using the copr build system and use a CentOS 7 rpm source as a starting point.
-
szymond almost 9 yearsThe repo for me is quite useless. It still contains Apache/2.4.6 from 2013. That's quite disappointing that apache can't maintain its own repository...
-
CpnCrunch almost 8 yearsBeing an older version of apache isn't a problem. The 2.2.15 apache in Centos 6 is from 2010 after all. What is more of a problem is that it isn't updated with bugfixes and security fixes.
-
UncaAlby over 6 yearsHow can you tell the version number stored in the repository? I need to get 2.4.28.
-
CpnCrunch about 6 yearsHere is the best answer: unix.stackexchange.com/questions/412122/…
-
Mike Godin over 3 yearsPlease note that if you are using php, httpd24-httpd works best with rh-php## from the Red Hat Software Collections. I had php installed from the remi repository and it was not working as smoothly together.
-
aniskh over 2 yearsHello, I found this link very helpful nowadays: linode.com/community/questions/18167/…