L9-3.安装PHP软件包

安装扩展工具包:

image

查看是否安装成功:

image

做软连接:

image

 

 

安装libxml

先安装python:

image

 

image

image

 

做软连接:

image

 

同样安装

libmcrypt和mhash

image

make && make install

image

 

image

 

make && make install

image

 

 

安装mcrypt

image

image

 

安装libpng:

image

make && make install

image

 

安装libiconv

image

make && make install

image

 

安装freetype

安装autoconf

image

 

安装jpeg-9a

image

安装libgd

image

gettxt

image

 

安装gettxt

 

安装PHP

image

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/httpd/bin/apxs --with-openssl --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir=/usr/local/zlib --with-libxml-dir=/usr/local/libxml2 --with-mhash --with-png-dir=/usr/local/libpng --with-iconv-dir=/usr/local/libiconv --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg --with-gd=/usr/local/libgd --enable-mbstring=all --enable-sockets --enable-libxml --enable-soap --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-gd-native-ttf --enable-pcntl --with-xmlrpc --enable-zip --enable-phar --without-pear --enable-ftp --enable-maintainer-zts --disable-rpath --with-gettext --enable-opcache=no --with-xpm-dir=/usr/lib64

 

make && make install

出了个错误:

image

重新做个软连接

image

 

重新./configure 没有报错:

image

 

 

 

安装成功:

image

 

进行php配置:

image

 

修改字符集:

image

 

整合:

vim /usr/local/httpd/conf/httpd.conf

image

image

重启httpd,新建测试php文件

image

image

 

 

检验:

image

 

image

 

image

 

至此LAMP环境搭建成功!

posted @ 2014-08-16 22:43  hmilyjch  阅读(260)  评论(0编辑  收藏  举报