How to Install Webman

Install PHP + Composer Environment on Linux (Skip if you already have the environment)

curl -sO https://www.workerman.net/install-php-and-composer && sudo bash install-php-and-composer

Note
The above command applies to Linux/Mac systems; Windows users need to install the PHP environment themselves.

You can also manually download the official static PHP provided by Webman and extract it for use.

1. Create a Project

composer create-project workerman/webman:~2.0

Tip
If there is an error, it may be due to a problematic Composer mirror proxy. Please execute composer config -g --unset repos.packagist to cancel the proxy.

2. Run

Navigate to the Webman directory

Windows Users

Double-click windows.bat or run php windows.php to start.

Tip
If there is an error, it is likely that some functions are disabled. Refer to the Function Disable Check to lift the restrictions.

Linux Users

Run in debugging mode (for development debugging, printed data will be displayed in the terminal; if the terminal is closed, the Webman service will also close)

php start.php start

Run in daemon mode (for production environment, printed data will not be displayed in the terminal; if the terminal is closed, the Webman service will continue running)

php start.php start -d

Docker Users

Start all services and attach to the console

docker-compose up

Run services in the background mode

docker-compose up -d

Tip
If there is an error, it is likely that some functions are disabled. Refer to the Function Disable Check to lift the restrictions.

3. Access

Access in a browser at http://ip地址:8787