vagrant中centos编译安装php7.1.9
2017-09-19 20:42
435 查看
半成品,稍后整理
一、安装依赖
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel
二、下载PHP源码包
cd /opt/soft
wget http://php.net/get/php-7.1.9.tar.gz/from/a/mirror
tar zxvf php-7.1.9.tar.gz
cd php-7.1.9
./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --mandir=/usr/local/php/php/man --with-config-file-path=/usr/local/php/etc
--with-config-file-scan-dir=/usr/local/php/etc/php.d --with-png-dir --with-mysql-sock=/var/run/mysql/mysql.sock --with-mcrypt=/usr/local/libmcrypt --with-mhash --with-openssl --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-iconv --with-zlib
--enable-inline-optimization --with-gd --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-mbstring --enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap
--without-pear --with-gettext --enable-session --with-curl=/usr/local/curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --with-fpm-user=vagrant --with-fpm-group=vagrant --without-gdbm --disable-fileinfo --enable-opcache=no --with-gd
编译过程中如发现缺少什么库了,记得百度找下官网去下载源码编译下,然后在来编译PHP
直接使用编译后未经优化处理的配置
cp php.ini-production /usr/local/php/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
vim /etc/profile
source /etc/profile
一、安装依赖
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel
二、下载PHP源码包
cd /opt/soft
wget http://php.net/get/php-7.1.9.tar.gz/from/a/mirror
tar zxvf php-7.1.9.tar.gz
cd php-7.1.9
./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --mandir=/usr/local/php/php/man --with-config-file-path=/usr/local/php/etc
--with-config-file-scan-dir=/usr/local/php/etc/php.d --with-png-dir --with-mysql-sock=/var/run/mysql/mysql.sock --with-mcrypt=/usr/local/libmcrypt --with-mhash --with-openssl --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-iconv --with-zlib
--enable-inline-optimization --with-gd --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-mbstring --enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap
--without-pear --with-gettext --enable-session --with-curl=/usr/local/curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --with-fpm-user=vagrant --with-fpm-group=vagrant --without-gdbm --disable-fileinfo --enable-opcache=no --with-gd
编译过程中如发现缺少什么库了,记得百度找下官网去下载源码编译下,然后在来编译PHP
直接使用编译后未经优化处理的配置
cp php.ini-production /usr/local/php/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
vim /etc/profile
/usr/local/php/bin:/usr/local/php/sbin
source /etc/profile
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
相关文章推荐
- centOS7下编译安装nginx-1.12.2+php-7.1.9
- Centos 7(Linux)环境下安装PHP(编译添加)相应动态扩展模块so(以openssl.so为例)
- Centos7.2 编译安装PHP7.0.2的步骤
- CentOS 编译安装 nginx php mysql
- CentOS 5.5 编译安装apache+php+mysql,利用CMS快速建立论坛
- CentOS6.5 PHP5.4.0+Apache2.4.1+MySQL5.5.21 编译安装
- CentOS单独编译安装PHP gd库扩展
- Centos7.2下编译安装php模块“pdo_mysql”
- Centos6.3 PHP编译安装JSON模块报错解决
- 新环境编译安装CentOS 7 php7
- Nginx + PHP + MySQL 在 CentOS 下的编译安装
- CentOS 7.2 下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1的方法详解(mini版本)
- centos7下编译安装php-7.0.15(PHP-FPM)
- Centos 6.5 下php5.6.2 的编译安装
- CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14
- Centos 6.6(X64位)系统编译安装memcached 并安装PHP的memcache扩展
- Centos 6.3 编译安装Nginx+php+Mysql
- centos + nginx + mysql + php 环境编译安装
- 虚拟机上CentOS 7.0编译安装Nginx+MySQL+PHP(二)
- centos编译安装php5.6.20+nginx1.8.1+mysql5.6.17