标签:
1.下载php7.0.7的源码包,解压 cd php-7.0.7
2. ./configure --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm --with-gd --with-config-file-path=/usr/local/php7/etc --prefix=/usr/local/php7 --with-mcrypt --enable-mbstring --with-openssl
3.报错 not found libxml ,解决方式:http://www.xmlsoft.org/downloads.html 下载libxm包.编译安装
4.再次执行第2步
5.make (编译);
6.sudo make install
7.下面配置一下
sudo cp php.ini-production /usr/local/php7/etc/php.ini
cd /usr/local/php7/etc
sudo cp php-fpm.conf.default php-fpm.conf
sudo cp php-fpm.d/www.conf.default www.conf
cd php-fpm.d
sudo vim www.conf
把user 和 group 都改为www-data
8.启动php-fpm
cd /usr/local/php7/sbin
sudo ./php-fpm
9.一些必要的扩展的安装
安装phpredis
下载源码 cd phpredis
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
sudo make install
配置文件添加扩展
extension=redis.so
extension=swoole.so
extension_dir=/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/
标签:
原文地址:http://www.cnblogs.com/sunqisteven/p/5558523.html