操作系统:CentOS6.5(x86_64)
安装方式:源码安装 & RPM包
安装目录:/opt/
安装文件:
(1) Apache Httpd(V2.2.x)
(2) MySQL(V5.5)
a) client(V5.5.36)
b) server(V5.5.36)
(3) PHP(V5.3.x)
一、Httpd
1. 卸载旧版本
卸载系统自带httpd(V2.2.15-29)
yum remove httpd
2. 安装
tar httpd-2.2.26.tar.gz cd httpd-2.2.26 ./configure --prefix=/opt/httpd --enable-so --enable-rewrite make make install
二、MySQL
1. 卸载旧版本libs
yum remove mysql-libs
2. 安装
客户端[root@localhost ~]# rpm –ivh MySQL-client-5.5.36-1.el6.x86_64.rpm服务器端
[root@localhost ~]# yum install MySQL-server-5.5.36-1.el6.x86_64.rpm
三、PHP
1. 依赖包安装
yum install libxml2-devel curl-devel libjpeg-devel libpng-devel libtool-ltdl-devel如果系统没有安装普通包,则安装之。默认已安装。
安装libmcrypt包(RPM包)
rpm –ivh libmcrypt-2.5.8-9.el6.x86_64.rpm rpm –ivh libmcrypt-devel-2.5.8-9.el6.x86_64.rpm
2. 安装
tar zxvf php-5.3.28.tar.gz cd php-5.3.28 ./configure --prefix=/opt/php \ --with-apxs2=/opt/httpd/bin/apxs --with-curl --with-mcrypt --enable-mbstring --with-iconv --with-gd --with-jpeg-dir=/usr/local/lib --enable-pdo --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd make make install
(1) 建立ini文件
当前目录为:php-5.3.28
cp php.ini-development /opt/php/lib/php.ini
(2) 建立软链接
ln -s /opt/php/bin/php /usr/bin/php