安装 解压 编译

wget http://download.redis.io/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make

启动

./src/redis.server
# 指定配置文件
./src/redis.server redis.conf

配置文件修改

#默认端口6379
port 6379
#绑定ip
bind 192.168.1.100 10.0.0.1 # listens on two specific IPv4 addresses
bind 127.0.0.1 ::1 # listens on loopback IPv4 and IPv6
bind * -::* # like the default, all available interfaces
#守护进程启动
daemonize yes
#密码
requirepass ****