欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

centOS下 PHP + swoole 安装记录

程序员文章站 2022-05-28 07:53:02
...
<p>swoole 有点类似node.js&nbsp; ,&nbsp; swoole纯C编写的PHP扩展. 多进程和非阻塞&nbsp;<br/><br/><br/>安装php :&nbsp;<br/>先卸载:&nbsp;<br/># yum remove php&nbsp; php-bcmath php-cli php-common&nbsp; php-devel php-fpm&nbsp;&nbsp;&nbsp; php-gd php-imap&nbsp; php-ldap php-mbstring php-mcrypt php-mysql&nbsp;&nbsp; php-odbc&nbsp;&nbsp; php-pdo&nbsp;&nbsp; php-pear&nbsp; php-pecl-igbinary&nbsp; php-xml php-xmlrpc&nbsp;<br/><br/>源&nbsp;<br/># rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm&nbsp;<br/><br/>安装php5.5&nbsp;<br/>yum install php55w&nbsp; php55w-bcmath php55w-cli php55w-common&nbsp; php55w-devel php55w-fpm&nbsp;&nbsp;&nbsp; php55w-gd php55w-imap&nbsp; php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql&nbsp;&nbsp; php55w-odbc&nbsp;&nbsp; php55w-pdo&nbsp;&nbsp; php55w-pear&nbsp; php55w-pecl-igbinary&nbsp; php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache&nbsp;<br/><br/>php5.5 默认带有pdo,不需要先安装 mysql&nbsp;<br/><br/>php.ini修改&nbsp;<br/>date.timezone = &#39;Asia/Shanghai&#39;&nbsp;<br/><br/>注意卸载:&nbsp;<br/>yum remove httpd&nbsp;<br/><br/>安装swoole:&nbsp;<br/>https://github.com/swoole/swoole-src/releases&nbsp;<br/><br/># wget https://github.com/swoole/swoole-src/archive/swoole-1.7.6-stable.tar.gz&nbsp;<br/>tar zxvf swoole-1.7.6-stable.tar.gz&nbsp;<br/>swoole-1.7.6-stable.tar.gz&nbsp;<br/>phpize&nbsp;<br/>./configure&nbsp;<br/>make&nbsp;<br/>make install&nbsp;<br/><br/>下面扩展加入到php.ini&nbsp;<br/>extension=swoole.so</p>