Created
March 23, 2014 00:43
-
-
Save yongboy/9716654 to your computer and use it in GitHub Desktop.
install redis in centos server bash script.
This file contains 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/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