日期:2014-05-16 浏览次数:20437 次
转自:http://www.cnblogs.com/viaivi/archive/2011/12/08/2281319.html
cd /tmp wget http://redis.googlecode.com/files/redis- 2 . 2 . 13 .tar.gz tar -zxf redis- 2 . 2 . 13 .tar.gz cd redis- 2 . 2 . 13 make sudo make install |
这时Redis 的可执行文件被放到了/usr/local/bin
wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server wget 备注:可能用参数--no-check-certificate sudo mv redis-server /etc/init.d/redis-server
sudo chmod +x /etc/init.d/redis-server sudo mv redis.conf /etc/redis.conf |
第一次启动Redis前,建议为Redis单独建立一个用户,并新建data和日志文件夹
sudo useradd redis sudo mkdir -p /var/lib/redis sudo mkdir -p /var/log/redis sudo chown redis.redis /var/lib/redis sudo chown redis.redis /var/log/redis |