游戏人生
首页
(current)
GameDevTools
登陆
|
注册
个人中心
注销
OpenResty 教程
OpenResty 简介
OpenResty Ubuntu安装
OpenResty 第一个例子
OpenResty 目录结构
OpenResty 启动和关闭
OpenResty 热重启
OpenResty 执行lua代码
OpenResty 执行lua文件
OpenResty 网站服务
OpenResty 访问指定网页
OpenResty 多网页网站
OpenResty 日志
OpenResty 流水线
OpenResty ip黑名单
OpenResty 反向代理
OpenResty 负载均衡
<< OpenResty 简介
OpenResty 第一个例子 >>
OpenResty Ubuntu18.04 安装教程
本篇介绍Ubuntu18.04 安装OpenResty。 其他系统可参考官方文档: ```shell http://openresty.org/en/linux-packages.html ``` ------------ #### 1.禁用之前安装的nginx ```shell sudo systemctl disable nginx sudo systemctl stop nginx ``` ------------ #### 2.添加APT仓库 你可以在你的 Ubuntu 系统中添加我们的 APT 仓库,这样就可以便于未来安装或更新我们的软件包(通过 apt-get update 命令)。 运行下面的命令就可以添加仓库(每个系统只需要运行一次): ```shell # 安装导入 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 仓库: echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" \ | sudo tee /etc/apt/sources.list.d/openresty.list # 更新 APT 索引: sudo apt-get update ``` ------------ #### 3.安装openresty ```shell sudo apt-get -y install openresty ``` 这个包同时也推荐安装 openresty-opm 和 openresty-restydoc 包,所以后面两个包会缺省安装上。 如果你不想自动关联安装,可以用下面方法关闭自动关联安装: ```shell sudo apt-get -y install --no-install-recommends openresty ```
<< OpenResty 简介
OpenResty 第一个例子 >>
提交
5ec89dfbf9046103c7132d05