Installing Redis on Ubuntu 16.04/18.04

Reading Time: 4 minutes

What is Redis? 

Redis or “REmote DIctionary Server” is defined as an open source, “key-value” database storage medium, which is additionally known as a data structure server. At its heart, Redis works with key-value pairs and stores data in a location that’s easily referenceable by two specific values. These key-value associations are usually a set of two linked data entries which are made up by a key, which is a unique identifier for a type of data and, the value, which can be either the particular data that is identified or, an indicator to the location of that data.

Redis has five main data types it can utilize:

  • Strings – Strings are a basic value in Redis. They can contain any kind of data size up to 512Mb including jpegs or other objects like blobs.
  • Lists – Lists are exactly as the name implies; simply lists of strings, sorted by the order in which they are applied
  • Sets – Sets are simply a group of unordered strings
  • Sorted Sets – Sorted Sets are akin to regular sets. The main difference is that sorted set items are associated with, and sorted by a weighted score field. This allows for priority items to be set when entered data into the sorted set
  • Hashes – Hashes map the string fields and values themselves. They are capable of defining multiple elements and can store more than 4 billion field-value pairs

Redis holds the database entries entirely in memory, and will only use the hard disk for persistent storage. These key-value pair values are often used in hash tables, lookup tables and configuration files. Redis can accept key-values for a wide variety of formats so operations can be run on the server with a reduced server workload. Redis can also replicate data to any number of slave servers which makes it a prime candidate for large database replication setups.

 

What Are the Advantages of Redis?

  1. Redis is extremely fast − Redis can perform hundreds of thousands of (set, get) commands per second.
  2. It supports well know data types − As noted above, Redis supports most of the data types normally used by developers such as strings, lists, sets, sorted sets, and hashes.
  3. Operations are protected (or atomic) which means:
    1. All operations in a transaction are chronological and executed in sequence
    2. All operations in a transaction are performed as a single unit of work which limits interference from other operations
  4. .Multifunction database − Redis is a multifunction, noSQL database that can be used in a wide variety of use cases including caching, large dataset, full-text searches, spark data processing or any other short-lived data manipulation.

All of these options place Redis firmly in the middle of the NoSQL ecosystem.

 

What is NoSQL?

NoSQL is a type of database design that takes into consideration a wide group of data models, including key-value, document, columnar and graph formats.

NoSQL stands for “not only SQL” and is an alternative to the more traditional relational databases like MySQL in which data is laid out in tables, and the data scheme is carefully constructed before the actual database is created. NoSQL databases are especially useful for working with very large distributed datasets

A quick breakdown of how NoSQL stacks up against other database schemes:

 

Install Redis on Ubuntu

To install Redis on Ubuntu, SSH into your server, once at the command prompt type the following commands. This will install Redis on your server.

apt-get update

apt-get install redis-server

 

Start Redis

redis-server

Next, let’s ensure Redis starts at boot:

systemctl enable redis-server.service

Also, let’s set one of the main memory variables in the Redis config (this value will depend on your servers available memory)

vim /etc/redis/redis.conf

maxmemory 256mb

maxmemory-policy allkeys-lru

Finally, let’s restart Redis to ensure the values are retained:

systemctl restart redis-server.service

 

Check If Redis is Active

Run the following command at the servers command prompt:

redis-cli

This will open a Redis prompt.

redis 10.0.0.1:6379

After running the above command, your servers IP address (10.0.0.1) and the port Redis is running on will be shown (6379).

Now type in the following command at the Redis prompt:

redis 10.0.0.1:6379> ping
PONG
PONG” shows that Redis is successfully installed on your machine.

 

Install Redis via Source

To install Redis manually via source, simply SSH into your server and run the following command:

wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && make install

The Redis configuration file will be in the current install directory. Let’s copy it to a better location:

mkdir /etc/redis
cp redis.conf /etc/redis/

Now, let start Redis:

redis-server /etc/redis/redis.conf &
redis-cli ping
PONG

Lastly, here is a fun way to test Redis out. Try it!  Overall, if you need a fast, robust, and highly scalable NoSQL solution for use with your application or as a project adjunct Redis can meet your needs! Try it out on one of our Private Cloud product offerings or one of our stable, reliable Dedicated servers!

 

Meetups and Contacts for Redis

We’d like to send a shout out to the people over at https://redislabs.com/ who have provided some of the best and most excellent support over the years, awesome job!

For enterprise support, contact:
Blake Lipps-midwest Redis account rep/consultant
Drake Albee -west coast Redis consultant

For individual support, see the Redis community pages. The areas in which you can find active support or interact with the Redis community are noted here:

  • The HQ of the Redis community is on Reddit in the subreddit. You can use that community to ask for help, post new ideas for new features, link to articles of interest for the Redis community, and/or have other questions answered
  • Join the mailing list by subscribing via email
  • Meet up in the #redis channel on Freenode (web access link)
  • Check the Redis tag on Stack Overflow
  • Follow Redis news feed on Twitter

If you happen to live in one of the larger cities listed below, there are Local Redis meetup groups as well! Local Redis meetup info:

 

How to Install MongoDB on Ubuntu 14.04 LTS

Reading Time: 2 minutes

MongoDB is a NoSQL database intended for storing large amounts of data in document-oriented storage with dynamic schemas. NoSQL refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding.

Pre-Flight Check
  • These instructions are intended for installing MongoDB on a single Ubuntu 14.04 LTS node.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as a non-root user, but with sudo access. For information on giving a user sudo access visit our page on How to Add a User and Grant Root Privileges on Ubuntu 14.04.

Continue reading “How to Install MongoDB on Ubuntu 14.04 LTS”

How to Install MongoDB on Fedora 21

Reading Time: 2 minutes

MongoDB is a NoSQL database intended for storing large amounts of data in document-oriented storage with dynamic schemas. NoSQL refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding.

Pre-Flight Check
  • These instructions are intended for installing MongoDB on a single Fedora 21 node.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as root.

Continue reading “How to Install MongoDB on Fedora 21”

How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on Fedora 20

Reading Time: 2 minutes
Note:
Please note that this article is considered legacy documentation because Fedora 20 has reached its end-of-life support.

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for installing the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on Fedora 20.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.
  • Your server should already have MariaDB 10.0 installed. If you’re working from MariaDB 5.5 visit our tutorial on How to Upgrade MariaDB 5.5 to MariaDB 10.0 on Fedora 20

Continue reading “How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on Fedora 20”

How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 7

Reading Time: 2 minutes

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for installing the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 7.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
  • Your server should already have MariaDB 10.0 installed. If you’re working from MariaDB 5.5 visit our tutorial on: How to Upgrade MariaDB 5.5 to MariaDB 10.0 on CentOS 7

Continue reading “How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 7”

How to Install the Cassandra Storage Engine for MariaDB 10.0 on Fedora 20

Reading Time: 2 minutes
Note:
Please note that this article is considered legacy documentation because Fedora 20 has reached its end-of-life support.

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for installing the Cassandra Storage Engine for MariaDB 10.0 on Fedora 20.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.
  • Your server should already have MariaDB 10.0 installed. If you’re working from MariaDB 5.5, visit our tutorial on: How to Upgrade MariaDB 5.5 to MariaDB 10.0 on Fedora 20

Continue reading “How to Install the Cassandra Storage Engine for MariaDB 10.0 on Fedora 20”

How to Upgrade MariaDB 5.5 to MariaDB 10.0 on Fedora 20

Reading Time: 2 minutes
Note:
Please note that this article is considered legacy documentation because Fedora 20 has reached its end-of-life support.

MariaDB is a drop-in replacement for MySQL installed by default on CentOS 7, and offers many speed and performance improvements. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for upgrading from MariaDB 5.5 to MariaDB 10.0 on Fedora 20.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.

Continue reading “How to Upgrade MariaDB 5.5 to MariaDB 10.0 on Fedora 20”

How to Install the Cassandra Storage Engine for MariaDB 10.0 on CentOS 7

Reading Time: 2 minutes

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for installing the Cassandra Storage Engine for MariaDB 10.0 on CentOS 7.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
  • Your server should already have MariaDB 10.0 installed. If you’re working from MariaDB 5.5, visit our tutorial on: How to Upgrade MariaDB 5.5 to MariaDB 10.0 on CentOS 7

Continue reading “How to Install the Cassandra Storage Engine for MariaDB 10.0 on CentOS 7”

How to Install MongoDB on Fedora 20

Reading Time: 2 minutes

MongoDB is a NoSQL database intended for storing large amounts of data in document-oriented storage with dynamic schemas. NoSQL refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding.

Pre-Flight Check
  • These instructions are intended for installing MongoDB on a single Fedora 20 node.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.

Continue reading “How to Install MongoDB on Fedora 20”

How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 6

Reading Time: 2 minutes

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check
  • These instructions are intended for installing the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 6.
  • I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.
  • Your server should already have MariaDB 10.0 installed. If you’re working from MySQL 5.1 or MariaDB 5.5, visit our tutorial on How to Upgrade MySQL 5.1 to MariaDB 10.0 on CentOS 6

Continue reading “How to Install the Open Query Graph engine (OQGRAPH) for MariaDB 10.0 on CentOS 6”