参考网络上的教程,在CentOS 6.3下安装discuz
1.安装Apache
下载http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.6.tar.gz
今日编译apache时出错:
#./configure --prefix……检查编辑环境时出现:
checking for APR... no
configure: error: APR not found . Please read the documentation
解决办法:
1.下载所需软件包:
1.wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
2.wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
3.wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
2.编译安装:
1.yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs
具体步骤如下:
提示缺少apr,解决apr not found问题>>>>>>(可参考:http://www.linuxidc.com/Linux/2012-06/62289.htm)
1.[root@xt test]# tar -zxf apr-1.4.5.tar.gz
2.[root@xt test]# cd apr-1.4.5
3.[root@xt apr-1.4.5]# ./configure --prefix=/usr/local/apr
4.[root@xt apr-1.4.5]# make && make install
5.
b:解决APR-util not found问题>>>>
1.[root@xt test]# tar -zxf apr-util-1.3.12.tar.gz
2.[root@xt test]# cd apr-util-1.3.12
3.[root@xt apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
4.[root@xt apr-util-1.3.12]# make && make install
执行以上操作时,make遇到错误,解决方法:http://hi.baidu.com/wh_as/item/3b6f354458f6eb2811ee1ef4
最后一条指令:./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --prefix=/usr/local/apache2 --enable-module=so
终于完成安装。
2.接下来安装php
wget下载:wget http://cn2.php.net/get/php-5.4.19.tar.gz/from/this/mirror
tar -zxvf php-5.0.4.tar.gz
mv php-5.0.4 php
cd php
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-MySQL
安装报错:
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
检查是否安装了libxm包
[root@XKWB3403 php-5.3.8]# rpm -qa |grep libxml2
libxml2-2.6.26-2.1.12
libxml2-python-2.6.26-2.1.12
重新安装libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y
安装完之后查找xml2-config文件是否存在
[root@XKWB3403 php-5.3.8]# find / -name "xml2-config"
/usr/bin/xml2-config
如果存在的话重新安装php
[root@XKWB3403 php-5.3.8]# ./configure
安装成功的标志是
解决方法:在./configure 中加上 --disable-fileinfo,安装成功: