centos 7 安装apisix 2.5 - Go语言中文社区

centos 7 安装apisix 2.5


 

1、安装依赖

$ wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo rpm -ivh epel-release-latest-7.noarch.rpm

# 添加OpenResty源
$ sudo yum install yum-utils
$ sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

# 安装OpenResty
$ sudo yum install -y openresty

 

2、安装etcd

 

$ wget https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-arm64.tar.gz
$ tar -xvf etcd-v3.4.15-linux-amd64.tar.gz && 
    cd etcd-v3.4.15-linux-amd64 && 
    sudo cp -a etcd etcdctl /usr/bin/

安装完要启动etcd

$ systemctl start etcd

etcd默认端口是2379

3、安装apisix

3.1、下载安装

$ sudo yum install -y https://github.com/apache/apisix/releases/download/2.5/apisix-2.5-0.x86_64.rpm

#检查 APISIX 的版本号:

$ apisix version

#启动 APISIX:

$ apisix start

3.2、安装dashboard

$ sudo yum install -y https://github.com/apache/apisix-dashboard/releases/download/v2.5/apisix-dashboard-2.5-0.x86_64.rpm

3.3、配置dashboard

进入dashboard目录

$ cd /usr/local/apisix/dashboard/conf

修改conf.yaml

$ vim conf.yaml

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

conf:
  listen:
    host: 127.0.0.1     # `manager api` listening ip or host name
    port: 9000          # `manager api` listening port
  allow_list:           # If we don't set any IP list, then any IP access is allowed by 
    default.
    - 127.0.0.1/24

修改host为0.0.0.0并注释掉allow_list

conf:
  listen:
    host: 0.0.0.0     # `manager api` listening ip or host name
    port: 9000          # `manager api` listening port  
#allow_list:           # If we don't set any IP list, then any IP access is allowed by 
  #  default.
  #  - 127.0.0.1/24

3.4、启动dashboard

$ sudo nohup manager-api -p /usr/local/apisix/dashboard/ &

3.5、访问

在浏览器输入http://hostip:9000,默认登录用户密码均为admin

登录成功进入主界面

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/danielchan2518/article/details/115716139
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2021-05-16 22:57:19
  • 阅读 ( 1059 )
  • 分类:Linux

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢