安装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文章来源:https://www.toymoban.com/news/detail-824771.html
#安装dashboard文章来源地址https://www.toymoban.com/news/detail-824771.html
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
到了这里,关于apisix 单机部署 linux的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!