centos7.2安装php7.2

本文介绍了如何在CentOS 7.2上通过源码安装PHP 7.2,包括下载源码、依赖安装、配置编译、启动php-fpm以及配置Nginx支持解析PHP文件。最后通过输出phpinfo验证安装成功。
摘要由CSDN通过智能技术生成

1. 源码包下载地址

官网链接: https://www.php.net/distributions/php-7.2.0.tar.gz

百度云: https://pan.baidu.com/s/1zhac_y82wABSgp2QdwCXqA  密码: di42
 
tar –zxvf php-7.2.0.tar.gz  

cd php7.2.0  

yum install libxml2 libxml2-devel openssl openssl-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libmcrypt libmcrypt-devel -y

./configure --prefix=/usr/local/php720 --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-simplexml --enable-xml --disable-rpath --enable-bcmath --enable-soap --enable-zip --with-curl --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mbstring --enable-sockets --with-gd --with-openssl --with-mhash --enable-opcache --disable-fileinfo

make && make install
 
 
8. 配置nginx.conf支持解析PHP
打开nginx配置文件(/usr/local/nginx/conf/nginx.co

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值