我是靠谱客的博主 害怕歌曲,这篇文章主要介绍[APISIX] CentOS7安装Apache APISIX及apisix-dashboard一. 安装Apache APISIX二. 安装apisix-dashboard,现在分享给大家,希望可以做个参考。

一. 安装Apache APISIX

APISIX官方文档

1.通过 RPM 仓库安装APISIX(CentOS 7)

如果尚未安装 OpenResty 的官方 RPM 仓库,请使用以下命令自动安装 OpenResty 和 Apache APISIX 的 RPM 仓库。

$ sudo yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm

2. 运行以下命令安装 Apache APISIX。

# 查看仓库中最新的 apisix 软件包的信息
$ sudo yum info -y apisix

# 显示仓库中现有的 apisix 软件包
$ sudo yum --showduplicates list apisix

# 安装最新的 apisix 软件包
$ sudo yum install apisix

3. 以下命令通过二进制方式安装并启动 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 
sudo cp -a etcd etcdctl /usr/bin/
nohup etcd &

4. 管理 Apache APISIX 服务

# 运行以下命令初始化 NGINX 配置文件和 etcd. initialize NGINX config file and etcd
$ apisix init

# generate `nginx.conf` from `config.yaml` and test it
$ apisix test

# 启动 Apache APISIX. start Apache APISIX server
$ apisix start

# 其他命令
# 优雅停机 stop Apache APISIX server gracefully
$ apisix quit

# 强制停机 stop Apache APISIX server immediately
$ apisix stop

# 其他操作 more actions find by `help`
$ apisix help

二. 安装apisix-dashboard

apisix-dashboard 安装文档 依然采用最简单的RPM安装

Install

# 1. install RPM package
sudo yum install -y https://github.com/apache/apisix-dashboard/releases/download/v2.10.1/apisix-dashboard-2.10.1-0.el7.x86_64.rpm

Launch

# run dashboard in the shell
sudo manager-api -p /usr/local/apisix/dashboard/

# 推荐使用这个 or run dashboard as a service
systemctl start apisix-dashboard

Without changing the configuration, visit http://127.0.0.1:9000 to use the dashboard with GUI, where the default username and password are admin.

注意, 这时候虽然启动成功但只能本机访问, 其他机器访问需要修改配置后重启:

配置文件在

vim /usr/local/apisix/dashboard/conf/conf.yaml

 备注掉 allow_list后重启 dashboard

systemctl restart apisix-dashboard

关闭防火墙, 远程访问9000端口成功!

最后

以上就是害怕歌曲最近收集整理的关于[APISIX] CentOS7安装Apache APISIX及apisix-dashboard一. 安装Apache APISIX二. 安装apisix-dashboard的全部内容,更多相关[APISIX]内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(118)

评论列表共有 0 条评论

立即
投稿
返回
顶部