码迷,mamicode.com
首页 > Web开发 > 详细

php 源码编译

时间:2018-04-13 14:31:46      阅读:276      评论:0      收藏:0      [点我收藏+]

标签:openssl   color   sock   multi   dir   pat   php-fpm   follow   sockets   

https://cyberpersons.com/2016/08/28/install-nginx-php-php-fpm-mysql-source-run-wordpress-site-ubuntu-16-04/

----------------------

1下载 

wget http://sg2.php.net/get/php-5.6.35.tar.gz/from/this/mirror

 

2.

./configure --help
./configure --enable-so

 

./configure --enable-fpm --with-mcrypt --enable-mbstring --with-openssl --with-mysql --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-pdo-mysql --with-libxml-dir=/usr/lib --with-mysqli=/usr/bin/mysql_config --with-curl --enable-zip --enable-sockets --with-zlib --enable-exif --enable-ftp --with-iconv --with-gettext --enable-gd-native-ttf --with-freetype-dir=/usr --prefix=/opt/PHP-5.6 --with-config-file-path=/opt/PHP-5.6/etc --with-fpm-user=www-data --with-fpm-group=www-data --enable-fpm

 

apt-get install libxml2-dev
apt-get install libcurl4-openssl-dev pkg-config
apt-get install libssl-dev libsslcommon2-dev
sudo apt-get install libjpeg-turbo8-dev
sudo apt-get install libpng-dev
apt install libfreetype6-dev
apt-get install libt1-dev
apt-get install php5-mcrypt
apt install libmcrypt-dev
apt install mysql-server-5.7
sudo apt-get install libmysqlclient-dev

3. 启动php-fpm 

cp ../etc/php-fpm.conf.default ../etc/php-fpm.conf
./php-fpm

 

--------------------------------------------------------------------------------------------------------------------

cd

cd downloads
wget http://us2.php.net/distributions/php-7.0.10.tar.gz
 
tar zxf php-7.0.10.tar.gz
 
cd php-7.0.10
 
# Multiple lines command
 
./configure --prefix=/usr/local/nginx/php --enable-fpm --with-mysqli=/usr/bin/mysql_config --with-zlib --with-curl
 
# Multiple lines command end here
 
# Run following to finalize the php install
 
make
sudo make install

 

php 源码编译

标签:openssl   color   sock   multi   dir   pat   php-fpm   follow   sockets   

原文地址:https://www.cnblogs.com/oxspirt/p/8819779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!