下载和安装
1 | wget http://download.redis.io/releases/redis-5.0.0.tar.gz |
./install_server.sh # 一路Enter即可
1 |
|
#bind 127.0.0.1
protected-mode no
1 |
|
service redis_6379 start #启动
service redis_6379 stop #停止
service redis_6379 restart #重启
开机自启动
systemctl enable redis_6379
systemctl daemon-reload
1 | 【到此完成安装和服务注册。以下内容仅供参考。】 |
yum -y install tcl
make test
1 |
|
cd src
cp redis-server /usr/local/bin/
cp redis-cli /usr/local/bin/
1 |
|
redis-server # 运行,可以看控制台
redis-server & # 后台运行
redis-server redis.conf #如果要启动多个redis实例,可以指定配置文件
1 |
|
ps -ef | grep redis
netstat -nlt|grep 6379
1 |
|
ps -ef | grep redis
kill -9 1111
1 |
|
redis-cli
1 |
|
requirepass abc123
1 |
|
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
```