当前位置: 代码迷 >> 综合 >> Ubuntu 安装 httpd
  详细解决方案

Ubuntu 安装 httpd

热度:81   发布时间:2023-12-15 15:01:27.0

1.下载httpd

 

下载地址 http://httpd.apache.org/download.cgi
2.直接安装
./configure --prefix=/usr/local/apache2
出现问题:configure: error: APR not found 
说明缺少APR,因此,需要安装相应的库。
3.下载相应的库
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
4.安装APR,解决APR not found的问题
tar -zxf apr-1.4.5.tar.gz  
cd  apr-1.4.5  
./configure --prefix=/usr/local/apr  
make && make install 
5.安装apr util,解决APR-util not found问题
tar -zxf 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
6.安装pcre,解决pcre问题
 
unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/local/pcre
make && make install

7.进入httpd解压后的文件夹,安装httpd
 
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl --with-ssl=/usr/local/openssl

make && make install

安装后的文件夹位置是:/usr/local/httpd
 

欢迎关注公众号: