# sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional ports/services to this default configuration *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT #-A INPUT -p tcp -m state --state NEW -m multiport tcp --dport 1433,1521,3306,5000,5432,6379,9092,11211,27017 -j ACCEPT -A INPUT -m state --state NEW -p tcp -m multiport --dport 1433,1521,3306,5000,5432,6379,9092,11211,27017 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 8000:8888 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT
配置文件
获取默认配置文件
1 2 3 4
daemonize no # 后台运行 bind 0.0.0.0 # 访问地址 port 6379 #端口 requirepass # 密码
其他操作
1 2 3 4 5 6 7 8 9 10 11 12
# 启动redis service redis start # 停止redis service redis stop # 查看redis运行状态 service redis status # 查看redis进程 ps -ef | grep redis # 进入本机redis redis-cli # 列出所有key keys *