3 编译安装apache 小记
1 准备工作:
pcre8.44: https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz/download
httpd-2.4.43.tar.gz : https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.43.tar.gz
apr-1.7.0.tar.gz : https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gz
apr-iconv-1.2.2.tar.gz https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-iconv-1.2.2.tar.gz
apr-util-1.6.1.tar.gz https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
2 下载并解压
wget :
tar -zxvf xxx
3 编译安装
pcre:
./configure
make && make install
apr :
./configure --prefix=/usr/local/apr-1.7.0
make && make install
apr-iconv:
./configure --with-apr=/usr/local/apr-1.7.0
make && make install
apr-util-1.6.1:
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr-1.7.0
make && make install
编译安装apche:
./configure --prefix=/usr/local/apache --sysconfdir=/etc/apache --enable-mpms-shared=all --with-z --with-pcre --with-apr=/usr/local/apr-1.7.0 --with-apr-util=/usr/local/apr-util --with-mpm=event
make && make install
4 测试其是否正常。
添加环境变量:
vim /etc/profile.d/httpd.sh export PATH=/usr/local/apache/bin:$PATH
使用 apachectl start 启动
查看端口,80 开放
页面打开 it work