#Ubuntu16.04编译安装php
Ubuntu16.04上面搭建基于Nginx的php服务。Nginx使用apt直接安装的。
sudo apt install nginx
php的安装部署步骤主要参考 Centos 6.5 下php5.6.2 的编译安装
错误处理参考ubuntu源码编译安装php常见错误解决办法.
安装脚本
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=mysqlnd --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --with-pear --with-curl --with-openssl
发现缺少了几个依赖:
- Please reinstall the libcurl distribution sudo apt-get install libcurl4-gnutls-dev
- Cannot find OpenSSL's sudo apt-get install libcurl4-openssl-dev
- xml2-config not found sudo apt-get install libxml2-dev
- mcrypt.h not found. Please reinstall libmcrypt.sudo apt-get install libmcrypt-dev
第二个帖子里面还有其他的帖子也有提示。