Skip to content

Instantly share code, notes, and snippets.

@alexandrerocco
Forked from antond/redis install
Last active December 18, 2015 14:59
Show Gist options
  • Save alexandrerocco/5801286 to your computer and use it in GitHub Desktop.
Save alexandrerocco/5801286 to your computer and use it in GitHub Desktop.
Automated setup script for Redis Server on CentOS
### Set up SO:
sudo -s
yum -y update
yum -y install gcc gcc-c++ make
### Download and install Redis:
cd /opt
wget -q http://redis.googlecode.com/files/redis-2.6.14.tar.gz
tar xzf redis-2.6.14.tar.gz
rm -f redis-2.6.14.tar.gz
cd redis-2.6.14
make
make install
### Set up Redis
rm -rf /etc/redis /var/lib/redis
mkdir /etc/redis /var/lib/redis
wget -q https://gist.github.com/alexandrerocco/ec7f2aa28448db8dd94f/raw/ced8716cf6d5d93ce69b915954c2dc969775d8ba/redis-config-desenv
cp redis-config-desenv /etc/redis/redis.conf
## Create init.d
wget -q -O redis-server https://gist.github.com/alexandrerocco/5806064/raw/b6cace3f2feb824bdd71974886cff8ca17fd73d2/Init+Script+for+Redis
mv redis-server /etc/init.d
chmod 755 /etc/init.d/redis-server
chkconfig --add redis-server
chkconfig --level 345 redis-server on
## Tools will be at /usr/local/bin/
## Start server
service redis-server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment