将redis设置成后台运行
修改/usr/local/redis/redis-4.0.0中的redis.conf
vi redis.conf
将daemonize no 修改为 yes
运行代码如下:
src/redis-server ./redis.conf
设置redis远程登录密码
切换到redis-4.0.0目录下用vi redis.conf修改如下内容:
vi redis.conf
通过管道命令杀死redis运行进程:
ps -ef | grep redis
kill -9 9262