centOS下 PHP + swoole 安裝記錄
最後更新:2016-11-12
來源:互聯網
上載者:User
swoole 有點類似node.js , swoole純C編寫的PHP擴充. 多進程和非阻塞
安裝php :
先卸載:
# yum remove php php-bcmath php-cli php-common php-devel php-fpm php-gd php-imap php-ldap php-mbstring php-mcrypt php-mysql php-odbc php-pdo php-pear php-pecl-igbinary php-xml php-xmlrpc
源
# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
安裝php5.5
yum install php55w php55w-bcmath php55w-cli php55w-common php55w-devel php55w-fpm php55w-gd php55w-imap php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql php55w-odbc php55w-pdo php55w-pear php55w-pecl-igbinary php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache
php5.5 預設帶有pdo,不需要先安裝 mysql
php.ini修改
date.timezone = 'Asia/Shanghai'
注意卸載:
yum remove httpd
安裝swoole:
https://github.com/swoole/swoole-src/releases
# wget https://github.com/swoole/swoole-src/archive/swoole-1.7.6-stable.tar.gz
tar zxvf swoole-1.7.6-stable.tar.gz
swoole-1.7.6-stable.tar.gz
phpize
./configure
make
make install
下面擴充加入到php.ini
extension=swoole.so