Created
November 8, 2018 21:05
-
-
Save imkarthikk/d970f96e9f10e9be5ac3a9a2b4b93c82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################### | |
# This script will install redis, | |
# and download a pre-configured config | |
######################################### | |
### Set the log file path | |
cd ~ | |
set_log_path=$(cd && pwd) | |
log_file="$set_log_path/skcript.log" | |
# Redis Defaults | |
REDIS_URL="http://download.redis.io/releases/redis-stable.tar.gz" | |
REDIS_TGZ="redis-stable.tar.gz" | |
REDIS_DIR="redis-stable" | |
sudo apt-get update >> $log_file 2>&1 | |
sudo apt-get install build-essential -y >> $log_file 2>&1 | |
sudo apt-get install tcl8.5 -y >> $log_file 2>&1 | |
# Download and unpack Redis | |
wget -q $REDIS_URL >> $log_file 2>&1 | |
tar zxf $REDIS_TGZ >> $log_file 2>&1 | |
# Move into the directory and build | |
cd $REDIS_DIR | |
make >> $log_file 2>&1 | |
sudo make install >> $log_file 2>&1 | |
cd utils >> $log_file 2>&1 | |
# sudo ./install_server.sh >> $log_file 2>&1 | |
echo -n | sudo ./install_server.sh >> $log_file 2>&1 | |
sleep 2 | |
# Start redis | |
sudo service redis_6379 start | |
sleep 1 | |
sudo update-rc.d redis_6379 defaults | |
sleep 1 | |
redis-cli ping >> $log_file 2>&1 | |
echo -e "\n=> Done installing Queuing. Proceed with the next step." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment