HTTPS://GITHUB.COM/SWOOLE/PHP-CP Download Package
Requirement
- PHP 5.3 + (no zts)
- Linux 2.6+
- PDO and Redis Extension install
Install
Phpize=>./configure=>make Install=>echo "extensions=xx/connect_pool.so" >php.ini
Tips
- Pool_server must be started with the root user
- Redis does not support the Pub/sub method
- When you are finished with a connection (for example: Fetchall call ends), call release to release the connection to the pool immediately (if the transaction needs to be released after transaction commit or rollback). If you do not want to change the business code, you can call the release method after each fetch (or get/set) of the framework layer is exhausted.
My PHP by directory:/USR/LOCAL/PHP6
My download package directory: ~/download
CD download
CD php-cp-master/
/usr/local/php6/bin/phpize
./configure--with-php-config=/usr/local/php6/bin/php-config
Make
sudo make install
CD etc
sudo vim php.ini
CD..
bin/php-m
cd ~/Download/php-cp-master
sudo cp pool.ini/etc/
sudo chmod a+x pool_server
sudo php pool_server start
sudo killall php-fpm
Ps-ef|grep fpm
sudo kill-9 12644
sudo fpm
sudo/usr/local/php6/bin/php pool_server Start
SWOOLE/PHP-CP Installation