OpenResty开机启动
在安装完OpenResty后,完成以下两步即可实现开机启动。
安装:可参考官网https://openresty.org/en/installation.html
注意的是,安装之前,要安装必要的库文件,官网上也有详细介绍。
然后在/etc目录下
vim rc.local
添加下面一行
/usr/local/openresty/nginx/sbin/ ./nginx -c /usr/local/openresty/nginx/conf/nginx.conf
然后添加环境变量
同样在/etc目录下
vim profile
添加下面一行,然后执行:source profile使之生效
export PATH=$PATH:/usr/local/openresty/nginx/sbin