Centos 7 编译php 7.2.10
程序员文章站
2022-05-18 18:16:10
步骤一:安装依赖 步骤二:下载php安装包 步骤三:编译源代码 步骤四:复制文件 步骤五:启动php-fpm ......
步骤一:安装依赖
yum install -y wget gcc gcc-c++ gd-devel zlib-devel libjpeg-devel libpng-devel libiconv-devel freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libxslt-devel libmcrypt-devel mhash mcrypt
步骤二:下载php安装包
wget http://101.247.192.75/files/50030000062c2c69/cn2.php.net/distributions/php-7.2.10.tar.gz
步骤三:编译源代码
tar xvf php* cd php* ./configure --with-openssl --with-pcre-regex --with-kerberos --with-libdir=lib --with-libxml-dir \ --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-pdo-sqlite --with-gd --with-iconv \ --with-zlib --with-xmlrpc --with-xsl --with-pear --with-gettext --with-curl --with-png-dir --with-jpeg-dir \ --with-freetype-dir --with-fpm-user=nginx --with-fpm-group=nginx --enable-mysqlnd --enable-zip \ --enable-inline-optimization --enable-shared --enable-libxml --enable-xml --enable-bcmath --enable-shmop \ --enable-sysvsem --enable-mbregex --enable-mbstring --enable-ftp --enable-pcntl --enable-sockets --enable-soap \ --enable-session --enable-opcache --enable-fpm --enable-maintainer-zts --enable-fileinfo \ --with-mysqli=/usr/local/mysql make make install
步骤四:复制文件
cp php.ini-development /usr/local/lib/php.ini cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf cp sapi/fpm/php-fpm /usr/local/bin cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
步骤五:启动php-fpm
service php-fpm start chkconfig --add php-fpm
推荐阅读
-
centos7上编译安装php7以php-fpm方式连接apache
-
在Mac上编译安装PHP7的开发环境
-
CentOS7系统搭建LAMP及更新PHP版本操作详解
-
CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境
-
Centos7.2 编译安装PHP7.0.2的步骤
-
centos源码编译php5 mcrypt模块步骤详解
-
Centos7 Yum安装PHP7.2流程教程详解
-
centos yum php 7.x 无需删除升级的方法
-
Centos7安装PHP及Nginx的教程详解
-
CentOS 6.4系统下编译安装LNMP和配置PHP环境具体步骤