1.安装swoole扩展的步骤:
1.安装autoconf
>:yum install autoconf
2.下载swoole安装包,一般下载stabel版本
>:wget https://github.com/swoole/swoole-src/archive/v2.0.10-stable.tar.gz
3.解压安装包
>: tar zxvf v2.0.10-stable.tar.gz
>: cd cd swoole-src-2.0.10-stable/
>: phpize
>: ./configure --with-php-config=服务器PHP的安装目录/php-config
(示例:>: ./configure --with-php-config=/usr/local/php5-7.2.2-20180201-132629/bin/php-config )
>: make && make install
4.编译成功后,再php.ini中,添加:
[swoole]
extension=swoole.so
安装yaf \ yar \ yac或者其他的php扩展,同理,根据不同的php环境,下载相应的压缩包,进行第(3.)步骤的操作即可。
php.ini中添加如下信息:
[yaf]
extension=yaf.so
[yar]
extension=yar.so
[yac]
extension=yac.so
5.重启apache或者nginx
查看相关php.ini的位置,或者相关参数,可执行phpinfo(),进行查看

|