linux安装discuz

本文详细记录了在CentOS 6.3环境下从零开始安装Discuz所需的Apache和PHP的过程,包括解决编译过程中遇到的APR及libxml2缺失等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考网络上的教程,在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

 

安装成功的标志是



继续make && make install ,提示“无法分配内存”,内存太低了......


解决方法:在./configure 中加上 --disable-fileinfo,安装成功:





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值