redis默认不记录log文件,需要在Redis.conf文件,找到loglevel notice,在其后的logfile "",双引号中,写redis的路径"/redis2.8/redis.log",默认盘符是redis服务所在盘符
在保存文件时,提示readonly option is set
网上查询后总结:
方法一:
This is a vim issue, not a file permission issue. If you did not have read permission on the file, you'd see a "Permission denied" error.
Do you invoke vi/vim with the -R
option? Are you calling view
instead of vi
or vim
? Do you have set readonly
in your .vimrc or in a file in ~/.vim/ftplugin?
In vim you can enter :set noreadonly
to unset the readonly flag.
步骤:
1.按Esc键
2.输入 :set noreadonly
3.然后就能正常保存了,你可以输入 :wq 来保存文件了。
方法二:
大家在上编辑文件的时候,明明是使用的root登录的,可是这种至高无上的权限在按下i的时候被那串红色错误亵渎了W10: Warning: Changing a readonly file
抱着试试看的态度更改了文件,保存的那一刻又被一串红色错误E45: 'readonly' option is set (add ! to override)深深的伤害了
这些错误往往是我们使用ssh时出现的,这个时候你只要将你使用的命令vim filename改为vi filename即可
还有就是你可能改变了文档的内容,但是退出时用的:q
方法三:
:wq! 强制保存退出!!!!
方法四:
用的不是root用户。。。
如果你尝试到第四步,拜拜~~