详细swoole安装
推荐(免费):swoole
PHP版本: php7
swoole版本: swoole(最新)
服务器: CentOS 7.6
swoole配置在Linux或者ios等类似于Unix环境中,Windows环境支持不好
tar编译安装参考 : https://www.jianshu.com/p/0c0d19c36ed0
编译安装参考: http://www.hu-rong.com/article/323
https://blog.csdn.net/q85795362/article/details/85256206
安装swoole的步骤如下:
准备工作:
1, 查看linux(这里以CentOS7.6为例)版本:
[root@VM_6_21_centos ~]# cat /etc/redhat-release
2,查看PHP版本
[root@VM_6_21_centos ~]# php -v
3,查看PHP安装的扩展
[root@VM_6_21_centos ~]# php -m
4,查看当前所在的位置:
[root@VM_6_21_centos ~]# pwd
5, 安装依赖包文件 # find / -name phpize 查找:phpize
[root@VM_6_21_centos ~]# yum install php-devel # 通过php的工具包添加扩展,运行命令:phpize yum install glibc-headers yum install gcc-c++ yum install git # git clone yum -y install nghttp2
6,我是使用oneinstack集成环境安装的lnmp
php.ini 位置 : /usr/local/php/etc/php.ini 或者 whereis php.ini
开始安装
1,cd 到家目录, 下载swoole
[root@VM_6_21_centos ~]# git clone https://github.com/swoole/swoole-src.git[root@VM_6_21_centos ~]# ls[root@VM_6_21_centos ~]# mkdir /usr/local/swoole/
2,拷贝 /root 目录下的 swoole-src 到 /usr/local/swoole/
[root@VM_6_21_centos ~]# cp -r /root/swoole-src/. /usr/local/swoole/
3, 我的PHP安装的位置(php7.2.16) /usr/local/php/bin/php-config (具体情况具体对待)
[root@VM_6_21_centos ~]# cd /usr/local/swoole/[root@VM_6_21_centos swoole]# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-sockets --enable-openssl --enable-http2 # 配置[root@VM_6_21_centos swoole]# make clean && make && sudo make install # 编译安装
4,swoole.so 配置所在位置
[root@VM_6_21_centos ~]# vim /usr/local/php/etc/php.ini配置: extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/swoole.so
修改了php配置需要平滑启动php-fpm[root@VM_6_21_centos ~]# ps -aux | grep php-fpm 找到phpfpm 的master process的进程id[root@VM_6_21_centos ~]# kill -SIGUSR2 process_id #实现平滑重启php-fpm
Atas ialah kandungan terperinci 详细swoole安装. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

Video Face Swap
Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!

Artikel Panas

Alat panas

Notepad++7.3.1
Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6
Alat pembangunan web visual

SublimeText3 versi Mac
Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Topik panas



