ubuntu linux 安装redis
源文: http://rubyer.me/blog/638/
1.下载redis,安装:
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
2、下载配置文件和init启动脚本:
wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server wget https://github.com/ijonas/dotfiles/raw/master/etc/redis.conf sudo mv redis-server /etc/init.d/redis-server sudo chmod +x /etc/init.d/redis-server sudo mv redis.conf /etc/redis.conf
3、初始化用户和日志路径
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
4、设置开机自动启动,关机自动关闭
sudo update-rc.d redis-server defaults
5、启动Redis:
sudo /etc/init.d/redis-server start
6、启动client客户端连接:
$ redis-cli redis> set foo bar OK redis> get foo "bar"
相关推荐
MRFENGG 2020-11-11
rainandtear 2020-10-30
王道革 2020-11-25
wangdonghello 2020-11-03
Langeldep 2020-11-16
chenhualong0 2020-11-16
聚合室 2020-11-16
koushr 2020-11-12
guoyanga 2020-11-10
fackyou00 2020-11-10
Orangesss 2020-11-03
dongCSDN 2020-10-31
Quietboy 2020-10-30
liuyulong 2020-10-29
fansili 2020-10-29
温攀峰 2020-10-23
jackbon 2020-10-19
kaixinfelix 2020-10-04