标签:sock 设置 -o pcntl 编译 xmlrpc php-fpm zlib soc
root@ubuntu1:/tmp# apt-get update
root@ubuntu1:/tmp# apt install gcc
root@ubuntu1:/tmp# apt install make
root@ubuntu1:/tmp# apt install openssl
root@ubuntu1:/tmp# apt install curl
root@ubuntu1:/tmp# apt install libbz2-dev
root@ubuntu1:/tmp# apt install libxml2-dev
root@ubuntu1:/tmp# apt install libjpeg-dev
root@ubuntu1:/tmp# apt install libpng-dev
root@ubuntu1:/tmp# apt install libfreetype6-dev
root@ubuntu1:/tmp# apt install libzip-dev
root@ubuntu1:/tmp# apt install libssl-dev
root@ubuntu1:/tmp# wget http://am1.php.net/distributions/php-7.2.12.tar.gz
root@ubuntu1:/tmp# tar -zxvf php-7.2.12.tar.gz
root@ubuntu1:/tmp# cd php-7.2.12/
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl-dir=/usr/bin/curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts
make
make install
cp php.ini-development /usr/local/php/etc/php.ini
cd /usr/local/etc/
cp php-fpm.conf.default php-fpm.conf
cd php-fpm.d
cp www.conf.default www.conf
groupadd www
useradd -g www www
/usr/local/php/sbin/php-fpm
1.vim /etc/profile
在最后加入以下内容
PATH=$PATH:/usr/local/php/bin
export PATH
2.执行以下命令:
source /etc/profile
php -v
标签:sock 设置 -o pcntl 编译 xmlrpc php-fpm zlib soc
原文地址:https://www.cnblogs.com/shier-dong/p/13432598.html