wget http://download.redis.io/releases/redis-4.0.8.tar.gz
tar -zxvf redis-4.0.8.tar.gz
make
完成后就会放在了src目录里面了
Examples:
./redis-server (run the server with default conf)
./redis-server /etc/redis/6379.conf
./redis-server --port 7777
./redis-server --port 7777 --slaveof 127.0.0.1 8888
./redis-server /etc/myredis.conf --loglevel verbose
1.允许远程连接
注释掉bind指令
protected-mode yes
2.设置连接密码
requirepass 密码
3.守护进程执行
../redis.conf 配置文件中daemonize yes,会以守护进程执行
启动./redis-server ../redis.conf