apache apisix和apisix-dashboard安裝步驟
?
1. 安裝Openresty裳扯、etcd聚唐、luarocks
?
1.1 Openresty安裝
# 添加 OpenResty 源
yum install yum-utils
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
# 安裝 OpenResty 和 編譯工具
yum install -y openresty curl gcc
?
1.2 etcd安裝
wget https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz
tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
cd etcd-v3.4.13-linux-amd64 && \
cp -a etcd etcdctl /usr/local/bin/
啟動(dòng):nohup etcd &
?
1.3 luarocks安裝
# 安裝luarocks和依賴
yum install -y git luarocks lua-devel
?
1.4. apisix安裝
?
1.4.1 yum安裝
yum install -y https://github.com/apache/apisix/releases/download/2.1/apisix-2.1-0.el7.noarch.rpm
1.4.2 啟動(dòng)服務(wù)
apisix start
?
2.apisix-dashboard安裝
apisix-dashboard需要依賴go 1.13+,node 10.23.0+的版本,所以,需要提前安裝好go和node链蕊。
附下載地址:
go:
https://studygolang.com/dl/golang/go1.14.13.linux-amd64.tar.gz
node:
https://npm.taobao.org/mirrors/node/v12.19.0/node-v12.19.0-linux-x64.tar.gz
?
2.1 安裝go和node,并配置環(huán)境變量谬泌。
# go
export GOROOT=/usr/local/golang
export GOPATH=$GOROOT/workspace
export GOBIN=$GOPATH/bin
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
?
# node
export NODEJS_HOME=/usr/local/nodejs
export PATH=$NODEJS_HOME/bin:$PATH
?
2.2 使用node安裝yarn滔韵。
npm install -g yarn
2.3 拉取apisix-dashboard源碼,使用make build
構(gòu)建掌实。
# Clone the project
git clone https://github.com/apache/apisix-dashboard.git
?
2.4構(gòu)建完畢陪蜻,進(jìn)入到output/conf
下,修改conf.yaml
配置文件贱鼻,修改連接host地址宴卖,執(zhí)行nohup ./manager-api &
啟動(dòng)服務(wù)滋将。
conf:
listen:
host: 172.16.0.100 # `manager api` listening ip or host name
port: 9000 # `manager api` listening port
etcd:
endpoints: # supports defining multiple etcd host addresses for an etcd cluster
- 127.0.0.1:2379
?