操作系统:CentOS6.6(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(V2.2.15-29)
yum remove httpd
tar httpd-2.2.26.tar.gz cd httpd-2.2.26 ./configure --prefix=/opt/httpd \ --enable-so \ --enable-rewrite make make install
yum remove mysql-libs
[root@localhost ~]# rpm –ivh MySQL-client-5.5.36-1.el6.x86_64.rpm服务器端
[root@localhost ~]# rpm -ivh MySQL-server-5.5.36-1.el6.x86_64.rpm
#client
[root@localhost ~]# yum remove MySQL-client-5.5.36-1.el6.x86_64
#server
[root@localhost ~]# yum remove MySQL-server-5.5.36-1.el6.x86_64
#client
[root@localhost ~]# rpm -ivh MySQL-client-5.5.43-1.el6.x86_64.rpm
#server
[root@localhost ~]# rpm -ivh MySQL-server-5.5.43-1.el6.x86_64.rpm
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
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
当前目录为:php-5.3.28
cp php.ini-development /opt/php/lib/php.ini
ln -s /opt/php/bin/php /usr/bin/php