码迷,mamicode.com
首页 > Web开发 > 详细

php5.5.29安装

时间:2016-08-13 12:57:26      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

CleverCode以前使用的php是php5.2,下载升级为php5.5.29


1 下载php-5.5.29.tar.gz  

http://download.csdn.net/detail/clevercode/9602370


2 其它的安装都和 http://blog.csdn.net/clevercode/article/details/45579837 安装相同。

不同的地方是。php5.5已经有自带的php-fpm。

与http://blog.csdn.net/clevercode/article/details/45579837不同地方。


4.5 安装PHP

1) 创建用户php-fpm使用的www用户。
# groupadd  www  #添加www组    
# useradd -g  www www -s /bin/false  #创建nginx运行账户www并加入到www组,不允许www用户直接登录系统


2) 创建安装目录,缓存目录,日志目录
a) 安装目录
# mkdir -p /usr/local/php5   
b) 缓存目录
# mkdir -p /tmp/phis   
# chown www:www /tmp/phis -R
c)session目录,如果是负载均衡的多台服务器,需要共享session,session需要放入memcach中
# mkdir -p /tmp/session 
# chown www:www /tmp/session -R
d)创建日志目录
# mkdir -p /data0/logs/php 
# chown www:www /data0/logs/php -R


3)解压
确保已经安装mysql-devel  且生成/usr/lib64/mysql
64位系统中 libmysqlclient 默认安装到了 /usr/lib64/mysql/ 目录下
而php编译时是去/usr/lib目录下查找 因此要创建软连接


# ln -s /usr/lib64/mysql/libmysqlclient* /usr/lib
# /sbin/ldconfig
# cd /usr/local/src/php
# tar -xvpf php-5.5.29.tar.gz


5) 配置
# cd php-5.5.29
# ./configure  --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-mysql=/usr --with-mysqli=/usr/lib64/mysql/mysql_config  --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi  --enable-fpm --enable-force-cgi-redirect  --enable-mbstring --with-mcrypt  --with-gd  --enable-gd-native-ttf --with-openssl  --with-mhash  --enable-pcntl  --enable-sockets --with-ldap  --with-ldap-sasl  --with-xmlrpc  --enable-zip  --enable-soap --without-pear  --with-pdo-mysql


6)编译
make ZEND_EXTRA_LIBS=‘-liconv‘


7)安装

make install 


4.7 配置PHP

不需要再配置php-fpm。在/usr/local/php5/sbin/php-fpm已经有了。


技术分享


php5.5.29安装

标签:

原文地址:http://blog.csdn.net/clevercode/article/details/52198698

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!