lnmp的安装--php

1.下载php源码

wget http://cn2.php.net/distributions/php-5.6.3.tar.gz

tar zxvf php-5.6.3.tar.gz

cd php-5.6.3

2.安装依赖包

 这些依赖有libxml, libpng, libjpeg, libmcrypt...等

 根据提示进行操作,如:yum install libxml2 按Tab键查看所有libxml包,我这里安装 yum install libxml2-devel,然后进行配置。
./configure 测试

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization  --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session  --with-curl


2.1
yum install -y libxml2 libxml2-devel
yum install libcurl libcurl-devel
yum install libjpeg libjpeg-devel libpng libpng-devel
yum install libmcrypt libmcrypt-devel

 2.2 安装

make && make install

 

posted @ 2017-07-09 21:22  myvic  阅读(206)  评论(0编辑  收藏  举报