centos7编译安装php

来源:互联网 发布:天祥网络 编辑:程序博客网 时间:2024/06/05 10:12

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.未完待续

0 0