apisix 单机部署 linux

安装etcd:

cd /home/app
rz 
tar -zxvf etcd-v3.5.4-linux-amd64.tar.gz
cd etcd-v3.5.4-linux-amd64
vim start.sh

内容:
#!/bin/sh
nohup etcd --name infra0 --initial-advertise-peer-urls http://127.0.0.1:2380 \
  --listen-peer-urls http://127.0.0.1:2380 \
  --listen-client-urls http://127.0.0.1:2379\
  --advertise-client-urls http://127.0.0.1:2379 \
  --initial-cluster-token etcd-cluster-1 \
  --initial-cluster infra0=http://127.0.0.1:2380\
  --initial-cluster-state new >./logs/etcd.log 2>&1 &
  

chmod 755 start.sh
mkdir logs

sudo cp -a etcd etcdctl /usr/bin/

sh start.sh

tail -f logs/etcd.log

etcdctl member list
etcdctl put key value
etcdctl get key

#安装apisix

cd /home/app
sudo yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --add-repo https://repos.apiseven.com/packages/centos/apache-apisix.repo
sudo yum install -y apisix 3.2

cd /usr/local/apisix/conf

rm -rf config-default.yaml

#上传config-default.yaml
rz   
chmod 755 config-default.yaml

cd /usr/local/apisix

#启动apisix
apisix start

#安装dashboard

cd /home/app

sudo yum install -y https://github.com/apache/apisix-dashboard/releases/download/v3.0.0/apisix-dashboard-3.0.0-0.el7.x86_64.rpm

vim  /usr/local/apisix/dashboard/conf/conf.yaml
修改内容:
  #allow_list:             # If we don't set any IP list, then any IP access is allowed by default.
    #- 0.0.0.0           # The rules are checked in sequence until the first match is found.
    #- ::1 

启动:
sudo systemctl start apisix-dashboard

停止:
sudo systemctl stop apisix-dashboard

查看状态:
sudo systemctl status apisix-dashboard
  • 6
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值