Skip to content

Installation: Redis

acozine edited this page Feb 13, 2014 · 19 revisions

Notes

Redis is the key/value store that connects the jobs generated by the HydraDAM code with the resque workers that execute those jobs.

Steps

  1. Change to the install directory mkdir -p /opt/install && cd /opt/install

  2. Download redis wget http://download.redis.io/redis-stable.tar.gz

  3. Untar redis tar xvzf redis-stable.tar.gz

  4. Change to the redis directory cd redis-stable/

  5. Compile redis from source make

  6. Test your redis installation. In the redis directory, type make test. You should see a lot of output, with the line "All tests passed without errors!" near the end.

  7. To configure redis, move the server and client:
    sudo cp src/redis-server /usr/local/bin/
    sudo cp src/redis-cli /usr/local/bin/

  8. Make the necessary directories:
    sudo mkdir /etc/redis /var/redis /var/redis/6379

  9. Copy the init script :
    Ubuntu: sudo cp utils/redis_init_script /etc/init.d/redis_6379
    CentOS: sudo cp utils/redis_init_script /etc/rc.d/init.d/redis_6379

  10. Copy the conf file: sudo cp redis.conf /etc/redis/6379.conf

  11. Edit the conf file to daemonize, set the pidfile, configure logging, and set the home directory:

sudo sed 's/^(daemonize\ )no.$/\1yes/' -i /etc/redis/6379.conf sudo sed 's#^(pidfile\ /var/run/).$#\1redis_6379.pid#' -i /etc/redis/6379.conf sudo sed 's/^(loglevel\ )verbose.$/\1notice/' -i /etc/redis/6379.conf sudo sed 's#^(dir\ ).$#\1/var/redis/6379#' -i /etc/redis/6379.conf ```

  1. Start redis sudo service redis_6379 start
  2. (CentOS only) Add redis to chkconfig so it starts automatically on start/reboot:
    1. Edit /etc/rc.d/init.d/redis_6379. Immediately after the initial comments, add

added for chkconfig compliance

chkconfig: 2345 95 20

description: redis_6379

Starts the redis server

processname: redis_6379

    ```
Do not uncomment these lines.  

1. Save the file  
1. Add redis to chkconfig with `sudo chkconfig --add redis_6379`.

Verification Steps

  1. Type redis-cli ping you should see PONG; type redis-cli save you should see OK.

Next Step

Proceed to Install ffmpeg or return to the Overview page.

Clone this wiki locally