115 Star 697 Fork 166

GVPiresty / Apache APISIX

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
install-dependencies.md 3.87 KB
一键复制 编辑 原始数据 按行查看 历史

安装依赖

注意

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

CentOS 7

# 安装 epel, `luarocks` 需要它
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm

# 添加 OpenResty 源
sudo yum install yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

# 安装 OpenResty, etcd 和 编译工具
sudo yum install -y etcd openresty curl git gcc luarocks lua-devel

# 开启 etcd server
sudo service etcd start

Fedora 31 & 32

# add OpenResty source
sudo yum install yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/fedora/openresty.repo

# install OpenResty, etcd and some compilation tools
sudo yum install -y etcd openresty curl git gcc luarocks lua-devel

# start etcd server
sudo etcd --enable-v2=true &

Ubuntu 16.04 & 18.04

# 添加 OpenResty 源
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
sudo apt-get update

# 安装 OpenResty, etcd 和 编译工具
sudo apt-get install -y git etcd openresty curl luarocks

# 开启 etcd server
sudo service etcd start

Debian 9 & 10

# 可选
sed -i 's|^deb http://deb.debian.org/debian|deb http://mirrors.huaweicloud.com/debian|g' /etc/apt/sources.list
sed -i 's|^deb http://security.debian.org/debian-security|deb http://mirrors.huaweicloud.com/debian-security|g' /etc/apt/sources.list
apt update
apt install wget gnupg -y

# 添加 OpenResty 源
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y "deb http://openresty.org/package/debian $(lsb_release -sc) openresty"
sudo apt-get update

# 安装 etcd
wget https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz
tar -xvf etcd-v3.3.13-linux-amd64.tar.gz && \
    cd etcd-v3.3.13-linux-amd64 && \
    sudo cp -a etcd etcdctl /usr/bin/

# 安装 OpenResty, etcd 和 编译工具
sudo apt-get install -y git openresty curl luarocks make

# 开启 etcd server
nohup etcd &

Mac OSX

# 安装 OpenResty, etcd 和 编译工具
brew install openresty/brew/openresty etcd luarocks curl git

# 开启 etcd server 并启用 v2 的功能
etcd --enable-v2=true &
Lua
1
https://gitee.com/iresty/apisix.git
git@gitee.com:iresty/apisix.git
iresty
apisix
Apache APISIX
v1.5

搜索帮助