我现在需要装php7.2TS版本怎么操作

问答中心分类: Linux我现在需要装php7.2TS版本怎么操作
mahaiyin asked 6 年 ago
1.裸机新装怎么操作
虽然是新机,但是还是想用oneinstack,不想直接去自己装,而且需要Pthreads扩展,要怎么操作呢
2.已按照过oneinstack怎么操作
php是7.2.4最新的,oneinstack默认的是nts的版本,我要切换到TS版本,并加上Pthreads扩展,我要怎切换掉
感谢大神提供宝贵意见,上面2种情况哪一种都可以!

1 Answers
oneinstack answered 6 年 ago

1. 安装前修改options.conf新增--enable-maintainer-zts参数

php_modules_options='--enable-maintainer-zts'

2. 安装php3. 安装pthread

cd ~/oneinstack/src
wget http://pecl.php.net/get/pthreads-3.1.6.tgz
tar xzf pthreads-3.1.6.tgz
cd pthreads-3.1.6
/usr/local/php/bin/phpize 
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
ls  #查看有没有 pthreads.so,如果有,证明编译成功
#加载pthreads
echo extension=pthreads.so > /usr/local/php/etc/php.d/ext-pthreads.ini

4. 重载php-fpm

service php-fpm reload