在宝塔中新增PHP-FPM主进程

1进入目录,复制一份php-fpm.conf主配置文件

/www/server/php/72/etc
cp php-fpm.conf php-fpm-test.conf

2修改主配置文件

[global]
pid = /www/server/php/72/var/run/php-fpm-test.pid
error_log = /www/server/php/72/var/log/php-fpm-test.log
log_level = notice

[test]
listen = 127.0.0.1:10722
listen.backlog = 8192
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = static
pm.status_path = /phpfpm_72_status
pm.max_children = 120
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 30
request_terminate_timeout = 100
request_slowlog_timeout = 30
slowlog = var/log/slow.log

修改pid error_log listen
修改池的名称[www]为[test]
修改监听的端口listen = 127.0.0.1:10722
3进入/etc/init.d目录

cd /etc/init.d

复制一份自启动文件

cp php-fpm-72 php-fpm-72-test

4修改其中的路径

php_fpm_CONF=${prefix}/etc/php-fpm-test.conf
php_fpm_PID=${prefix}/var/run/php-fpm-test.pid

5启动服务

/etc/init.d/php-fpm-72-test start

6安装宝塔负载均衡-重构版 2.4
7添加tcp负载,添加对应的php-fpm节点


1647575606447.jpg

8修改php版本 指向tcp负载


image.png

结束

你可能感兴趣的:(在宝塔中新增PHP-FPM主进程)