swoole is somewhat similar to node.js, swoole is a PHP extension written in pure C. Multi-process and non-blocking
Install php:
Uninstall first:
# 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
Source
# rpm -Uvh http:/ /mirror.webtatic.com/yum/el6/latest.rpm
Install php5.5
yum install php55w php55w-bcmath php55w-cli php55w-common php55w-devel php55w-fpm php55w-gd php55w-imap php55w-ldap php5 5w- 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 comes with pdo by default, no need Install mysql first
php.ini modification
date.timezone = 'Asia/Shanghai'
Note to uninstall:
yum remove httpd
Install 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
Add the following extension to php.ini
extension=swoole.so