您的位置:首页 > 运维架构 > Linux

centos7编译安装php

2016-12-22 20:04 609 查看
1.进Php.net官网下载tar.gz包, 

wget http://..................
tar -zxvf php*.tar.gz

 

yum install gcc gcc++ libxml-devel

2.cd php解压包目录

3../configure --prefix=/usr/local/php5628 --enable-fpm

./configure --with-mysql=mysqlnd \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-openssl

./configure –prefix=/data/home/xingzheng/install/php-5.5.10 –with-libxml-dir=/data/xingzheng/install/libxml2-2.7.2 –enable-

sockets=shared  –with-mysql=shared,mysqlnd

4.make && make install

5.打开防火墙:firewall-cmd --zone=public --add-port=80/tcp --permanent      

systemctl restart firewalld.service

或直接 systemctl stop firewalld.service(不安全,只适合内网)

5.未完待续
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux PHP