和我一样菜的Linux菜鸟就会问了,为什么没用标准的Linux安装三板斧呢?官方维基是这样说的:Redis can run just
fine without a configuration file (when executed without a config file a
standard configuration is used). With the default configuration
Redis will log to the standard output so you can check what happens. Later, you can change the default settings
. 配置redis:
▲redis的默认端口号是6379,(据redis的作者antirez的博文说,6379在是手机按键上MERZ对应的号码,而MERZ取自意大利歌女Alessia Merz
的名字。而MERZ长期以来被antirez及其朋友当作愚蠢的代名词。)
▲Redis有两种存储方式,默认是snapshot方式,实现方法是定时将内存的快照(snapshot)持久化到硬盘,这种方法缺点是持久化之
后如果出现crash则会丢失一段数据。因此在完美主义者的推动下作者增加了aof方式。aof即append only
mode,在写入内存数据的同时将操作命令保存到日志文件。
redis端口会被拦截掉,要修改防火墙配置
开启redis端口,修改防火墙配置文件
vi /etc/sysconfig/iptables
加入端口配置
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
重新加载规则
service iptables restart 参考: