Home  >  Article  >  Backend Development  >  PHP + swoole installation record under centOS

PHP + swoole installation record under centOS

巴扎黑
巴扎黑Original
2016-11-11 15:38:411513browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn