安装依赖

注意

  • Apache APISIX 目前只支持 版本的 etcd,但是最新版的 etcd (从 3.4 起)已经默认关闭了 v2 版本的功能。所以你需要添加启动参数 --enable-v2=true 来开启 v2 的功能,目前对 v3 etcd 的开发工作已经启动,不久后便可投入使用。
  • 如果你要想使用 Tengine 替代 OpenResty,请参考 。

CentOS 7

  1. wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  2. sudo rpm -ivh epel-release-latest-7.noarch.rpm
  3. # 添加 OpenResty 源
  4. sudo yum install yum-utils
  5. # 安装 OpenResty, etcd 和 编译工具
  6. sudo yum install -y etcd openresty curl git gcc luarocks lua-devel
  7. # 开启 etcd server
  8. sudo service etcd start

Fedora 31 & 32

Ubuntu 16.04 & 18.04

  1. # 添加 OpenResty 源
  2. wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
  3. sudo apt-get -y install software-properties-common
  4. sudo apt-get update
  5. # 安装 OpenResty, etcd 和 编译工具
  6. sudo apt-get install -y git etcd openresty curl luarocks
  7. # 开启 etcd server
  8. sudo service etcd start

Debian 9 & 10

Mac OSX

  1. # 安装 OpenResty, etcd 和 编译工具
  2. brew install openresty/brew/openresty etcd luarocks curl git
  3. etcd --enable-v2=true &