swoole is configured in a Unix-like environment such as Linux or ios, and the Windows environment does not support it well.
tar compilation and installation reference: https://www.jianshu.com/p/0c0d19c36ed0
Compilation and installation reference: http://www.hu-rong.com/article /323
https://blog.csdn.net/q85795362/article/details/85256206
The steps to install swoole are as follows:
Preparation work:
1. Check the linux (CentOS7.6 is used as an example here) version:
[root@VM_6_21_centos ~]# cat /etc/redhat-release
2. Check the PHP version
[root@VM_6_21_centos ~]# php -v
3. View the extensions installed by PHP
[root@VM_6_21_centos ~]# php -m
4. View the current location:
[root@VM_6_21_centos ~]# pwd
5. Install dependency package files# find / -name phpize Find: 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. I installed lnmp using oneinstack integrated environment
php.ini 位置:/usr/local/php/etc/php.ini 或者 whereis php.ini
Start the installation
1. cd to the home directory and download 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 , copy swoole-src in the /root directory to /usr/local/swoole/
[root@VM_6_21_centos ~]# cp -r /root/swoole-src/. /usr/local/swoole/
3. The location of my PHP installation (php7.2.16) /usr/local/php/bin/php-config (Specific cases will be treated on a case-by-case basis)
[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 configuration location
[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
5. Process View: http://www.hu-rong.com/article/323
PHP Chinese website, a large number of free swoole introductory tutorials, welcome to learn online!
The above is the detailed content of Learn how to install swoole in one article. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
