Installation

Refer to the Getting Started guide for a quick walk-through on running Apache APISIX.

APISIX can be installed by the different methods listed below:

  • Docker
  • Helm
  • RPM

First clone the apisix-docker repository:

Now, you can use to start APISIX.

  • x86
  • ARM/M1
    1. docker-compose -p docker-apisix -f docker-compose-arm64.yml up -d

    To install APISIX via Helm, run:

    1. helm repo add apisix https://charts.apiseven.com
    2. helm repo update
    3. helm install apisix apisix/apisix --create-namespace --namespace apisix

    You can find other Helm charts on the repository.

    This installation method is suitable for CentOS 7 and Centos 8. If you choose this method to install APISIX, you need to install etcd first. For the specific installation method, please refer to Installing etcd.

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

    If OpenResty is installed, the command below will install the APISIX repositories:

    Then, to install APISIX, run:

    1. sudo yum install apisix
    tip

    You can also install a specific version of APISIX by specifying it:

    1. sudo yum install apisix-2.13.1

    First, download APISIX RPM offline package to an apisix folder:

    1. sudo mkdir -p apisix
    2. sudo yum clean all && yum makecache
    3. sudo yum install -y --downloadonly --downloaddir=./apisix apisix

    Then copy the apisix folder to the target host and run:

    1. sudo yum install ./apisix/*.rpm

    Once APISIX is installed, you can initialize the configuration file and etcd by running:

    To start APISIX server, run:

    1. apisix start
    Installation - 图2tip

    APISIX uses to save and synchronize configuration. Before installing APISIX, you need to install etcd on your machine.

    It would be installed automatically if you choose the Docker or Helm install method while installing APISIX. If you choose a different method or you need to install it manually, follow the steps shown below:

    • Linux
    • macOS
    1. wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
    2. tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \
    3. cd etcd-v${ETCD_VERSION}-linux-amd64 && \
    4. nohup etcd >/tmp/etcd.log 2>&1 &
    1. brew install etcd
    2. brew services start etcd

    It is recommended to modify the Admin API key to ensure security.

    You can update your configuration file as shown below:

    conf/config.yaml

    1. apisix:
    2. admin_key
    3. -
    4. name: "admin"
    5. key: newsupersecurekey
    6. role: admin

    Now, to access the Admin API, you can use the new key:

    If you installed APISIX via RPM, the APISIX unit file will already be configured and you can start APISIX by:

    1. systemctl start apisix

    See the guide for a quick walk-through of using APISIX.