Skip to content

Instantly share code, notes, and snippets.

@yongboy
Created March 23, 2014 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yongboy/9716654 to your computer and use it in GitHub Desktop.
Save yongboy/9716654 to your computer and use it in GitHub Desktop.
install redis in centos server bash script.
#!/bin/sh
wget http://download.redis.io/releases/redis-2.8.7.tar.gz
tar -zxf redis-*.tar.gz
cd redis-*
make
make install
cp redis.conf /etc
useradd redis
mkdir -p /var/lib/redis
mkdir -p /var/log/redis
chown redis.redis /var/lib/redis #db文件放在这里,要修改redis.conf
chown redis.redis /var/log/redis
wget https://gist.githubusercontent.com/yongboy/9716596/raw/6c7b286aeb95eae5a747f3127a46005983ccb7d7/redis
cp redis /etc/init.d
chmod +x /etc/init.d/redis
chkconfig redis on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment