<commit_before>---
title: Install Kong Enterprise on Amazon Linux 1
---

## Introduction

This guide walks through downloading, installing, and starting **Kong Enterprise** on **Amazon Linux 1**.

The configuration shown in this guide is intended as an example. Depending on your
environment, you may need to make modifications and take measures to properly conclude
the installation and configuration.

Kong supports both PostgreSQL 9.5+ and Cassandra 3.11.* as its datastore. This guide provides
steps to configure PostgreSQL. For assistance in setting up Cassandra, please contact your Sales or Support representative.

## Prerequisites

To complete this installation guide you will need:


* A valid *Bintray* account. You will need your **username**, account **password** and account **API Key**.
  * Example:
    * **Bintray Access key**: `john-company`
    * **Bintray username**: `john-company@kong`
    * **Bintray password**: `<PASSWORD>`
    * **Bintray API key**: `12234e314356291a2b11058591bba195830`
* A supported Amazon Linux 1 system with root equivalent access.
* A valid Kong Enterprise license JSON file, this can be found in your Bintray account. See [Accessing Your License](/enterprise/latest/deployment/access-license)

## Step 1. Prepare to Install Kong Enterprise and Download the License File

There are two options to install Kong Enterprise on Amazon Linux 1. Both require a login to Bintray.

Log in to [Bintray](http://bintray.com). Your Kong Sales or Support contact will assign credentials to you.

{% navtabs %}
{% navtab Download RPM file %}

1. Go to: https://bintray.com/kong/kong-enterprise-edition-aws/aws.
    Kong Enterprise versions are listed in reverse chronological order.
3. Select the latest Kong version from the list.
4. From the Kong version detail page, select the **Files** tab and click the distribution folder.
5. Save the RPM file available. For example, `kong-enterprise-edition-1.3.0.1.aws.rpm`.
6. Copy the RPM file to your home directory on the Amazon Linux 1 system. You may use a command like:

  ```bash
  $ scp kong-enterprise-edition-1.3.0.1.aws.rpm <amazon user>@<server>:~
  ```

*Optional:* The following steps are for verifying the integrity of the package. They are not necessary to move on to [installation](#option-1-if-installing-using-a-downloaded-rpm-package).

1. Download Kong's official public key to ensure the integrity of the RPM package:

    ```bash
    $ curl -o kong.key https://bintray.com/user/downloadSubjectPublicKey?username=kong
    $ sudo rpm --import kong.key
    $ sudo rpm -K kong-enterprise-edition-1.3.0.1.aws.rpm
    ```

2. Verify you get an OK check. You should have an output similar to this:

      ```
      kong-enterprise-edition-1.3.0.1.el7.noarch.rpm: sha1 md5 OK
      ```
{% endnavtab %}
{% navtab Download Kong repo file and add to Yum repo %}

1. Click this URL to download the Kong Enterprise RPM repo file: https://bintray.com/kong/kong-enterprise-edition-aws/rpm.
2. Edit the repo file using your preferred editor and alter the baseurl line as follows:

      ```
      baseurl=https://USERNAME:API_KEY@kong.bintray.com/kong-enterprise-edition-aws
      ```

      - Replace `USERNAME` with your Bintray account user name.
      - Replace `API_KEY` with your Bintray API key. You can find your key on your Bintray profile page at https://bintray.com/profile/edit and selecting the API Key menu item.

      The result should look something like this:

      ```
      baseurl=https://john-company:12234e314356291<PASSWORD>1<PASSWORD>@kong.bintray.com/kong-enterprise-edition-aws
      ```

3. Securely copy the changed repo file to your home directory on the Amazon Linux 1 system. You may use a command like:

    ```bash
    $ scp bintray--kong-kong-enterprise-edition-aws.repo <amazon user>@<server>:~
    ```
{% endnavtab %}
{% endnavtabs %}

### Download your Kong Enterprise License

1. Download your license file from your account files in Bintray: `https://bintray.com/kong/<YOUR_REPO_NAME>/license#files`

2. Securely copy the license file to your home directory on the Amazon Linux system. You may use a command like:

    ```bash
    $ scp license.json <amazon username>@<server>:~
    ```

### Result

You should now have two files in your home directory on the target Amazon system:
- Either the Kong RPM or Kong Yum repo file.
- The license file `license.json`

## Step 2. Install Kong Enterprise

{% navtabs %}
{% navtab Using downloaded RPM package %}

Execute a command similar to the following, using the appropriate RPM file name you downloaded:

```bash
$ sudo yum install kong-enterprise-edition-1.3.0.1.aws.rpm
```
{% endnavtab %}
{% navtab Using Yum repo %}

1. Move the repo file in your home directory to the /etc/yum.repos.d/ directory:

    ```bash
    $ sudo mv bintray--kong-kong-enterprise-edition-aws.repo /etc/yum.repos.d/
    ```

2. Run the installation using the Yum repository:

    ```bash
    $ sudo yum update -y
    $ sudo yum install kong-enterprise-edition -y
    ```
{% endnavtab %}
{% endnavtabs %}



### Option 2: If installing using the Yum repository


### Copy the License File

Copy the license file from your home directory to the `/etc/kong` directory:

```bash
$ sudo cp license.json /etc/kong/license.json
```

## Step 3. Setup PostgreSQL

1. Install PostgreSQL.

    Follow the instructions avaialble at https://www.postgresql.org/download/linux/redhat/ to install a supported version of PostgreSQL. Kong supports version 9.5 and higher. As an example, you can run a command set similar to:

    ```bash
    $ sudo yum install postgresql96 postgresql96-server
    ```

2. Initialize the PostgreSQL database and enable automatic start.

    ```bash
    $ sudo service postgresql96 initdb
    $ sudo service postgresql96 start
    ```

3. Switch to PostgreSQL user and launch PostgreSQL.

    ```bash<commit_msg>Turning URLs into links and minor fixes (#1999)<commit_after>---
title: Install Kong Enterprise on Amazon Linux 1
---

## Introduction

This guide walks through downloading, installing, and starting **Kong Enterprise** on **Amazon Linux 1**.

The configuration shown in this guide is intended as an example. Depending on your
environment, you may need to make modifications and take measures to properly conclude
the installation and configuration.

Kong supports both PostgreSQL 9.5+ and Cassandra 3.11.* as its datastore. This guide provides
steps to configure PostgreSQL. For assistance in setting up Cassandra, please contact your Sales or Support representative.

## Prerequisites

To complete this installation guide you will need:


* A valid *Bintray* account. You will need your **username**, account **password** and account **API Key**.
  * Example:
    * **Bintray Access key**: `john-company`
    * **Bintray username**: `john-company@kong`
    * **Bintray password**: `<PASSWORD>`
    * **Bintray API key**: `12234e314356291a2b11058591bba195830`
* A supported Amazon Linux 1 system with root equivalent access.
* A valid Kong Enterprise license JSON file, this can be found in your Bintray account. See [Accessing Your License](/enterprise/latest/deployment/access-license)

## Step 1. Prepare to Install Kong Enterprise and Download the License File

There are two options to install Kong Enterprise on Amazon Linux 1. Both require a login to Bintray.

Log in to [Bintray](http://bintray.com). Your Kong Sales or Support contact will assign credentials to you.

{% navtabs %}
{% navtab Download RPM file %}

1. Go to: [https://bintray.com/kong/kong-enterprise-edition-aws/aws](https://bintray.com/kong/kong-enterprise-edition-aws/aws).
    Kong Enterprise versions are listed in reverse chronological order.
3. Select the latest Kong version from the list.
4. From the Kong version detail page, select the **Files** tab and click the distribution folder.
5. Save the RPM file available. For example, `kong-enterprise-edition-1.3.0.1.aws.rpm`.
6. Copy the RPM file to your home directory on the Amazon Linux 1 system. You may use a command like:

  ```bash
  $ scp kong-enterprise-edition-1.3.0.1.aws.rpm <amazon user>@<server>:~
  ```

*Optional:* The following steps are for verifying the integrity of the package. They are not necessary to move on to [installation](#option-1-if-installing-using-a-downloaded-rpm-package).

1. Download Kong's official public key to ensure the integrity of the RPM package:

    ```bash
    $ curl -o kong.key https://bintray.com/user/downloadSubjectPublicKey?username=kong
    $ sudo rpm --import kong.key
    $ sudo rpm -K kong-enterprise-edition-1.3.0.1.aws.rpm
    ```

2. Verify you get an OK check. You should have an output similar to this:

      ```
      kong-enterprise-edition-1.3.0.1.el7.noarch.rpm: sha1 md5 OK
      ```
{% endnavtab %}
{% navtab Download Kong repo file and add to Yum repo %}

1. Click this URL to download the Kong Enterprise RPM repo file: [https://bintray.com/kong/kong-enterprise-edition-aws/rpm](https://bintray.com/kong/kong-enterprise-edition-aws/rpm).
2. Edit the repo file using your preferred editor and alter the baseurl line as follows:

      ```
      baseurl=https://USERNAME:API_KEY@kong.bintray.com/kong-enterprise-edition-aws
      ```

      - Replace `USERNAME` with your Bintray account user name.
      - Replace `API_KEY` with your Bintray API key. You can find your key on your Bintray profile page at [https://bintray.com/profile/edit](https://bintray.com/profile/edit) and selecting the API Key menu item.

      The result should look something like this:

      ```
      baseurl=https://john-company:12234e314356291a2b11058591bba195830@kong.bintray.com/kong-enterprise-edition-aws
      ```

3. Securely copy the changed repo file to your home directory on the Amazon Linux 1 system. You may use a command like:

    ```bash
    $ scp bintray--kong-kong-enterprise-edition-aws.repo <amazon user>@<server>:~
    ```
{% endnavtab %}
{% endnavtabs %}

### Download your Kong Enterprise License

1. Download your license file from your account files in Bintray: `https://bintray.com/kong/<YOUR_REPO_NAME>/license#files`

2. Securely copy the license file to your home directory on the Amazon Linux system. You may use a command like:

    ```bash
    $ scp license.json <amazon username>@<server>:~
    ```

### Result

You should now have two files in your home directory on the target Amazon system:
- Either the Kong RPM or Kong Yum repo file.
- The license file `license.json`

## Step 2. Install Kong Enterprise

{% navtabs %}
{% navtab Using downloaded RPM package %}

Execute a command similar to the following, using the appropriate RPM file name you downloaded:

```bash
$ sudo yum install kong-enterprise-edition-1.3.0.1.aws.rpm
```
{% endnavtab %}
{% navtab Using Yum repo %}

1. Move the repo file in your home directory to the `/etc/yum.repos.d/` directory:

    ```bash
    $ sudo mv bintray--kong-kong-enterprise-edition-aws.repo /etc/yum.repos.d/
    ```

2. Run the installation using the Yum repository:

    ```bash
    $ sudo yum update -y
    $ sudo yum install kong-enterprise-edition -y
    ```
{% endnavtab %}
{% endnavtabs %}

### Copy the License File

Copy the license file from your home directory to the `/etc/kong` directory:

```bash
$ sudo cp license.json /etc/kong/license.json
```

## Step 3. Setup PostgreSQL

1. Install PostgreSQL.

    Follow the instructions avaialble at [https://www.postgresql.org/download/linux/redhat/](https://www.postgresql.org/download/linux/redhat/) to install a supported version of PostgreSQL. Kong supports version 9.5 and higher. As an example, you can run a command set similar to:

    ```bash
    $ sudo yum install postgresql96 postgresql96-server
    ```

2. Initialize the PostgreSQL database and enable automatic start.

    ```bash
    $ sudo service postgresql96 initdb
    $ sudo service postgresql96 start
    ```

3. Switch to PostgreSQL user and launch PostgreSQL.

    ```bash
{'fraction_non_alphanumeric': 0.09982413533204924, 'fraction_numerical': 0.019847583954442676, 'mean_word_length': 3.646692607003891, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 20, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 13, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 27, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1085791', 'n_tokens_mistral': 3792, 'n_tokens_neox': 3501, 'n_words': 1402}