How to find linux centos7 in redis.conf

  We assume redis is running, but we will not find with redis profile redis.conf.

Correct demonstration:

(1)systemctl status redis

● redis.service - LSB: starts Redis
Loaded: loaded (/etc/rc.d/init.d/redis; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

  Seen from here, redis in /etc/rc.d/init.d/redis in

 

 

 

(2)cat /etc/rc.d/init.d/redis

#!/bin/sh
# chkconfig: 2345 56 26
# description: Redis Service

### BEGIN INIT INFO
# Provides: Redis
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts Redis
# Description: starts the BT-Web
### END INIT INFO

# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.

CONF="/www/server/redis/redis.conf"
REDISPORT=$(cat $CONF |grep port|grep -v '#'|awk '{print $2}')
REDISPASS=$(cat $CONF |grep requirepass|grep -v '#'|awk '{print $2}')
if [ "$REDISPASS" != "" ];then
REDISPASS=" -a $REDISPASS"
fi
if [ -f /www/server/redis/start.pl ];then
STARPORT=$(cat /www/server/redis/start.pl)
else
STARPORT=6379
fi
EXEC=/www/server/redis/src/redis-server
CLIEXEC="/www/server/redis/src/redis-cli -p $STARPORT$REDISPASS"
PIDFILE=/var/run/redis_6379.pid

.. ... (omitted subsequent content)

  Thus redis.conf here  CONF = "/ www / server / redis / redis.conf"

 

 

 

 

Wrong Demonstration

(1) find / redis.conf (not found)

(2) find / 6379.conf (recommended by friends, but not with eggs)

(3) rpm -ql redis (not OK)

 

Guess you like

Origin www.cnblogs.com/chenyansu/p/11106967.html