redis配置文件的位置

mrmusic 发布于 2015/10/20 17:38
阅读 13K+
收藏 0
我在这问一个自己感觉有点白痴的问题,redis配置文件的位置我找不到,就是redis.conf文件的位置,我是直接wget下来,加压后直接make安装的,安装之前还装了tcl.我现在想找配置文件的位置不知道怎么找,MySQL直接show一下就可以。

以下是问题补充:

@mrmusic:[root@juphon ~]# redis-server 1962:C 21 Oct 01:52:12.016 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1962:M 21 Oct 01:52:12.017 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.0.5 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 1962 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 1962:M 21 Oct 01:52:12.018 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 1962:M 21 Oct 01:52:12.018 # Server started, Redis version 3.0.5 1962:M 21 Oct 01:52:12.018 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1962:M 21 Oct 01:52:12.018 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 1962:M 21 Oct 01:52:12.018 * DB loaded from disk: 0.000 seconds 1962:M 21 Oct 01:52:12.018 * The server is now ready to accept connections on port 6379 (2015/10/20 17:46)
加载中
0
狐狸糊涂
狐狸糊涂

你怎么启动的redis-server的?

ps -ef|grep redis-server 看看你启动的时候有没有指定redis.conf。没有指定的话redis在内部自动维持一套配置。

狐狸糊涂
狐狸糊涂
回复 @mrmusic : 如果你想自己指定配置文件,直接启动的时候把配置文件作为命令行参数就好了 ./redis-server redis.conf
mrmusic
mrmusic
[root@juphon ~]# ps -ef|grep redis-server root 1999 1943 0 02:01 pts/0 00:00:00 redis-server *:6379 root 2025 2005 0 02:02 pts/1 00:00:00 grep redis-server
mrmusic
mrmusic
Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 你说的可能是这个
mrmusic
mrmusic
我直接用redis-server就启动了,照着书上操作的
0
Feng_Yu
Feng_Yu
redis-server --help
0
卡爱

redis tar包解压后,能看到一个文件名为redis.conf的配置文件,你可以copy出来一份,然后设置自己想要的配置,启动redis时,指定这个修改的配置文件。

0
f
fixfirfor

you can run this command to find where the file loacted:

sudo find / -type f -name 'redis.conf'

 

返回顶部
顶部