-
Installing newer versions requires a different version of the dependency,
Install dependencies before installing
Apr-1.5. version above
apr-util-1.5 or later
Pcre-devel
1 Installing Apr:
Tar zxvf apr-1.5.4.tar.gz
CD apr-1.5.4
./configure–prefix=/usr/local/apr
Make &make Install
2 Installing apr-util
Tar zxvf apr-util-1.5.4.tar.gz
CD apr-util-1.5.4
./configure–prefix=/usr/localapr-util–with-apr=/usr/local/apr
Make&make Install
3 Installing pcre-devel
Yum Install Pcre-devel–y
4 Installing httpd
Tar ZXVF httpd-2.4.4.tar.gz
Cd httpd-2.4.4
./configure--prefix=usr/local/apache
--sysconfdir=/etc/httpd/httpd.conf
--enable-so
--enable-rewirte
--enable-cgi
--enable-cgid
--enable-modules=most
--enable-mods-shared=most
--enable-mpms-shared=all
--with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util
Make&make Install
Editing a configuration file ( there may be no ServerName localhost:80 in the default , you need to add it )
Vim/etc/httpd/httpd.conf
Add ServerName localhost:80 * * * * if not added will be an error, please close the service before adding * * *
and add httpd pidfile:pidfile "/var/run"
3. Write the startup script under /etc/init.d/vim/etc/init.d/httpd ( httpd)
Add path: vim/etc/profile.d/httpd.sh
Export path= $PATH:/usr/local/apache/bin
And then reconnect to it.
This article is from the "10044528" blog, please be sure to keep this source http://10054528.blog.51cto.com/10044528/1718351
Linux Compilation Installation HTTPD notes