cd /lamp
tar apr
./configure --prefix=/lamp/apr
make
make install
cd ..
tar zxvf apr-util
cd apr-util-
./configure --prefix=/lamp/apr-util --with-apr=/lamp/apr/bin/apr-1-config
make
make install
cd ..
tar zxvf pcre
cd pcre
./configure --prefix=/lamp/pcre
make
make install
cd ..
tar zxvf httpd-
cd httpd
./configure --prefix=/lamp/apache --with-apr=/lamp/apr --with-apr-util=/lamp/apr-util/ --with-pcre=/lamp/pcre
systemctl stop firewalld
cd /lamp
service httpd start
tar apr
./configure --prefix=/lamp/apr
make
make install
cd ..
tar zxvf apr-util
cd apr-util-
./configure --prefix=/lamp/apr-util --with-apr=/lamp/apr/bin/apr-1-config
make
make install
cd ..
tar zxvf pcre
cd pcre
./configure --prefix=/lamp/pcre
make
make install
cd ..
tar zxvf httpd-
cd httpd
./configure --prefix=/lamp/apache --with-apr=/lamp/apr --with-apr-util=/lamp/apr-util/ --with-pcre=/lamp/pcre
systemctl stop firewalld
cd /lamp
service httpd start
然后打开浏览器,输入www.你的IP/即可访问Apache