如何找到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 ...
随机推荐
- php MySQL 数据类型
MySQL 数据类型 MySQL中定义数据字段的类型对你数据库的优化是非常重要的. MySQL支持多种类型,大致可以分为三类:数值.日期/时间和字符串(字符)类型. 数值类型 MySQL支持所有标准S ...
- SQLServer函数 left()、charindex()、stuff()
SQLServer函数 left().charindex().stuff()的使用 1.left()LEFT (<character_expression>, <integer_ex ...
- learning scala sealed class
package com.aura.scala.day01 object sealedClassed { def findPlaceToSit(piece: Furniture) = piece mat ...
- [Bob]Collectors Problem
https://vjudge.net/problem/UVA-10779#author=0 网络流 1.Bob向他有的贴纸连边,流量为他有的贴纸数量 2.每一种贴纸向汇点连流量为1的边 3.其余人,如 ...
- LibreOJ #6165. 一道水题
二次联通门 : LibreOJ #6165. 一道水题 /* LibreOJ #6165. 一道水题 欧拉线性筛 其实题意就是求区间[1, n]所有数的最小公倍数 那么答案就是所有质因子最大幂次的乘积 ...
- 关闭linux下的主板响声(主板蜂鸣器)
在从deepin的kdd桌面换到xfce桌面后,命令行和界面操作上动不动会让主机响一声. manjaro的xfce版也是如此,不知道是不是linux下xfce的通病. 主要是搜索的时候百度的结果很奇葩 ...
- 使用vscode快速建立vue模板
当我们希望每次新建.vue文件后,vscode能够根据配置,自动生成我们想要的内容. 打开vscode编辑器,依次选择“文件 -> 首选项 -> 用户代码片段”,此时,会弹出一个搜索框,我 ...
- oracle中的trigger
https://blog.csdn.net/indexman/article/details/8023740/ https://www.cnblogs.com/sharpest/p/7764660.h ...
- PyTorch Tutorials 3 Neural Networks
%matplotlib inline Neural Networks 使用torch.nn包来构建神经网络. 上一讲已经讲过了autograd,nn包依赖autograd包来定义模型并求导. 一个nn ...
- OpenJudge计算概论-数组逆序重放
/*=============================================================== 数组逆序重放 总时间限制: 1000ms 内存限制: 65536kB ...