1、安装lnmp环境
2、设置lnmp vhost add 添加网站
3、上传代码
4、文件权限
chmod -R 777 storage
5、修改配置
网站如果打开显示空白 500错误
需要修改 /usr/local/nginx/conf/fastcgi.conf
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/kws/:/tmp/:/proc/";
6、安装swoole
pecl install swoole
配置php.ini (现在正常都会自动加
编译安装成功后,修改php.ini加入
extension=swoole.so
7、安装supervisor监听y
//安装python3
yum install python3 python3-devel
//安装supervisor
pip3 install supervisor
//生成文件
echo_supervisord_conf > /etc/supervisord.conf
echo -e "[include]nfiles = /etc/supervisor/*.conf" >> /etc/supervisord.conf
//创建文件夹
mkdir /etc/supervisor
//写入数据
cat > /etc/supervisor/horizon.conf <<EOF
[program:horizon]
process_name=horizon
command=php /home/wwwroot/kws/artisan horizon
autostart=true
autorestart=true
process_name=%(program_name)s_%(process_num)02d
numprocs=6
user=root
redirect_stderr=true
stdout_logfile=/home/wwwroot/kws/horizon.log
EOF
//启动
supervisord -c /etc/supervisord.conf
然后打开
网址/horizon/dashboard 看看是否正常
8、安装Puppeteer (特殊场景)