如何找到linux centos7 中 redis.conf
我们假设redis正在运行,但是我们找不带redis的配置文件redis.conf.
正确的示范:
(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)
由此处可见,redis在/etc/rc.d/init.d/redis中
(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
.. ... (后续内容省略)
由此可见 redis.conf 在这儿 CONF="/www/server/redis/redis.conf"
错误的示范
(1)find / redis.conf (找不到)
(2)find / 6379.conf (某位网友的建议,然而没卵用)
(3)rpm -ql redis (也不行)
如何找到linux centos7 中 redis.conf的更多相关文章
- linux centOS7 设置 redis 开机启动
1.为了让redis-server能在系统启动时自动运行,需要将redis服务作为守护进程(daemon)来运行,我们回/usr/local/cluster/7000/目录中找到一个redis.con ...
- centos7中redis安装
官网地址:http://redis.io/ 官网下载地址:http://redis.io/download 1. 下载Redis源码(tar.gz),并上传到Linux:或 wget http://d ...
- linux系统中 redis 保存数据的5种形式 linux后端模式启动 jedis无法通过IP地址和端口号访问如何修改linux防火墙
vim修改redis.conf配置文件(我的已经复制到虚拟机的/usr/local/redis/bin目录下)为daemonize yes, 以后端模式启动 ./redis-server redis. ...
- centos7中redis安装配置
1.官网下载对应版本,本例以5.0.5为例 2.tar -zxvf xxxxx 并mv到安装目录 3.进入redis-5.0.5目录下,执行编译命令 make 4.编译完成后,经redis安装到指定目 ...
- linux centos7 安装redis
首先看官方教程:http://redis.io/download Download, extract and compile Redis with: $ wget http://download.re ...
- Redis中redis.conf配置总结
redis.conf 配置项说明如下:1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize no2. 当Redis以守护进程方式运行时,Re ...
- redis中redis.conf配置文件
redis.conf文件配置解释 1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize yes 2. 当Redis以守护进程方式运行时,Red ...
- Linux(centos7)安装redis并设置redis开机自启动
1.下载redis安装包 wget http://download.redis.io/releases/redis-4.0.6.tar.gz 2.解压安装包 tar -zxvf redis-4.0.6 ...
- Linux系统中Redis和Tomcat的PID文件路径设置
Tomcat: /bin/catalina.sh 文件头注释下面添加一行:CATALINA_PID=/var/run/tomcat.pid Redis: redis.conf配置文件里面搜索pidfi ...
随机推荐
- SQLServer函数 left()、charindex()、stuff()
SQLServer函数 left().charindex().stuff()的使用 1.left()LEFT (<character_expression>, <integer_ex ...
- javax.persistence.TransactionRequiredException: Executing an update/delete query
最近在springboot中整合jpa的时候碰到一个异常,异常如下 javax.persistence.TransactionRequiredException: Executing an updat ...
- centos 7 yum 安装 mysql glib 安装 mysql
centos 7 YUM 在线安装版 1.wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm 下载 2.rpm ...
- ubuntu16.04源码编译安装nginx1.14.2
1.下载nginx-1.14.2, 官网地址:nginx.org 2.解压nginx-1.14.2.tar.gz tar zxvf nginx-1.14.2.tar.gz 3.切到文件夹nginx-1 ...
- 【java8新特性】日期和时间
Java 8 (又称为 jdk 1.8) 是 Java 语言开发的一个主要版本. Oracle 公司于 2014 年 3 月 18 日发布 Java 8 ,它支持函数式编程,新的 JavaScript ...
- Python基础之定义有默认参数的函数
1. 构建有默认参数的函数 当我们在构建一个函数或者方法时,如果想使函数中的一个或者多个参数使可选的,并且有一个默认值,那么可以在函数定义中给参数指定一个默认值,并且放到参数列表的最后就行了.比如: ...
- elasticsearch启动错误
requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled java.lang.UnsupportedOpe ...
- kafka 45个题目介绍
>1.Kafka面试问答 Apache Kafka的受欢迎程度很高,Kafka拥有充足的就业机会和职业前景.此外,在这个时代拥有kafka知识是一条快速增长的道路.所以,在这篇文章中,我们收集了 ...
- 个微信小程序云开发云函数
1. project.config.json写上云函数所在目录"cloudfunctionRoot": "cloudfunctions/",如图 2. app. ...
- python 简化数据结构的初始化二 支持关键字参数
1.例子 学自cookbook3