| 1.在linux修改redis配置文件//去掉注释信息
cat redis.conf |grep -v "#" |grep -v "^$"
//查看到的配置文件放到redis-6379.conf
cat redis.conf |grep -v "#" |grep -v "^$"> redis-6379.conf
 //修改配置文件
port 6379
daemonize yes //守护进程方式启动
logfile "6379.log"//日志文件
dir /usr/local/software/redis-4.0.0/data  //生成文件在什么位置
//记得在redis目录下创建data文件夹存放日志
 2. 用配置文件redis-6379.conf启动 redis1.配置文件内容port 6379
daemonize yes 
logfile "6379.log"
dir /usr/local/software/redis-4.0.0/data
 2.启动redis-server redis-6379.conf
 3.查看是否启动ps -ef |grep redis-
 4.停止进程kill -s 9 85019  //85019是pid
 3.启动多个redis 在redis目录下创建conf文件夹 并且把redis-6379.conf放进去 创建6380端口的配置文件放在conf下 //默认配置启动
redis-server
redis-server –-port 6379
redis-server –-port 6380 ……
// 指定配置文件启动
redis-server redis.conf
redis-server redis-6379.conf
redis-server redis-6380.conf ……
redis-server conf/redis-6379.conf
redis-server config/redis-6380.conf ……
 |