标签:下载地址 shared 官方网站 mysql local
apache官方网站下载地址 http://www.apache.org/dyn/closer.cgi 下载的版本根据你的平台和需求而定。
下载mysql到/usr/local/src/
[root@localhost mysql]# cd /usr/local/src/ [root@localhost src]# wget http://mirrors.sohu.com/apache/httpd-2.2.31.tar.bz2
解压
[root@localhost src]# tar jxf httpd-2.2.31.tar.bz
配置编译参数
[root@localhost src]# cd httpd-2.2.31 [root@localhost httpd-2.2.31]# ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --with-pcre
--prefix
指定安装到哪里, --enable-so
表示启用DSO [1] --enable-deflate=shared
表示共享的方式编译deflate,后面的参数同理。
常见错误
error: mod_deflate has been requested but can not be built due to prerequisite failures
解决办法是:
[root@localhost httpd-2.2.31]# yum install -y zlib-devel
为了避免在make的时候出现错误,所以最好是提前先安装好一些库文件:
[root@localhost httpd-2.2.31]# yum install -y pcre pcre-devel apr apr-devel
checking for chosen layout... apr checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/usr/local/src/httpd-2.2.31/srclib/apr‘: configure: error: no acceptable C compiler found in $PATH See `config.log‘ for more details configure failed for srclib/apr
解决办法是:
[root@localhost httpd-2.2.31]# yum install -y gcc
编译
[root@localhost httpd-2.2.31]# make
需要修改的地方有 “datadir=/data/mysql” (前面初始化数据库时定义的目录)
安装
[root@localhost httpd-2.2.31]# make install
以上两个步骤都可以使用 echo $?
来检查是否正确执行,否则需要根据错误提示去解决问题。
本文出自 “ITunics” 博客,请务必保留此出处http://unics.blog.51cto.com/11776952/1794742
标签:下载地址 shared 官方网站 mysql local
原文地址:http://unics.blog.51cto.com/11776952/1794742