Operating system CentOS 7
Linux, the default Apache installation software, the path is as the development of software personnel's habits, in the development process will often not know to the required program path, so the manual installation program for the subsequent use will provide a great convenience
A: Prepare
1. Install Apr
: http://apr.apache.org/download.cgi
[Email protected]:/usr/local/src]# tar zxvf apr-1.5.2.tar.gz
[[Email protected]:/usr/local/src/apr-1.5.2]#./configure--PREFIX=/USR/LCOAL/APR
[[Email protected]:/usr/local/src/apr-1.5.2]# make
[[Email protected]:/usr/local/src/apr-1.5.2]# make install
2. Installing Apr-util
: http://apr.apache.org/download.cgi
[Email protected]:/usr/local/src]# tar zxvf apr-util-1.5.4.tar.gz
[[Email protected]:/usr/local/src/apr-util-1.5.4]#./configure--prefix=/usr/lcoal/apr-util--with-apr=/usr/lcoal/ Apr
[[Email protected]:/usr/local/src/apr-util-1.5.4]# make
[[Email protected]:/usr/local/src/apr-util-1.5.4]# make install
3. Installing Pcre
: http://pcre.org/
[Email protected]:/usr/local/src]# tar jxvf pcre-8.37.tar.gz
[[Email protected]:/usr/local/src/pcre-8.37]#./configure--prefix=/usr/lcoal/pcre
[[Email protected]:/usr/local/src/pcre-8.37]# make
[[Email protected]:/usr/local/src/pcre-8.37]# make install
Note: If you encounter problems when you install Pcre: Configure:error:You need a C + + compiler for C + + support.
Workaround:yum install-y gcc gcc-c++
II: Install Apache
: http://httpd.apache.org/
[Email protected]:/usr/local/src]# tar zxvf httpd-2.4.16.tar.gz
[Email protected]:/usr/local/src/httpd-2.4.16]#/configure--prefix=/usr/lcoal/apache--WITH-APR=/USR/LCOAL/APR- -with-apr-util=/usr/lcoal/apr-util--with-pcre=/usr/lcoal/pcre
[[Email protected]:/usr/local/src/httpd-2.4.16]# make
[[Email protected]:/usr/local/src/httpd-2.4.16]# make install
Three: Configuration
1. Start
[[email protected]:/usr/local/apache]#./bin/apachectl start
2. Boot up
Open File:/etc/rc.local
[[Email protected]:/]# vim/etc/rc.local
Added:/work/installed/apache/bin/apachectl start
OK, http://localhost OR http://ip.
LINUX under source installation Apache