Skip to content

Instantly share code, notes, and snippets.

@dstroot
Created May 23, 2012 17:56
Show Gist options
  • Save dstroot/2776679 to your computer and use it in GitHub Desktop.
Save dstroot/2776679 to your computer and use it in GitHub Desktop.

Revisions

  1. dstroot revised this gist Jul 1, 2012. 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
    @@ -3,7 +3,7 @@
    # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    ###############################################
    # To use:
    # wget https://raw.github.com/gist/2776679/4014e3f7ebf83115f6dbebf21a8218d0aa9dc926/install-redis.sh
    # wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
    # chmod 777 install-redis.sh
    # ./install-redis.sh
    ###############################################
  2. dstroot revised this gist Jul 1, 2012. 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
    @@ -3,7 +3,7 @@
    # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    ###############################################
    # To use:
    # wget https://raw.github.com/gist/2776679/c131c0548e7cd2ece85edfb8bea70575586147c7/install-redis.sh
    # wget https://raw.github.com/gist/2776679/4014e3f7ebf83115f6dbebf21a8218d0aa9dc926/install-redis.sh
    # chmod 777 install-redis.sh
    # ./install-redis.sh
    ###############################################
  3. dstroot revised this gist Jun 25, 2012. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -17,10 +17,10 @@ echo "*****************************************"
    echo " 2. Download, Untar and Make Redis 2.6"
    echo "*****************************************"
    cd /usr/local/src
    sudo wget http://redis.googlecode.com/files/redis-2.6.0-rc3.tar.gz
    sudo tar xzf redis-2.6.0-rc3.tar.gz
    sudo rm redis-2.6.0-rc3.tar.gz -f
    cd redis-2.6.0-rc3
    sudo wget http://redis.googlecode.com/files/redis-2.6.0-rc5.tar.gz
    sudo tar xzf redis-2.6.0-rc5.tar.gz
    sudo rm redis-2.6.0-rc5.tar.gz -f
    cd redis-2.6.0-rc5
    sudo make
    echo "*****************************************"
    echo " 3. Create Directories and Copy Redis Files"
  4. dstroot revised this gist May 23, 2012. 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
    @@ -8,7 +8,7 @@
    # ./install-redis.sh
    ###############################################
    echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and make"
    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
  5. dstroot revised this gist May 23, 2012. 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
    @@ -8,7 +8,7 @@
    # ./install-redis.sh
    ###############################################
    echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and Make"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and make"
    echo "*****************************************"
    #sudo yum -y update
    #sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles \/etc/localtime
  6. dstroot revised this gist May 23, 2012. 1 changed file with 20 additions and 11 deletions.
    31 changes: 20 additions & 11 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -11,33 +11,33 @@ echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by 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
    #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 "*****************************************"
    wget http://redis.googlecode.com/files/redis-2.6.0-rc3.tar.gz
    tar xzf redis-2.6.0-rc3.tar.gz
    cd /usr/local/src
    sudo wget http://redis.googlecode.com/files/redis-2.6.0-rc3.tar.gz
    sudo tar xzf redis-2.6.0-rc3.tar.gz
    sudo rm redis-2.6.0-rc3.tar.gz -f
    cd redis-2.6.0-rc3
    make
    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
    sudo cp redis.conf /etc/redis
    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 "*****************************************"
    read -p "Press [Enter] to continue..."
    sudo nano /etc/redis/redis.conf
    # Learn sed and you can program the edits!
    #sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel debug$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf > /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 stdout$/logfile \/var\/log\/redis.log/" redis.conf > /etc/redis/redis.conf
    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"
    @@ -56,4 +56,13 @@ echo "*****************************************"
    echo " 8. Start Redis Server"
    echo "*****************************************"
    sudo service redis-server start
    echo "Complete!"
    echo "*****************************************"
    echo " Complete!"
    echo " You can test your redis installation using the redis console:"
    echo " $ src/redis-cli"
    echo " redis> set foo bar"
    echo " OK"
    echo " redis> get foo"
    echo " bar"
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
  7. dstroot revised this gist May 23, 2012. 1 changed file with 3 additions and 7 deletions.
    10 changes: 3 additions & 7 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -36,22 +36,18 @@ echo " 3: ... dir /var/lib/redis"
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
    sudo nano /etc/redis/redis.conf
    # Learn sed and you can program the edits!
    #sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel debug$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf > /etc/redis/redis.conf
    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"
    wget https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    wget https://raw.github.com/gist/2777433/e64b4b8ad7d38676f7e7f70b24f3f004b4f10b74/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 " Edit /etc/init.d/redis-server as follows:"
    echo " 1: ... redis="/usr/local/bin/redis-server""
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
    sudo nano /etc/init.d/redis-server
    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
    echo "*****************************************"
    sudo chkconfig --add redis-server
  8. dstroot revised this gist May 23, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,12 @@
    #!/bin/bash
    # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
    # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    ###############################################
    # To use:
    # wget https://raw.github.com/gist/2776679/c131c0548e7cd2ece85edfb8bea70575586147c7/install-redis.sh
    # chmod 777 install-redis.sh
    # ./install-redis.sh
    ###############################################
    echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and Make"
    echo "*****************************************"
  9. dstroot revised this gist May 23, 2012. 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
    @@ -5,8 +5,8 @@ echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by 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
    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 "*****************************************"
  10. dstroot revised this gist May 23, 2012. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,9 @@
    echo "*****************************************"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and Make"
    echo "*****************************************"
    sudo yum -y update
    sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
    /etc/localtime
    sudo yum -y install gcc make
    #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 "*****************************************"
  11. dstroot revised this gist May 23, 2012. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    #!/bin/bash
    # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
    # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    echo "*****************************************"
    echo " 1. Install Linux updates, set time zones, followed by GCC and Make"
    echo " 1. Prerequisites: Install Linux updates, set time zones, followed by GCC and Make"
    echo "*****************************************"
    sudo yum -y update
    sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
    @@ -38,7 +40,12 @@ echo " 6. Move and Configure Redis-Server"
    echo "*****************************************"
    sudo mv redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    sudo nano /etc/init.d/redis-server redis="/usr/local/bin/redis-server"
    echo "*****************************************"
    echo " Edit /etc/init.d/redis-server as follows:"
    echo " 1: ... redis="/usr/local/bin/redis-server""
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
    sudo nano /etc/init.d/redis-server
    echo "*****************************************"
    echo " 7. Auto-Enable Redis-Server"
    echo "*****************************************"
  12. dstroot revised this gist May 23, 2012. 1 changed file with 26 additions and 18 deletions.
    44 changes: 26 additions & 18 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -22,22 +22,30 @@ sudo cp redis.conf /etc/redis
    echo "*****************************************"
    echo " 4. Configure Redis.Conf"
    echo "*****************************************"
    sudo nano /etc/redis/redis.conf [..]
    daemonize yes
    [..] [..]
    bind 127.0.0.1
    [..] [..]
    dir /var/lib/redis
    [..]
    5. Download init Script
    wget https://raw.github.com/gist/257849
    /9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    6. Move and Configure Redis-Server
    sudo mv redis-server /etc/init.d
    echo " Edit redis.conf as follows:"
    echo " 1: ... daemonize yes"
    echo " 2: ... bind 127.0.0.1"
    echo " 3: ... dir /var/lib/redis"
    echo "*****************************************"
    read -p "Press [Enter] to continue..."
    sudo nano /etc/redis/redis.conf
    echo "*****************************************"
    echo " 5. Download init Script"
    echo "*****************************************"
    wget https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/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
    sudo nano /etc/init.d/redis-server redis="/usr/local/bin/redis-server"
    7. Auto-Enable Redis-Server
    sudo chkconfig --add redis-server
    sudo chkconfig --level 345 redis-server on
    8. Start Redis Server
    sudo service redis-server start
    sudo nano /etc/init.d/redis-server redis="/usr/local/bin/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 "Complete!"
  13. dstroot created this gist May 23, 2012.
    43 changes: 43 additions & 0 deletions install-redis.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    #!/bin/bash
    echo "*****************************************"
    echo " 1. Install Linux updates, set time zones, followed by GCC and Make"
    echo "*****************************************"
    sudo yum -y update
    sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
    /etc/localtime
    sudo yum -y install gcc make
    echo "*****************************************"
    echo " 2. Download, Untar and Make Redis 2.6"
    echo "*****************************************"
    wget http://redis.googlecode.com/files/redis-2.6.0-rc3.tar.gz
    tar xzf redis-2.6.0-rc3.tar.gz
    cd redis-2.6.0-rc3
    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
    sudo cp redis.conf /etc/redis
    echo "*****************************************"
    echo " 4. Configure Redis.Conf"
    echo "*****************************************"
    sudo nano /etc/redis/redis.conf [..]
    daemonize yes
    [..] [..]
    bind 127.0.0.1
    [..] [..]
    dir /var/lib/redis
    [..]
    5. Download init Script
    wget https://raw.github.com/gist/257849
    /9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
    6. Move and Configure Redis-Server
    sudo mv redis-server /etc/init.d
    sudo chmod 755 /etc/init.d/redis-server
    sudo nano /etc/init.d/redis-server redis="/usr/local/bin/redis-server"
    7. Auto-Enable Redis-Server
    sudo chkconfig --add redis-server
    sudo chkconfig --level 345 redis-server on
    8. Start Redis Server
    sudo service redis-server start