The Tyk Gateway can be installed following different installation methods including Shell and Ansible. Please select by clicking the tab with the installation path most suitable for you.

Supported Distributions

DistributionVersionSupported
CentOS8
CentOS7
RHEL8
RHEL7

Requirements

Before you begin the installation process, make sure you have the following:
  • Ensure port 8080 is open for Gateway traffic (the API traffic to be proxied).
  • The Tyk Gateway has a dependency on Redis. Follow the steps provided by Red Hat to make the installation of Redis, conducting a search for the correct version and distribution.

Step 1: Create Tyk Gateway Repository Configuration

Create a file named /etc/yum.repos.d/tyk_tyk-gateway.repo that contains the repository configuration settings for YUM repositories tyk_tyk-gateway and tyk_tyk-gateway-source used to download packages from the specified URLs. This includes GPG key verification and SSL settings, on a Linux system.Make sure to replace el and 8 in the config below with your Linux distribution and version:
[tyk_tyk-gateway]
name=tyk_tyk-gateway
baseurl=https://packagecloud.io/tyk/tyk-gateway/el/8/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/tyk/tyk-gateway/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[tyk_tyk-gateway-source]
name=tyk_tyk-gateway-source
baseurl=https://packagecloud.io/tyk/tyk-gateway/el/8/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/tyk/tyk-gateway/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Update your local yum cache by running:
sudo yum -q makecache -y --disablerepo='*' --enablerepo='tyk_tyk-gateway'

Step 2: Install Tyk Gateway

Install the Tyk Gateway using yum:
sudo yum install -y tyk-gateway
You may be asked to accept the GPG key for our two repos and when the package installs, hit yes to continue.

Step 3: Start Redis

If Redis is not running then start it using the following command:
sudo service redis start

Step 4: Configuring The Gateway

You can set up the core settings for the Tyk Gateway with a single setup script, however for more complex deployments you will want to provide your own configuration file.
Replace <hostname> in --redishost=<hostname> with your own value to run this script.
sudo /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=<hostname> --redisport=6379 --domain=""
What you’ve done here is told the setup script that:
  • --listenport=8080: Listen on port 8080 for API traffic.
  • --redishost=<hostname>: The hostname for Redis.
  • --redisport=6379: Use port 6379 for Redis.
  • --domain="": Do not filter domains for the Gateway, see the note on domains below for more about this.
In this example, you don’t want Tyk to listen on a single domain. It is recommended to leave the Tyk Gateway domain unbounded for flexibility and ease of deployment.

Step 5: Start the Tyk Gateway

The Tyk Gateway can be started now that it is configured. Use this command to start the Tyk Gateway:
sudo service tyk-gateway start

Next Steps Tutorials

Follow the Tutorials on the Community Edition tabs for the following:
  1. Add an API
  2. Create a Security Policy
  3. Create an API Key