[size=18px]httpd安装[/size]
httpd 依赖apr和apr-util
下载地址: [url=http://apr.apache.org/download.cgi][/url]
安装apr
[root@xt test]# wget http://mirror.bit.edu.cn/apache//apr/apr-1.5.2.tar.gz
[root@xt test]# tar -zxf apr-1.5.2.tar.gz
[root@xt test]# cd apr-1.5.2
[root@xt apr-1.5.2]# ./configure --prefix=/usr/local/apr
[root@xt apr-1.5.2]# make
[root@xt apr-1.5.2]# make install
安装apr-util
[root@xt test]# wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
[root@xt test]# tar -zxf apr-util-1.5.4.tar.gz
[root@xt test]# cd apr-util-1.5.4
[root@xt apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
[root@xt apr-util-1.5.4]# make
[root@xt apr-util-1.5.4]# make install
httpd 下载地址: [url=http://httpd.apache.org/download.cgi#apache24][/url]
安装httpd
[root@xt test]# wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.4.20.tar.gz
[root@xt test]# tar -zxf httpd-2.4.20.tar.gz
[root@xt test]# cd httpd-2.4.20
[root@xt test]# ./configure --prefix=PREFIX
[root@xt test]# make
[root@xt test]# make install
测试命令: PREFIX/bin/apachectl -k start
configure: error: no acceptable C compiler found in $PATH: 解决办法
#yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel
如果apr或者apr-util已经安装但提示找不到的解决办法:
在./configure --prefix=/etc/httpd/后面加上 -with- apr=PREFIX
"PREFIX" 为你安装的apr路径/usr/local/apr或者是"/usr/local/apr/bin/apr-1-config"
httpd 依赖apr和apr-util
下载地址: [url=http://apr.apache.org/download.cgi][/url]
安装apr
[root@xt test]# wget http://mirror.bit.edu.cn/apache//apr/apr-1.5.2.tar.gz
[root@xt test]# tar -zxf apr-1.5.2.tar.gz
[root@xt test]# cd apr-1.5.2
[root@xt apr-1.5.2]# ./configure --prefix=/usr/local/apr
[root@xt apr-1.5.2]# make
[root@xt apr-1.5.2]# make install
安装apr-util
[root@xt test]# wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
[root@xt test]# tar -zxf apr-util-1.5.4.tar.gz
[root@xt test]# cd apr-util-1.5.4
[root@xt apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
[root@xt apr-util-1.5.4]# make
[root@xt apr-util-1.5.4]# make install
httpd 下载地址: [url=http://httpd.apache.org/download.cgi#apache24][/url]
安装httpd
[root@xt test]# wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.4.20.tar.gz
[root@xt test]# tar -zxf httpd-2.4.20.tar.gz
[root@xt test]# cd httpd-2.4.20
[root@xt test]# ./configure --prefix=PREFIX
[root@xt test]# make
[root@xt test]# make install
测试命令: PREFIX/bin/apachectl -k start
configure: error: no acceptable C compiler found in $PATH: 解决办法
#yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel
如果apr或者apr-util已经安装但提示找不到的解决办法:
在./configure --prefix=/etc/httpd/后面加上 -with- apr=PREFIX
"PREFIX" 为你安装的apr路径/usr/local/apr或者是"/usr/local/apr/bin/apr-1-config"