Tyk has it’s own signed RPMs in a Yum repository hosted by the kind folks at packagecloud.io, which makes it easy, safe and secure to install a trusted distribution of the Tyk Gateway stack.
This tutorial will run on an Amazon AWS Red Hat Enterprise Linux 7.1 instance. We will install Tyk Gateway with all dependencies stored locally.
We’re installing on a
t2.micro because this is a tutorial, you’ll need more RAM and more cores for better performance.
This configuration should also work (with some tweaks) for CentOS.
- Ensure port
8080is open: this is used in this guide for Gateway traffic (API traffic to be proxied)
Step 1. Set up our YUM repositories:
First, we need to install some software hat allows us to use signed packages:
sudo yum install pygpgme yum-utils wget
Next, we need to set up the various repository configurations for Tyk and MongoDB:
Create a file named
/etc/yum.repos.d/tyk_tyk-gateway.repo that contains the repository configuration below:
[tyk_tyk-gateway] name=tyk_tyk-gateway baseurl=https://packagecloud.io/tyk/tyk-gateway/el/7/$basearch repo_gpgcheck=1 enabled=1 gpgkey=http://keyserver.tyk.io/tyk.io.rpm.signing.key https://packagecloud.io/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt [tyk_tyk-gateway-source] name=tyk_tyk-gateway-source baseurl=https://packagecloud.io/tyk/tyk-gateway/el/7/SRPMS repo_gpgcheck=1 enabled=1 gpgkey=http://keyserver.tyk.io/tyk.io.rpm.signing.key https://packagecloud.io/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
What’s this? EPEL (Extra Packages for Enterprise Linux) is a free, community based repository project from Fedora which provides high quality add-on software packages for Linux distribution including RHEL, CentOS, and Scientific Linux. Epel isn’t not a part of RHEL/CentOS but it is designed for major Linux distributions. In our case we need it for Redis
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-7.noarch.rpm sudo rpm -ivh epel-release-7-5.noarch.rpm
Finally we’ll need to update our local cache, so run:
sudo yum -q makecache -y --disablerepo='*' --enablerepo='tyk_tyk-gateway' --enablerepo=epel info zabbix
Step 2. Install our packages:
We’re ready to go, you can now install the relevant packages using yum:
sudo yum install -y redis 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
In many cases Redis will not be running, so lets start those:
sudo service redis start
When Tyk is finished installing, it will have installed some init scripts, but it will not be running yet. The next step will be to setup the gateway – thankfully this can be done with three very simple commands, however it does depend on whether you are configuring Tyk Gateway for use with the Dashboard or without (Community Edition).