Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update installation guide #11160

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions docs/en/latest/building-apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,10 @@ To build and package APISIX for a specific platform, see [apisix-build-tools](ht

## Building APISIX from source

First of all, we need to specify the version `APISIX_VERSION` to be installed:

```shell
APISIX_VERSION='3.9.0'
```

Then, you can run the following command to clone the APISIX source code from Github:

```shell
git clone --depth 1 --branch ${APISIX_VERSION} https://github.com/apache/apisix.git apisix-${APISIX_VERSION}
git clone --depth 1 --branch master https://github.com/apache/apisix.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shreemaan-abhishek are these the agreed upon changes?

image

I dont have additional comments otherwise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

```

Alternatively, you can also download the source package from the [Downloads](https://apisix.apache.org/downloads/) page. Note that source packages here are not distributed with test cases.
Expand Down
80 changes: 42 additions & 38 deletions docs/en/latest/installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,42 @@ This guide walks you through how you can install and run Apache APISIX in your e

Refer to the [Getting Started](./getting-started/README.md) guide for a quick walk-through on running Apache APISIX.

## Installing etcd

APISIX uses [etcd](https://github.com/etcd-io/etcd) 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:

<Tabs
groupId="os"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'mac'},
]}>
<TabItem value="linux">

```shell
ETCD_VERSION='3.5.4'
wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \
cd etcd-v${ETCD_VERSION}-linux-amd64 && \
sudo cp -a etcd etcdctl /usr/bin/
nohup etcd >/tmp/etcd.log 2>&1 &
```

</TabItem>

<TabItem value="mac">

```shell
brew install etcd
brew services start etcd
```

</TabItem>
</Tabs>

## Installing APISIX

APISIX can be installed by the different methods listed below:
Expand Down Expand Up @@ -222,42 +258,6 @@ If you want to build APISIX from source, please refer to [Building APISIX from s
</TabItem>
</Tabs>

## Installing etcd

APISIX uses [etcd](https://github.com/etcd-io/etcd) 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:

<Tabs
groupId="os"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'mac'},
]}>
<TabItem value="linux">

```shell
ETCD_VERSION='3.5.4'
wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \
cd etcd-v${ETCD_VERSION}-linux-amd64 && \
sudo cp -a etcd etcdctl /usr/bin/
nohup etcd >/tmp/etcd.log 2>&1 &
```

</TabItem>

<TabItem value="mac">

```shell
brew install etcd
brew services start etcd
```

</TabItem>
</Tabs>

## Next steps

### Configuring APISIX
Expand All @@ -271,9 +271,13 @@ You can configure your APISIX deployment in two ways:
apisix start -c <path to config file>
```

APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured.
APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured. Generally, APISIX gets installed at `/usr/local/apisix/` directory, so your configuration file will be present at `/usr/local/apisix/conf/` path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured. Generally, APISIX gets installed at `/usr/local/apisix/` directory, so your configuration file will be present at `/usr/local/apisix/conf/` path.
APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured. Generally, APISIX gets installed at `/usr/local/apisix/` directory, so the configuration file will be present at `/usr/local/apisix/conf/`.


If you are unable to start APISIX and observe `Bind address already in use` in logs, it means the ports APISIX wants to use are already occupied by other running processes. Upon reviewing the use of these processes, you may decide to kill these processes or configure APISIX to use other non-conflicting ports.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is pretty basic stuff, we can remove this.


Other way is to configure the default listening port to other available port on your local machine.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


For example, to configure the default listening port to be `8000` without changing other configurations, your configuration file could look like this:
In order to configure the default listening port to be `8000` without changing other configurations, your configuration file should look like this:

```yaml title="conf/config.yaml"
apisix:
Expand Down
Loading