标签:
环境要求
gcc、gcc-c++、cmake、bison(可能)支持
1、yum install gcc gcc-c++ cmake bison
2、修改yum配置,达到搜索本地设置
移走或改名/etc/yum.repos.d/CentOS-Base.repo
修改 vi /etc/yum.repos.d/CentOS-Media.repo
baseurl=file:///mnt/cdrom
enabled=1
3、卸载原有的apache、mysql等
rpm -qa |grep mysql 是否安装
ps -le |grep mysql 进程是否启动
yum remove httpd 卸载
4、禁用SeLinux和Netfilter/iptables
vi /etc/sysconfig/selinux
Netfilter/iptables 防火墙(默认禁用80)
iptables -F 禁用
资源库要求
libxml2、libmcrypt、zlib、libpng、jpeg、freetype、gd、pcre、apr和apr-util 库
安装步骤
1、解压 .tar.gz tar -zxf
2、./configure 配置
3、make 编译
4、make install 安装、拷贝
----------------------------------------------------------------------
安装libxml2
./configure --prefix=/usr/local/libxml2/
----------------------------------------------------------------------
安装libmcrypt
./configure --prefix=/usr/local/libmcrypt/ --enable-ltdl-install
----------------------------------------------------------------------
安装zlib
./configure 不指定安装目录(指定后无法定位)
卸载不指定安装目录的程序
make install > /bakcup/zlib_20150905.install.log
----------------------------------------------------------------------
安装libpng
./configure --prefix=/usr/local/libpng/
----------------------------------------------------------------------
安装jpeg 要先手动创建所需的目录
mkdir /usr/local/jpeg
mkdir /usr/local/jpeg/bin
mkdir /usr/local/jpeg/lib
mkdir /usr/local/jepg/include
mkdir -p /usr/local/jepg/man/man1 同时创建多个目录
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
----------------------------------------------------------------------
安装freetype
./configure --prefix=/usr/local/freetype/
----------------------------------------------------------------------
安装gd 要用到之前安装的库
./configure --prefix=/usr/local/gd/ --with-jpeg=/usr/local/jpeg/ --with-freetype=/usr/local/freetype/
--enable-m4_pattern_allow(出错时可能用到该项)
----------------------------------------------------------------------
安装pcre
./configure --prefix=/usr/local/pcre/
----------------------------------------------------------------------
安装apache 用到之前安装的库
./configure --prefix=/usr/local/apache/ --sysconfdir=/etc/httpd/ --with-pcre=/usr/local/pcre/ --with-included
-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires-shared --enable-rewrite=shared --
enable-static-support
有的版本要求把apr和apr-util库复制到apache安装目录下的srclib下 或单独安装
----------------------------------------------------------------------
安装mysql 没有configure文件
添加mysql账户
/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
cmake -dcmake_install_prefix=/usr/local/mysql -dwith_extra_charsets:string=gbk,gb2312,utf8 -dwith_myisam_storage_engine=1 -dwith_innobase_storage_engine=1 -dwith_readline=1 -denabled_local_infile=1 -dmysql_datadir=/var/mysql-data/
----------------------------------------------------------------------
lamp环境编译(apache2.4.7 php5.4.25 mysql 5.5.23)
标签:
原文地址:http://www.cnblogs.com/bwteacher/p/4791157.html