2、务端了切换到redis目录下运行redis-cli.exe-h127.0.0.1-p6379出现下图: 这时候,就已经完成配置了,现在说下它的的redis.conf配置文件。[plain] viewplaincopy1.001 2.# Redis configuration file example 3.002 4. 5.003 6.# Note on units: when memory size is needed, it is possible to specifiy 7.004 8.# it in the usual form of 1k 5GB 4M and so
4、b 1gB are all the same. 27.014 28. 29.015 30.# By default Redis does not run as a daemon. Use 'yes' if you need it. 31.016 32.# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. 33.017 34.daemonize no 35.018 36.Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 37.0
5、19 38. 39.020 40.# When running daemonized, Redis writes a pid file in /var/run/redis.pid by 41.021 42.# default. You can specify a custom pid file location here. 43.022 44.pidfile /var/run/redis.pid 45.023 46.当Redis以守护进程方式运行时,Redis默认会把pid写入/var/run/redis.pid文件,可以通过pidfile指定 47.024 48.
6、# Accept connections on the specified port, default is 6379. 49.025 50.# If port 0 is specified Redis will not listen on a TCP socket. 51.026 52.port 6379 53.027 54.指定Redis监听端口,默认端口为6379 55.028 56.# If you want you can bind a single interface, if the bind option is not 57.029 58.# specif
7、ied all the interfaces will listen for incoming connections. 59.030 60.# 61.031 1.# bind 127.0.0.1 2.032 3.绑定的主机地址 4.033 5.# Specify the path for the unix socket that will be used to listen for 6.034 7.