Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Swoole environment dependency


May 14, 2021 Swoole


Table of contents


Swoole environment dependency

  • Only Linux, FreeBSD, MacOS, Class 3 operating systems are supported
  • Linux kernel version 2.3.32 or more
  • PhP5.3.10 or more, including PHP7
  • gcc4.4 or above or clang
  • cmake2.4 plus, compiled as libswoole.so cmake is required as a C/C?library

PhP version dependent

  • Swoole only supports PHP5.3.10 or later, and PHP5.4 plus is recommended
  • swoole does not rely on php's stream, sockets, pcntl, posix, sysvmsg and other extensions. PHP only needs to install the most basic extensions

The recommended Linux distribution

  • CentOS6.2+
  • Ubuntu12+
  • Debian6+

ARM Platform (Raspberry Pi Raspberry PI)

  • Use swoole-1.7.10 or later
  • Cross-compile using GCC
  • When compiling Swoole, you need to manually modify Makefile to remove the -O2 compilation parameter

MIPS Platform (OpenWrt Router)

  • Use swoole-1.7.21 or later
  • Cross-compile using GCC

CygWin Environment Support (Windows Systems)

swoole-1.7.7 adds support for the cygwin environment, in which you can run the swoole program directly using cygwin and php.

  • Install cygwin and install gcc, make, autoconf, php 4 packages
  • Download the swoole source code for phpize / configuration / make / make install in cygwin-shell
  • Modify the php .ini and join swoole.so

In cygwin mode, PHP needs to be simplified to remove unused extensions and prevent processes from consuming too much memory, causing the Fork operation to fail

BashOnWindows

Windows 10 systems add Linux subsysysysysy support, and swoole can be used in BashOn Windows environments

  • The daemonize option must be turned off in the BashOn Windows environment