时间:2021-07-01 10:21:17 帮助过:2人阅读
useradd -r -s /sbin/nologin php-fpm
cd /data/pkg wget http://php.com/get/php-7.2.2.tar.gz/from/this/mirror mv mirror php-7.2.2.tar.gz tar zxvf php-7.2.2.tar.gz cd php-7.2.2
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel libxslt libicu-devel libxslt-devel
./configure \ --prefix=/usr/local/php-7.2.2 \ --with-mhash \ --with-openssl \ --with-config-file-path=/usr/local/php-7.2.2/etc \ --disable-short-tags \ --enable-fpm \ --with-fpm-user=php-fpm --with-fpm-group=php-fpm \ --enable-xml \ --with-libxml-dir \ --enable-bcmath \ --enable-calendar \ --enable-intl \ --enable-mbstring \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-zip \ --enable-mbregex \ --enable-mysqlnd \ --enable-mysqlnd-compression-support \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-gd \ --enable-ftp \ --with-curl \ --with-xsl \ --with-iconv \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib \ --enable-sysvsem \ --enable-inline-optimization \ --with-xmlrpc \ --with-gettext make -j 4 && make install
ln -s /usr/local/php-7.2.2/ /usr/local/php ln -s /usr/local/php/bin/php /usr/local/bin ln -s /usr/local/php/sbin/php-fpm /usr/local/sbin
cd /data/pkg/php-7.2.2 cp ./php.ini-development ./php.ini-production /usr/local/php/etc cp /usr/local/php/etc/php.ini-development /usr/local/php/etc/php.ini 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
ln -s /usr/local/php/etc/php.ini /usr/local/etc/ ln -s /usr/local/php/etc/php-fpm.conf /usr/local/etc/ ln -s /usr/local/php/etc/php-fpm.d/www.conf /usr/local/etc/
vim /etc/profile PATH=$PATH:/usr/local/php/bin export PATH source /etc/profile
/usr/local/sbin/php-fpm
netstat -lnt | grep 9000
killall php-fpm
以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!
相关推荐:
linux编译安装mysql5.7
PHP7.2 Data Structures的使用
以上就是linux编译安装php7.2的详细内容,更多请关注Gxl网其它相关文章!