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/
启动: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 启动服务
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,并配置环境变量。
# 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构建。
# Clone the project
git clone https://github.com/apache/apisix-dashboard.git
2.4构建完毕,进入到output/conf下,修改conf.yaml配置文件,修改连接host地址,执行nohup ./manager-api &启动服务。
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
2.5使用http://172.16.0.100:9000访问服务。
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。