实用功能:
系统 | 服务器实时数据 | 网络使用状况 |
---|---|---|
Linux | √ | √ |
Windows | √ | 总流量 |
Freebsd | √ | × |
OpenWRT/LEDE | √ | √ |
Android | √ | √ |
Alpine Linux 3.18:
apk update
apk add git composer php7 php7-posix php7-pcntl php7-session php7-json
Ubuntu 20.04:
apt update
apt install php7.4-cli php7.4-curl composer -y
Fedora 37:
dnf update
dnf install php-cli php-json composer
Debian 11:
apt update
apt-get install php7.4-cli composer git
Debian 8.11:
apt update
apt-get install curl php5-cli php5-json git # Debian 8.11
php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');"
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
Ubuntu 18.04:
apt install php7.2-cli php7.2-json composer git -y #
Then do:
git clone https://github.com/wwng2333/tz.git
cd tz
composer install
php tz.php start
<?php
use Workerman\Worker;
require_once __DIR__ . '/vendor/autoload.php';
#Worker::$stdoutFile = 'tz.log'; //日志,默认禁用
$http_worker = new Worker("http://0.0.0.0:2345"); //监听地址
$http_worker->name = 'Proberv'; //实例名称
$http_worker->user = 'root'; //以哪个用户运行
$http_worker->count = 3; //子进程数量