deepin安装php7

本文提供了详细的步骤指导如何从源码编译安装PHP7,并配置php-fpm服务以供Web服务器使用。包括下载PHP7源码包、安装必要的依赖库、配置及编译安装过程、启动php-fpm等。

1.下载php7包

wget  http://cn2.php.net/get/php-7.0.0.tar.bz2/from/this/mirror

2.安装一些依赖包

sudo apt-get update
sudo apt-get install libxml2-dev
sudo apt-get  install  build-essential
sudo apt-get install openssl 
sudo apt-get install libssl-dev 
sudo apt-get install make
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libreadline6 libreadline6-dev

3.编辑php7

./configure --prefix=/home/zyc/PHP/php_soft/php7 --bindir=/home/zyc/PHP/php_soft/php7/bin --sbindir=/home/zyc/PHP/php_soft/php7/sbin --includedir=/home/zyc/PHP/php_soft/php7/include --libdir=/home/zyc/PHP/php_soft/php7/lib/php --mandir=/home/zyc/PHP/php_soft/php7/php/man --with-config-file-path=/home/zyc/PHP/php_soft/php7/etc --with-mysql-sock=/var/run/mysql/mysql.sock --with-mcrypt=/usr/include --with-mhash --with-openssl --with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-gd --with-iconv --with-zlib --enable-zip --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-mbstring --enable-ftp --enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --with-gettext --enable-session --with-curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --enable-fastcgi --with-fpm-user=nginx --with-fpm-group=nginx --without-gdbm --disable-fileinfo

4.安装php7

make -j4
sudo make install

5.配置php-fpm

user=www-data
group=www-data
6.启动php
php-fpm -c /home/zyc/PHP/php_soft/etc/php-fpm.conf

7.查看php是否在运行

ps aux | grep php-fpm





转载于:https://my.oschina.net/surjur/blog/539298

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值