ubuntu安装使用openresty
安装:
官网地址:http://openresty.org/cn/linux-packages.html
安装导入 GPG 公钥时所需的几个依赖包(整个安装过程完成后可以随时删除它们)
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
导入 GPG 密钥
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
添加官方 APT 仓库
1 |
|
更新 APT 索引
sudo apt-get update
安装
sudo apt-get -y install openresty
配置:
用户环境变量
1 |
|
系统环境变量
1 |
|
命令(openresty与nginx命令一样):
启动(指定工作目录)
nginx -p openresty_server(工作目录)
查看进程号
ps -ef|grep nginx
重启nginx
kill -HUP 2072(进程号)
关闭nginx
kill -QUIT 2072(进程号)
快捷服务(如果需要)
1 |
|
ubuntu安装使用openresty
https://www.inktea.eu.org/2021/13020.html