Skip to content

Latest commit

 

History

History
170 lines (117 loc) · 4.95 KB

install.md

File metadata and controls

170 lines (117 loc) · 4.95 KB
title
Basic Deploy

Installing Apache APISIX Dashboard on Linux is easy. Now, we provide Docker image and RPM installation package.

Docker {#docker}

We recommend using Docker to run Dashboard:

docker pull apache/apisix-dashboard
docker run -d --name dashboard \
           -p 9000:9000        \
           -v <CONFIG_FILE>:/usr/local/apisix-dashboard/conf/conf.yaml \
           apache/apisix-dashboard

:::note Please replace <CONFIG_FILE> with the absolute path to your configuration file. :::

RPM {#rpm}

NOTE: Only CentOS 7 is supported currently.

Install

# 1. install RPM package
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

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.

Source {#source}

The Dashboard project contains both manager-api and web, but web is optional.

The manager-api and web will be included in this build guide product.

Prerequisites {#source-prerequisites}

Before using source codes to build, make sure that the following dependencies are installed in your environment.

For manager-api:

  1. Golang 1.16+

Tip: For users in mainland China, you can use the following command to speed up the module downloads.

$ go env -w GOPROXY=https://goproxy.cn,direct

For web:

  1. Node.js current LTS (14.x+)
  2. Yarn

Download {#source-download}

git clone -b release/3.0 https://github.com/apache/apisix-dashboard.git && cd apisix-dashboard

Build {#source-build}

cd apisix-dashboard
make build

When the build is complete, the results are stored in the root output directory.

Note: make build will build manager-api and web, use the make help command to see more commands.

Launch {#source-launch}

  1. After the build is complete and before you start, make sure the following dependencies are installed and running in your environment.
  1. Check and modify the configuration information in output/conf/conf.yaml according to your deployment environment.

  2. Launch the Dashboard

cd ./output

./manager-api
  1. 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.

Service {#source-service}

You will need to handle your own service management when deploying using the source code compilation method. We provide a service file template for operating systems that use the Systemd service manager.

  1. Install
mkdir -p /usr/local/apisix-dashboard
cp -rf ./output/* /usr/local/apisix-dashboard
  1. Create service unit

Copy the following or use this file directly, you need to copy it to the /usr/lib/systemd/system directory and execute the systemctl daemon-reload command.

# copy service unit
cp ./api/service/apisix-dashboard.service /usr/lib/systemd/system/apisix-dashboard.service
systemctl daemon-reload

# or: If you need to modify the service unit, you can use the following command
echo "[Unit]
Description=apisix-dashboard
Conflicts=apisix-dashboard.service
After=network-online.target

[Service]
WorkingDirectory=/usr/local/apisix-dashboard
ExecStart=/usr/local/apisix-dashboard/manager-api -c /usr/local/apisix-dashboard/conf/conf.yaml" > /usr/lib/systemd/system/apisix-dashboard.service
  1. Manage service

You can use the following command to manage the service.

# start apisix-dashboard
systemctl start apisix-dashboard

# stop apisix-dashboard
systemctl stop apisix-dashboard

# check apisix-dashboard status
systemctl status apisix-dashboard