centos中swoole安装

1、首先安装php,目前我安装的是php-5.6.8

wget http://cn2.php.net/get/php-5.6.8.tar.gz/from/this/mirror

tar -zxvf php-5.6.8.tar.gz


cd php-5.6.8

 ./configure --prefix=/usr/local/php-5.6.8 --with-config-file-path=/usr/local/php-5.6.8/etc --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem  --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pcre-regex --with-iconv --with-zlib --with-mcrypt --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl

make && make install

cp php.ini-development /usr/local/php-5.6.8/etc/php.ini


cd /usr/local/php-5.6.8/etc/

cp php-fpm.conf.default php-fpm.conf

/usr/local/php-5.6.8/sbin/php-fpm 

安装swoole

wget https://github.com/swoole/swoole-src/archive/swoole-1.7.14-stable.tar.gz

tar -zxvf swoole-1.7.14-stable 

 cd swoole-src-swoole-1.7.14-stable/


 /usr/local/php-5.6.8/bin/phpize 

 ./configure --with-php-config=/usr/local/php-5.6.8/bin/php-config --enable-async-mysql

make

make test

make install

然后在php.ini中添加加载扩展代码

extension=/usr/local/php-5.6.8/lib/php/extensions/no-debug-non-zts-20131226/swoole.so

然后 /usr/local/php-5.6.8/bin/php -m 看swoole扩展是否安装成功

 

posted @ 2015-05-05 19:25  agang_19  阅读(513)  评论(0)    收藏  举报