Heim  >  Artikel  >  Backend-Entwicklung  >  centOS下 PHP + swoole 安装记录

centOS下 PHP + swoole 安装记录

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

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:11个提问频率最高的PHP面试题Nächster Artikel:PHP 快速开发IDE