System Requirements
Windows Users
Starting from version 3.5.3, Workerman has been able to support both Linux and Windows systems simultaneously.
-
Requires PHP>=5.4 and a properly configured PHP environment variable.
-
The Windows version of Workerman does not depend on any extensions.
-
For installation usage and limitations, refer to here.
-
Due to various limitations of Workerman on Windows, it is recommended to use a Linux system in production environments; Windows systems are only suggested for development environments.
====The content below this page is only applicable to Linux users; Windows users please ignore. ====
Linux Users (including Mac OS)
Linux users should only use the Linux version of Workerman.
-
Install PHP>=5.4 and ensure the pcntl and posix extensions are installed.
-
It is recommended to install the event extension, but it is not mandatory (note that the event extension requires PHP>=5.4).
Linux Environment Check Script
Linux users can run the following script to check if the local environment meets Workerman requirements:
curl -Ss https://www.workerman.net/check | php
If the script shows all "ok", it means the Workerman runtime environment is satisfied.
(Note: The detection script does not check for the event extension. If the concurrent connection count exceeds 1024, it is recommended to install the event extension. Refer to the next section for installation methods.)
Detailed Explanation
About PHP-CLI
Workerman runs based on PHP Command Line Interface (PHP-CLI). PHP-CLI is an independent executable program and does not conflict with PHP-FPM or Apache's MOD-PHP, having no mutual dependencies and being completely independent.
About Workerman Dependencies
The pcntl extension is an important extension for process control in the Linux environment for PHP, and Workerman utilizes its features for process creation, signal control, timers, and process state monitoring. This extension is not supported on Windows platform.
The posix extension allows PHP to call system interfaces provided by the POSIX standard in the Linux environment. Workerman mainly uses its related interfaces to achieve daemonization, user group control, and other functions. This extension is not supported on Windows platform.
The event extension allows PHP to use advanced event handling mechanisms like Epoll and Kqueue, which can significantly improve CPU utilization for Workerman under high concurrent connections. It is crucial in high concurrency long connection applications. The libevent extension (or event extension) is not mandatory; if not installed, the default PHP native Select event handling mechanism will be used.
How to Install Extensions
Refer to the Installing Extensions section.