网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 生活知识 知识问答

centos6.6上 nginx+php5.3将php版本升级php5.6

时间:2024-11-03 10:35:05

1、到php官网下载php-5.6.28.tar.gz,用ftp或者ssh工具将下载好的安装包上传到Linux服务器上。

centos6.6上 nginx+php5.3将php版本升级php5.6

2、卸载php5.3版本,linux上只要将对应php安装目录删除即可。rm /usr/local/php -fr (为什是/usr/local/php这个目录,这由php的安装目录而定)

centos6.6上 nginx+php5.3将php版本升级php5.6

3、解压php-5.6.28.tar.gz。解压命令:tar -zxvf php-5.6.28.tar.gz解压完之后,会生成php-5.6.28目录

centos6.6上 nginx+php5.3将php版本升级php5.6centos6.6上 nginx+php5.3将php版本升级php5.6

4、进入解压后的目录。cd php-5.6.28进入目录后,执行./configure --prefix=/usr/local/php #指定php安装的目录--with-mysql=mysqlnd--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-freetype-dir=/usr/local/freetype #指定freetype的路径,由freetype安装的真实路径定--with-gd=/usr/local/gd #指定gd的路径,由gd安装的真实路径定--with-zlib--with-libxml-dir=/usr/local/libxml2#指定libxml2的路径,由libxml2安装的真实路径定--with-jpeg-dir=/usr/local/jpeg#指定jpeg的路径,由jpeg安装的真实路径定--with-png-dir=/usr/local/png#指定png的路径,由png安装的真实路径定--enable-mbstring=all--enable-mbregex--enable-shared--with-openssl-dir=/usr/local/openssl#指定openssl的路径,由openssl安装的真实路径定--with-openssl--enable-fpm--with-config-file-path=/usr/local/php/etc #指定php的配置文件路径--with-curlwrappers

centos6.6上 nginx+php5.3将php版本升级php5.6centos6.6上 nginx+php5.3将php版本升级php5.6

5、编译安装。make && make install

centos6.6上 nginx+php5.3将php版本升级php5.6

6、查看安装php版本是否升级成功。php -v

centos6.6上 nginx+php5.3将php版本升级php5.6
© 2026 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com