php-7.2.15.tar.bz2安装操作命令

未安装rzsz yum install -y lrzsz
官网下载php-7.2.15
rz上传

解压出错
yum -y install bzip2

本地YUM源可以,或者选择其他外部源

[root@test3 ~]# yum -y install epel-release
.php依赖包
[root@test3 ~]# yum -y install gcc gcc-c++ libmcrypt-devel mcrypt mhash gd-devel ncurses-devel libxml2-devel bzip2-devel libcurl-devel curl-devel libjpeg-devel libpng-devel freetype-devel net-snmp-devel openssl-deve python-devel zlib-devel freetype libxslt* bison autoconf re2c

 tar   -jxvf    php-7.2.15.tar.bz2
 cd php-7.2.15


 ./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-mysql-sock=/var/run/mysql/mysql.sock \
--with-mhash \
--with-openssl \
--with-mysqli=shared,mysqlnd \
--with-pdo-mysql=shared,mysqlnd \
--with-gd \
--with-iconv \
--with-zlib \
--enable-zip \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-xml \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-mbregex \
--enable-mbstring \
--enable-ftp \
--enable-pcntl \
--enable-calendar \
--enable-exif \
--enable-sockets \
--with-xmlrpc \
--with-libxml-dir \
--enable-soap \
--without-pear \
--with-gettext \
--enable-session \
--with-curl \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-bz2 \
--enable-opcache \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--without-gdbm \
--enable-fast-install \
--disable-fileinfo

make


make install


cp php.ini-development /usr/local/php/php.ini
cp  /usr/local/php/etc/php-fpm.conf.default  /usr/local/php/etc/php-fpm.conf

vim /usr/local/php/etc/php-fpm.conf (新建用户放入 )


/usr/local/bin/php-fpm(运行)
 

猜你喜欢

转载自blog.csdn.net/Lucky____Boy/article/details/88250474