Linux(Debian)上安装Redis

安装

下载文件到该目录
cd /usr/home/
wget http://download.redis.io/releases/redis-3.0.1.tar.gz

解压
tar xzf redis-3.0.1.tar.gz

进入目录编译安装
cd redis-3.0.1
make
make test
make install

wget网络不稳定时会报错,多试几次

make test时会有报“You need tcl 8.5 or newer in order to run the Redis test”错误的

You need tcl 8.5 or newer in order to run the Redis test
make: *** [test] Error 1

安装tcl即可解决

wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz  
sudo tar xzvf tcl8.6.1-src.tar.gz  -C /usr/local/  
cd  /usr/local/tcl8.6.1/unix/  
sudo ./configure  
sudo make  
sudo make install   

简单配置

mkdir /etc/redis

cp redis.conf /etc/redis/

vi /etc/redis/redis.conf

进入实际使用的redis.conf

把daemonize设置为yes,后台启动

取消requirepass注释,并设置访问密码

启动

./redis-server /etcredis//redis.conf

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值