1、先安装依赖服务
#安装 epel, luarocks
需要它
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
#添加 OpenResty 源
yum install yum-utils
yum-config-manager --add-repo \
https://openresty.org/package/centos/openresty.repo
#安装 OpenResty, etcd 和 编译工具
yum install -y etcd openresty curl git gcc luarocks lua-devel
#开启 etcd server
systemctl start etcd
如果在访问过程中遇到访问不到的问题可以,可以试着关闭一下防火墙和selinux
#防火墙关闭
systemctl stop firewalld.service
systemctl disable firewalld.service
#关闭selinux
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
2、安装APISIX
yum install -y https://github.com/apache/incubator-apisix/releases/download/1.3/apisix-1.3-0.el7.noarch.rpm
启动和关闭apisix
apisix start
apisix stop
查看服务是否启动
查看进程或者监听端口9080
#查看进程
ps aux|grep apisix
#查看端口
netstat -lntp|grep 9080
3、测试
http://127.0.0.1:9080/apisix/dashboard/#/login
admin / 123456
附录
高版本已经内置apisix-dashboard控制台,无需额外安装