...
部署环境
yum -y install gcc make zlib-devel pcre pcre-devel openssl-devel
安装
httpd-2.4.37.tar.gz
下载
httpd-2.4.37.tar.gz
解压
httpd-2.4.37.tar.gz
进入 httpd-2.4.38 目录
配置
./configure --prefix=/usr/local/apache2
这时候会报错
APR not fount.Please read the documentation
需要下载APR
wget https://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
解压
tar xf apr-1.4.5.tar.gz
进入APR目录
cd apr-1.4.5
配置
./configure --prefix=/usr/local/apr
安装
make && make install
继续配置apache cd httpd-2.4.37
./configure --prefix=/usr/local/apache2
报错
APR-util not found
这时候还需要下载apr-util安装包
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
解压
tar xf apr-util-1.3.12.tar.gz
进入解压目录
cd apr-util-1.3.12
配置
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr
安装
make && make install
这时候再apache目录配置apache
cd ..
./configure --prefix=/usr/local/apache -with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util/
make && make install
/usr/local/apache2/bin/apachectl
cd /usr/local/apache2/conf
vim httpd.conf
找到这行 ServerName www.example.com:80
./apachectl start 启动
./apachectl stop 关闭
查看端口
lsof -i:80
下载安装包网址
https://archive.apache.org/dist/apr/
网站上这个文档也可以搭建出来
https://netix.dl.sourceforge.net/project/pcre/pcre/8.40/pcre-8.40.tar.gz
...