LAMP(Linux+Apache+Mysql+Php)环境搭建

参考http://blog.chinaunix.net/uid-24250828-id-2621386.html

参考http://jingyan.baidu.com/article/4b07be3c5cd75348b380f3c3.html

参考http://blog.sina.com.cn/s/blog_660a1d510101ek9g.html

参考http://blog.sina.com.cn/s/blog_51b349e501014jn1.html

参考http://blog.csdn.net/haitun312366/article/details/38638335

环境:Centos  7.1.1503 

一、先安装apache (源码安装)

1 官网下载Apache http://httpd.apache.org/  ,例如 httpd-2.4.12.tar.gz ,把文件放在共享文件夹中,以便在虚拟机中能获取;

2 进入该文件存放路径,解压文件 

cd /mnt/share

tar zxvf httpd-2.4.12.tar.gz

进入解压文件夹里面

cd httpd-2.4.12/

配置

 ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-mods-shared=all --enable-dav=share --enable-dav-fs  --enable-authn-alias --with-config-file-path=/usr/local/apache/conf --with-pcre=/usr/local/pcre

这一步,频频报错!!

【问题1】一开始报 APR not found的问题,即找不到依赖的APR包

(1)查找办法,发现需要下载三个依赖包,apr  apr-util  pcre 少其中一个都会报not found的问题

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

(2)解压依赖包

tar -xzvf apr-1.4.5.tar.gz

tar -xzvf apr-util-1.3.12.tar.gz

tar -xzvf pcre-8.10.zip

(3)安装apr-1.4.5

进入安装目录,    cd /opt/apr-1.4.5/

安装及编译,   ./configure --prefix=/usr/local/apr

make && make install

(4)安装apr-util

进入安装目录,  cd /opt/apr-util-1.3.12/

安装及编译,  ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make && make install

(5)安装pcre

进入安装目录,   cd /mnt/share/pcre-8.10/

安装及编译,  ./configure --prefix=/usr/local/pcre

make && make install

(6)重新安装apache

配置时需要加上--with参数指定我们刚才安装的依赖包位置

如:  --with-pcre=/usr/local/pcre


【问题2】  ./configure 参数加上--with-ldap --enable-ldap --enable-authnz-ldap 报错,无法找到ldap

没查到解决方法,也无法下载安装ldap,只能暂时先去掉这几个参数



3 接下来编译, make 又不停报错。。。。。。。。。。。。。。。。。

【问题1】 首先是一直报变量重复定义的错误

exports.c:2371:13: 错误:‘ap_hack_apu_version’重定义

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值