Skip to content

Instantly share code, notes, and snippets.

@harley
Forked from phamk/install-redis.sh
Last active September 11, 2021 21:18
Show Gist options
  • Select an option

  • Save harley/00b6d0c70f4d4a6450167762397da548 to your computer and use it in GitHub Desktop.

Select an option

Save harley/00b6d0c70f4d4a6450167762397da548 to your computer and use it in GitHub Desktop.

Revisions

  1. Harley Trung revised this gist Sep 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    # ./install-redis.sh
    ###############################################

    version=6.0.5
    version=stable
    port=6379

    echo "*****************************************"
    @@ -21,7 +21,7 @@ echo " 2. Download, Untar and Make Redis ${version}"
    echo "*****************************************"

    cd /usr/local/src
    sudo wget "http://download.redis.io/releases/redis-${version}.tar.gz"
    sudo wget http://download.redis.io/redis-${version}.tar.gz
    sudo rm -fr "redis-${version}"
    sudo tar vxzf "redis-${version}.tar.gz"
    sudo rm -f "redis-${version}.tar.gz"
  2. Harley Trung revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    ###############################################

    version=6.0.5
    port=6739
    port=6379

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
  3. @phamk phamk revised this gist Jun 18, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    ###############################################

    version=6.0.5
    port=6062
    port=6739

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
  4. @phamk phamk revised this gist Jun 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -47,7 +47,7 @@ echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo " 6: ... port ${port}"
    echo " 7: ... pidfile /var/run/redis.pidfile
    echo " 7: ... pidfile /var/run/redis.pidfile"
    echo "*****************************************"

    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport 6379\b/port ${port}/" -e "s/^pidfile.*$/pidfile \/var\/run\/redis.pid/" redis.conf | sudo tee /etc/redis/redis.conf
  5. @phamk phamk revised this gist Jun 17, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -47,9 +47,10 @@ echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo " 6: ... port ${port}"
    echo " 7: ... pidfile /var/run/redis.pidfile
    echo "*****************************************"
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport 6379\b/port ${port}/" redis.conf | sudo tee /etc/redis/redis.conf
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport 6379\b/port ${port}/" -e "s/^pidfile.*$/pidfile \/var\/run\/redis.pid/" redis.conf | sudo tee /etc/redis/redis.conf

    echo "*****************************************"
    echo " 5. Download init Script"
    @@ -63,7 +64,6 @@ echo "*****************************************"

    sudo mv -f redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    sudo sed -e "s/^pidfile.*$/pidfile \/var\/run\/redis.pid/" /etc/redis/redis.conf

    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
  6. @phamk phamk revised this gist Jun 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,7 @@ echo "*****************************************"

    sudo mv -f redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    sudo sed -e "s/^pidfile.*$/pidfile /var/run/redis.pid/" /etc/redis/redis.conf
    sudo sed -e "s/^pidfile.*$/pidfile \/var\/run\/redis.pid/" /etc/redis/redis.conf

    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
  7. @phamk phamk revised this gist Jun 17, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -63,6 +63,7 @@ echo "*****************************************"

    sudo mv -f redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    sudo sed -e "s/^pidfile.*$/pidfile /var/run/redis.pid/" /etc/redis/redis.conf

    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
  8. @phamk phamk revised this gist Jun 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ echo " 5: ... logfile /var/log/redis.log"
    echo " 6: ... port ${port}"
    echo "*****************************************"

    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport\b/port ${port}/" redis.conf | sudo tee /etc/redis/redis.conf
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport 6379\b/port ${port}/" redis.conf | sudo tee /etc/redis/redis.conf

    echo "*****************************************"
    echo " 5. Download init Script"
  9. @phamk phamk revised this gist Jun 16, 2020. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@
    ###############################################

    version=6.0.5
    port=6062

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
    @@ -45,10 +46,10 @@ echo " 2: ... bind 127.0.0.1"
    echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo " 6: ... port 6062"
    echo " 6: ... port ${port}"
    echo "*****************************************"

    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport\b/port 6062/" redis.conf | sudo tee /etc/redis/redis.conf
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport\b/port ${port}/" redis.conf | sudo tee /etc/redis/redis.conf

    echo "*****************************************"
    echo " 5. Download init Script"
    @@ -80,9 +81,9 @@ echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ redis-cli"
    echo " 127.0.0.1:6379> set foo bar"
    echo " 127.0.0.1:${port}> set foo bar"
    echo " OK"
    echo " 127.0.0.1:6379> get foo"
    echo " 127.0.0.1:${port}> get foo"
    echo " \"bar\""
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
  10. @phamk phamk revised this gist Jun 16, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -45,9 +45,10 @@ echo " 2: ... bind 127.0.0.1"
    echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo " 6: ... port 6062"
    echo "*****************************************"

    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" redis.conf | sudo tee /etc/redis/redis.conf
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" -e "s/\bport\b/port 6062/" redis.conf | sudo tee /etc/redis/redis.conf

    echo "*****************************************"
    echo " 5. Download init Script"
  11. @phamk phamk revised this gist Jun 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    # ./install-redis.sh
    ###############################################

    version=5.0.0
    version=6.0.5

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
  12. @jpickwell jpickwell revised this gist Oct 29, 2018. 1 changed file with 22 additions and 3 deletions.
    25 changes: 22 additions & 3 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -1,32 +1,41 @@
    #!/bin/bash

    ###############################################
    # To use:
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version=4.0.8

    version=5.0.0

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
    echo "*****************************************"

    sudo yum -y update
    sudo yum -y install gcc gcc-c++ make jemalloc tcl

    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis ${version}"
    echo "*****************************************"

    cd /usr/local/src
    sudo wget "http://download.redis.io/releases/redis-${version}.tar.gz"
    sudo rm -fr "redis-${version}"
    sudo tar vxzf "redis-${version}.tar.gz"
    sudo rm -f "redis-${version}.tar.gz"
    cd "redis-${version}"
    sudo make distclean
    sudo make
    sudo make test

    echo "*****************************************"
    echo " 3. Create Directories and Copy Redis Files"
    echo "*****************************************"

    sudo mkdir /etc/redis /var/lib/redis
    sudo cp src/redis-server src/redis-cli /usr/local/bin
    sudo cp -f src/redis-server src/redis-cli /usr/local/bin

    echo "*****************************************"
    echo " 4. Configure Redis.Conf"
    echo "*****************************************"
    @@ -37,25 +46,35 @@ echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo "*****************************************"

    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" redis.conf | sudo tee /etc/redis/redis.conf

    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"

    sudo wget https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server

    echo "*****************************************"
    echo " 6. Move and Configure Redis-Server"
    echo "*****************************************"
    sudo mv redis-server /etc/init.d

    sudo mv -f redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server

    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
    echo "*****************************************"

    sudo chkconfig --add redis-server
    sudo chkconfig --level 345 redis-server on

    echo "*****************************************"
    echo " 8. Start Redis Server"
    echo "*****************************************"

    sudo service redis-server start

    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
  13. @jpickwell jpickwell revised this gist Feb 16, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version=4.0.2
    version=4.0.8

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
  14. @jpickwell jpickwell revised this gist Oct 5, 2017. 1 changed file with 15 additions and 15 deletions.
    30 changes: 15 additions & 15 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,24 +4,24 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version=3.2.0
    version=4.0.2

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
    echo " 1. Prerequisites: Install updates, install GCC, make, jemalloc, tcl"
    echo "*****************************************"
    #sudo yum -y update
    #sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles \/etc/localtime
    #sudo yum -y install gcc gcc-c++ make
    sudo yum -y update
    sudo yum -y install gcc gcc-c++ make jemalloc tcl
    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis $version"
    echo " 2. Download, Untar and Make Redis ${version}"
    echo "*****************************************"
    cd /usr/local/src
    sudo wget "http://download.redis.io/releases/redis-$version.tar.gz"
    sudo tar xzf redis-$version.tar.gz
    sudo rm redis-$version.tar.gz -f
    cd redis-$version
    sudo wget "http://download.redis.io/releases/redis-${version}.tar.gz"
    sudo tar vxzf "redis-${version}.tar.gz"
    sudo rm -f "redis-${version}.tar.gz"
    cd "redis-${version}"
    sudo make distclean
    sudo make
    sudo make test
    echo "*****************************************"
    echo " 3. Create Directories and Copy Redis Files"
    echo "*****************************************"
    @@ -37,7 +37,7 @@ echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo "*****************************************"
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf | sudo tee /etc/redis/redis.conf
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile \"\"$/logfile \/var\/log\/redis.log/" redis.conf | sudo tee /etc/redis/redis.conf
    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"
    @@ -59,10 +59,10 @@ sudo service redis-server start
    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ /usr/local/redis-$version/src/redis-cli"
    echo " redis> set foo bar"
    echo " $ redis-cli"
    echo " 127.0.0.1:6379> set foo bar"
    echo " OK"
    echo " redis> get foo"
    echo " bar"
    echo " 127.0.0.1:6379> get foo"
    echo " \"bar\""
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
  15. @khelll khelll revised this gist Jun 10, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version=3.0.7
    version=3.2.0

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
  16. @khelll khelll revised this gist Mar 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version = 3.0.7
    version=3.0.7

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
  17. @khelll khelll revised this gist Mar 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version = "3.0.7"
    version = 3.0.7

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
  18. @khelll khelll revised this gist Mar 1, 2016. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,20 +4,22 @@
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    version = "3.0.7"

    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
    echo "*****************************************"
    #sudo yum -y update
    #sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles \/etc/localtime
    #sudo yum -y install gcc gcc-c++ make
    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis 2.8"
    echo " 2. Download, Untar and Make Redis $version"
    echo "*****************************************"
    cd /usr/local/src
    sudo wget http://download.redis.io/releases/redis-2.8.19.tar.gz
    sudo tar xzf redis-2.8.19.tar.gz
    sudo rm redis-2.8.19.tar.gz -f
    cd redis-2.8.19
    sudo wget "http://download.redis.io/releases/redis-$version.tar.gz"
    sudo tar xzf redis-$version.tar.gz
    sudo rm redis-$version.tar.gz -f
    cd redis-$version
    sudo make distclean
    sudo make
    echo "*****************************************"
    @@ -57,7 +59,7 @@ sudo service redis-server start
    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ /usr/local/redis-2.8.19/src/redis-cli"
    echo " $ /usr/local/redis-$version/src/redis-cli"
    echo " redis> set foo bar"
    echo " OK"
    echo " redis> get foo"
  19. @khelll khelll revised this gist Mar 18, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -11,13 +11,13 @@ echo "*****************************************"
    #sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles \/etc/localtime
    #sudo yum -y install gcc gcc-c++ make
    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis 2.6"
    echo " 2. Download, Untar and Make Redis 2.8"
    echo "*****************************************"
    cd /usr/local/src
    sudo wget http://download.redis.io/releases/redis-2.6.16.tar.gz
    sudo tar xzf redis-2.6.16.tar.gz
    sudo rm redis-2.6.16.tar.gz -f
    cd redis-2.6.16
    sudo wget http://download.redis.io/releases/redis-2.8.19.tar.gz
    sudo tar xzf redis-2.8.19.tar.gz
    sudo rm redis-2.8.19.tar.gz -f
    cd redis-2.8.19
    sudo make distclean
    sudo make
    echo "*****************************************"
    @@ -57,7 +57,7 @@ sudo service redis-server start
    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ /usr/local/redis-2.6.16/src/redis-cli"
    echo " $ /usr/local/redis-2.8.19/src/redis-cli"
    echo " redis> set foo bar"
    echo " OK"
    echo " redis> get foo"
  20. @khelll khelll created this gist Jul 1, 2014.
    66 changes: 66 additions & 0 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    #!/bin/bash
    ###############################################
    # To use:
    # chmod +x install-redis.sh
    # ./install-redis.sh
    ###############################################
    echo "*****************************************"
    echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
    echo "*****************************************"
    #sudo yum -y update
    #sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles \/etc/localtime
    #sudo yum -y install gcc gcc-c++ make
    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis 2.6"
    echo "*****************************************"
    cd /usr/local/src
    sudo wget http://download.redis.io/releases/redis-2.6.16.tar.gz
    sudo tar xzf redis-2.6.16.tar.gz
    sudo rm redis-2.6.16.tar.gz -f
    cd redis-2.6.16
    sudo make distclean
    sudo make
    echo "*****************************************"
    echo " 3. Create Directories and Copy Redis Files"
    echo "*****************************************"
    sudo mkdir /etc/redis /var/lib/redis
    sudo cp src/redis-server src/redis-cli /usr/local/bin
    echo "*****************************************"
    echo " 4. Configure Redis.Conf"
    echo "*****************************************"
    echo " Edit redis.conf as follows:"
    echo " 1: ... daemonize yes"
    echo " 2: ... bind 127.0.0.1"
    echo " 3: ... dir /var/lib/redis"
    echo " 4: ... loglevel notice"
    echo " 5: ... logfile /var/log/redis.log"
    echo "*****************************************"
    sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^# bind 127.0.0.1$/bind 127.0.0.1/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel verbose$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf | sudo tee /etc/redis/redis.conf
    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"
    sudo wget https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server
    echo "*****************************************"
    echo " 6. Move and Configure Redis-Server"
    echo "*****************************************"
    sudo mv redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
    echo "*****************************************"
    sudo chkconfig --add redis-server
    sudo chkconfig --level 345 redis-server on
    echo "*****************************************"
    echo " 8. Start Redis Server"
    echo "*****************************************"
    sudo service redis-server start
    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ /usr/local/redis-2.6.16/src/redis-cli"
    echo " redis> set foo bar"
    echo " OK"
    echo " redis> get foo"
    echo " bar"
    echo "*****************************************"
    read -p "Press [Enter] to continue..."