Redis - sinherle/Recipes GitHub Wiki
Building Redis 3.0.7
The following build instructions have been tested with Redis 3.0.7 release on RHEL7, RHEL6, SLES12, SLES11 and Ubuntu 16.04 on IBM z Systems.
General Notes:
i) When following the steps below please use a standard permission user unless otherwise specified.
ii) A directory /<source_root>/
will be referred to in these instructions, this is a temporary writeable directory anywhere you'd like to place it.
Step 1 : Install the Dependencies
Following are the build dependencies for Redis.
- gcc
- which
- tcl
- make
- gcc-c++
- git
Dependencies Installation Notes:
SLES12:
sudo zypper install -y gcc gcc-c++ make which git tcl
RHEL7
sudo yum install -y gcc gcc-c++ make which git tcl
RHEL6
sudo yum install -y gcc gcc-c++ make which git tcl
SLES11
sudo zypper install -y gcc gcc-c++ make git tcl
Ubuntu 16.04
sudo apt-get install -y gcc g++ make tcl git
Step 2 : Clone Redis Git repository
Clone the Redis git repository and checkout 3.0.7 branch.
cd /<source_root>/
git clone https://github.com/antirez/redis.git
cd /<source_root>/redis
git checkout 3.0.7
Step 3 : Build, Install and Test Redis
-
To avoid build, dependency, compiler and cache related issues it is advisable to use
make distclean
rather thanmake
. Below command builds Redis.make distclean
-
To test Redis and install it, run the following commands.
make test sudo make install
Step 4 : Start Redis Server
By default Redis Server runs on 6379 port. You can run the service in background by using below command.
redis-server &
Step 5 : Verify Installation
You can verify Installation of Redis by using Redis client command line - redis-cli
and running few commands.
For example:
bash-4.2#redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379> exit