Next, search for the “supervised” attribute. Next, we need to perform some configuration so modify the config file by executing the following: $ nano /etc/redis/nf
Install redis on ec2 install#
This will download and install Redis and its dependencies. Ubuntu 18.04 includes Redis as one of it’s packages, so you don’t have to connect to any other repositories to install. Once these commands have been executed, your Ubuntu server will be up to date with the latest version of its packages. I use the sudo -s command so that I don’t have to type sudo every line. The first thing I like to do on a new server instance is make sure everything is up to date. pem file with an access key (if you don’t already have one) in order to connect to the server.
Install redis on ec2 how to#
If you’re on a Windows computer and want to use PowerShell as your SSH client, check out this great article on How to Enable SSH in PowerShell. I use a Mac, so the Terminal found in Applications > Utilities > Terminal works perfectly for me. The next step was to connect to the server using SSH.
Next, I clicked on “Launch Instance” under the Create Instance header. EC2 is the name of Amazon’s virtual servers in the cloud service. Once I was logged in, I searched for “EC2” under AWS Services. If not, head over to Amazon Web Services and set up an account. If you have an existing AWS account this is pretty straight forward. The first step is to spin up an Amazon EC2 instance running Ubuntu 18.04. Let’s get started! Step 1 – Spin Up the Server Pretty, right? Two ColdFusion Servers, both of which connect to a back end database, and use an Ubuntu 18.04 server running Redis as their external session storage. As long as the two servers can connect, this will work. If your company hosts servers in house, you can still pull this off seamlessly. The fact that their existing servers are on AWS has no bearing on the rest of this tutorial. Also, let me be clear that being cloud based isn’t necessary either. They use some other AWS Services (Elastic IP Addresses, AWS SES for emails and messaging, and S3 for storage of some large files,) but for the most part this is it. Now… to some degree, I’m oversimplifying here. Keep in mind, this client has a super simple set up for their ColdFusion application. Luckily, ColdFusion 2018 natively supports external session storage through Redis. As part of this scaling project, they wanted to offload their session management to an external session storage. It was relatively minor… they had a single ColdFusion server and wanted to move to two. I recently had an opportunity to work with a client who was scaling their resources.