但redis通常会以以下错误开始:
tyler @ tyler-vortex: ~ / pens $. / src / redis-server
[3690] Dec 01 10:56:05 # Warning: the specified config file, using the default config. In order to Specify a config file use 'redis-server / path / to / redis.conf'
[3690] Dec 01 10:56:05 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max configuration to 992 clients.
发现其他错误:
tyler@tyler-vortex:~/redis$ sudo ./utils/install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server]
cat: ./redis.conf.tpl: Arquivo ou diretório não encontrado
cat: ./redis_init_script.tpl: Arquivo ou diretório não encontrado
ERROR: Could not write init script to /tmp/6379.conf. Aborting!
此外,我想知道如何配置它以避免消耗太多的 RAM。
按照我们网站的内存配置,但是在redis.conf文件中没有“vm-*”的设置。 http://redis.io/topics/virtual-memory 你必须创造它们吗?
* 编辑:
我安装了。
在此之后,我相信我无法再通过 ./src/redis-server 进行访问,因为发生了以下情况:
tyler@tyler-vortex:~$ cd redis/
tyler@tyler-vortex:~/redis$ ./src/redis-server
[2616] 01 Dec 22:29:30 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[2616] 01 Dec 22:29:30 # Opening port 6379: bind: Address already in use
tyler@tyler-vortex:~/redis$
但还有另一个细节,重新分配从系统开始。
redis 127.0.0.1:6379> exit
tyler@tyler-vortex:~/redis$ ./src/redis-cli
redis 127.0.0.1:6379> exit
...但是我现在怎么才能看到你在从.sh 安装之前就已经进行的通信呢?
答案1
Unable to set the max number of files limit to 10032 (Operation not permitted)
tyler
出现此错误是因为您以普通用户身份运行。
cat: ./redis.conf.tpl: No such file or directory
cat: ./redis_init_script.tpl: No such file or directory
ERROR: Could not write init script to /tmp/6379.conf. Aborting!
该脚本install_server.sh
会检查当前工作目录中的模板文件。因此,utils
在运行之前,您应该切换到文件夹:
$ cd utils/
$ sudo ./install_server.sh
此外,我想知道如何配置它以避免消耗太多的 RAM。
按照我们网站的内存配置,但是在redis.conf文件中没有“vm-*”的设置。 http://redis.io/topics/virtual-memory
正如您在上面的链接中看到的,虚拟内存功能现在已被弃用,并且不鼓励使用它。