How to Install Kong on Elementary OS Latest
Kong is a popular open-source API gateway used for managing API traffic. In this tutorial, we will show you how to install Kong on Elementary OS Latest.
Prerequisites
Before you begin, ensure that you have the following:
- A running instance of Elementary OS Latest.
- A sudo non-root user account with SSH access.
Step 1 - Install Dependencies
Before installing Kong, you need to install some dependencies required by the application. These include:
- libssl-dev
- libpcre3-dev
- zlib1g-dev
- curl
To install these dependencies, open the terminal and type:
sudo apt update
sudo apt install -y libssl-dev libpcre3-dev zlib1g-dev curl
Step 2 - Download and Install Kong
After installing the dependencies, you can proceed to download and install Kong on your system.
- Start by opening the terminal and creating a new directory where you will download Kong.
mkdir Kong
cd Kong
- Next, download the Kong Debian package using the curl command and verify the download by running the following commands on your terminal:
curl -OL https://bintray.com/kong/kong-deb/download_file?file_path=dists/kong-community-edition-1.4.0.bionic.amd64.deb
sha256sum kong-community-edition-1.4.0.bionic.amd64.deb
Ensure that the sha256 hash matches the one posted on the Kong download page.
- Install Kong by running the following command:
sudo apt install ./kong-community-edition-1.4.0.bionic.amd64.deb
This will install Kong on your system.
Step 3 - Start and Verify Kong
After installing Kong, you need to start it and verify that the service is running correctly.
- Start Kong by running the following command on your terminal:
sudo systemctl start kong
- Next, check the Kong service status to ensure it is running correctly:
sudo systemctl status kong
If Kong is running without any issues, you should see an output similar to the one below:
● kong.service - Kong
Loaded: loaded (/lib/systemd/system/kong.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2021-09-20 08:59:27 EDT; 5s ago
- Verify that Kong works by opening a web browser and typing
http://localhost:8000in the address bar. You should see the Kong welcome page as shown below:
Welcome to Kong
You have successfully installed Kong.
The documentation can be found at:
https://docs.konghq.com/
Conclusion
Congratulations, you have successfully installed Kong on your Elementary OS Latest system. You can now start using Kong to manage your API traffic.