BIP KB:
How To Install And Get Started With Redis
Article By BIP Admin
![]() |
Introduction to Install RedisIf you’d like to Install Redis the most recent version of Redis on your Debian machine, follow along with this guide. Unfortunately, the install process is not as easy as `sudo apt-get install redis`, which is why you're probably reading this. The current version at the time of me writing this, is 2.6.13. Go to the website and copy the download link and be sure to change the version in the URL below: |
# Install the required tools to build the source sudo apt-get install build-essential # Download and extract the files wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz tar -xzf redis-2.6.13.tar.gz cd redis-2.6.13 # Compile make installNow that you’ve got it “installed”, you’re going to want to make it a Debian service (so that it can run on startup, and you can use commands like `sudo service redis start`):
# Create a user account for Redis sudo adduser --system --no-create-home --disabled-login --disabled-password --group redis # Make a writable log file sudo touch /var/log/redis.log sudo chown redis:redis /var/log/redis.log sudo chmod u+w /var/log/redis.log # Make an init script cd /etc/init.d/ wget https://gist.github.com/peterc/408762/raw -O redis sudo chmod u+x redis sudo update-rc.d -f redis defaults # Make a place to store your database sudo mkdir /var/redis sudo chown redis:redis /var/redis sudo chmod u+xw /var/redisNext, you’ll want to edit the configuration script. Do the following:
sudo mkdir /etc/redis sudo touch /etc/redis/redis.conf sudo chown redis:redis -R /etc/redis/ sudo vim /etc/redis/redis.confHere is what I use for my redis.conf file:
daemonize yes pidfile /var/run/redis.pid logfile /var/log/redis.log port 6379 # bind 127.0.0.1 # unixsocket /tmp/redis.sock timeout 300 loglevel verbose databases 16 save 900 1 save 300 10 save 60 10000 rdbcompression yes dbfilename dump.rdb dir /var/redis/ # requirepass foobaredOnce that’s all done, run the following to make sure everything was installed properly:
$ sudo service redis start $ redis-cli > INFOIf you see an error when the server is starting, or an error after running the CLI script that it cannot connect, something went wrong. Go ahead and leave a comment and we'll be sure to help.
Tags: education, debian, install, Software, Install Redis, Redis
Spin Up A VPS Server In No Time Flat
Simple Setup
Full Root Access
Straightforward Pricing
DEPLOY A SECURE VPS SERVER TODAY!Leave a Reply
Feedbacks
![]() This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. |