php7.4 compiler (centos)

1 download package into the home directory

[root@centos ~]# ls
php-7.4.0.tar.xz

2 decompression and installation tools compile the required
[root @ centos ~] # yum install gcc pcre-devel openssl-devel expat-devel autoconf libtool gcc-c ++ libsqlite3x-devel ( compiled difference what package back on the yum install XXX-devel -y)

3 解压进到目录
[root@centos ~]# tar xf php-7.4.0.tar.xz
[root@centos ~]# cd php-7.4.0
[root@centos ~]# ./configure --prefix=/data/php --enable-fpm --with-fpm-user=www
--with-fpm-group=www --with-pear --with-curl --with-png-dir --with-freetype-dir --
with-iconv --with-mhash --with-zlib --with-xmlrpc --with-xsl --with-openssl --
with-mysqli --with-pdo-mysql --disable-debug --enable-zip --enable-sockets --enablesoap
--enable-inline-optimization --enable-xml --enable-ftp --enable-exif --enablewddx
--enable-bcmath --enable-calendar --enable-shmop --enable-dba --enable-sysvsem -
-enable-sysvshm --enable-sysvmsg

4 make~~~
[root@centos ~]# make && make install

5 and environment configuration file
[CentOS the root @ ~] # CD /data/php/etc/php-fpm.d/
[@ CentOS PHP the root-fpm.d] www.conf.default www.conf CP #
[@ CentOS the root fpm.d-PHP] /root/php7.4.0/php.ini-development /data/php/etc/php.ini CP #
[@ CentOS PHP the root-fpm.d] # CD ..
[@ CentOS the root etc] LS #
PHP-PHP-fpm.d fpm.conf.default the php.ini
[the root @ CentOS etc] CP # PHP-PHP-fpm.conf.default fpm.conf
[the root @ CentOS etc] # the useradd -R & lt -s / sbin / nologin 1001 WWW -u
[the root @ CentOS etc] # PHP-Vim fpm.d / www.conf (Group change start user user)
[the root @ CentOS etc] ../ sbin CD #
[@ CentOS the root sbin] # ./php-fpm

6 Check running
[root @ CentOS sbin] # PS -ef | grep the WWW
the WWW 28944 28943 0 18:27 00:00:00 PHP-FPM:? The pool the WWW
? The WWW 28945 28943 0 18:27 00:00:00 PHP- fpm: pool www

Guess you like

Origin www.cnblogs.com/Justin0717/p/12180700.html