wget http://pecl.php.net/get/inotify-2.0.0.tgz tar -xf inotify-2.0.0.tgz phpize ./configure --with-php-config=/usr/local/php7/bin/php-config --enable-inotify make && make install
memcache 扩展安装
yum -y install libmemcached libmemcached-devel ##先按照依赖,否则make报错 git clone https://github.com/php-memcached-dev/php-memcached.git php-memcache cd php-memcache/ git checkout php7 phpize ./configure --enable-memcached --with-php-config=/usr/local/php7/bin/php-config make make install
php.ini 中添加配置 extension=memcached.so
gd 扩展安装
进入到php的源码目录下的ext/gd目录
cd php-7.2.0/ext/gd yum -y install libjpeglibjpeg-devel libpng libpng-devel freetype freetype-devel make clean phpize ./configure --with-png-dir --with-freetype-dir --with-jpeg-dir --with-gd --with-php-config=/usr/local/php7/bin/php-config make && make install
wget http://pecl.php.net/get/mongodb-1.14.0.tgz tar -xf mongodb-1.14.0.tgz cd mongodb-1.14.0 /usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php7/bin/php-config make make install
imagick 扩展安装
首先安装ImageMagick
wget https://imagemagick.org/download/ImageMagick.tar.gz tar -xf ImageMagick.tar.gz cd ImageMagick ./configure make make install
安装 imagick 扩展
wget http://pecl.php.net/get/imagick-3.4.4.tgz /usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php7/bin/php-config make make install
trie_filter 扩展安装
安装依赖 libdatrie
curl -O ftp://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-0.2.4.tar.gz tar zxvf libdatrie-0.2.4.tar.gz cd libdatrie-0.2.4 make clean ./configure --prefix=/usr/local/libdatrie make make install
安装扩展 trie_filter
wget https://github.com/jiopuud/trie_filter/archive/master.zip unzip master.zip cd trie_filter-master phpize ./configure --with-php-config=/usr/local/php7/bin/php-config --with-trie_filter=/usr/local/libdatrie make make install
tar -xf swoole-src-1.9.15.tar.gz cd swoole-src-1.9.15 phpize ./configure --enable-openssl --enable-async-redis --with-php-config=/usr/local/php7/bin/php-config make make install
; Redirect worker stdout and stderr into main error log. If not set, stdout and ; stderr will be redirected to /dev/null according to FastCGI specs. ; Note: on highloaded environement, this can cause some delay in the page ; process time (several ms). ; Default Value: no ;catch_workers_output = yes # 以下配置是对 php.ini 的补充,会在定义的 pool (比如 www) 中覆盖 php.ini 中的配置。 # 否则为了记录日志,需要修改 php.ini 文件,增加以下配置 ## log_errors = On ## error_log = "/usr/local/php/var/log/error_log" ## error_reporting=E_ALL&~E_NOTICE
php_flag[display_errors] = on php_admin_value[error_log] = /var/log/php-fpm/www-error.log php_admin_flag[log_errors] = on