当前位置: 首页 > news >正文

域名如何解绑一个网站网站开发保存学习进度的方案

域名如何解绑一个网站,网站开发保存学习进度的方案,网站后台有什么用,潍坊专业技术继续教育平台Redis.conf Redis.conf是Redis的配置文件,它包含了一系列用于配置Redis服务器行为和功能的选项。 以下是Redis.conf中常见的一些选项配置: bind: 指定Redis服务器监听的IP地址,默认为127.0.0.1,表示只能本地访问,可以…

Redis.conf

Redis.conf是Redis的配置文件,它包含了一系列用于配置Redis服务器行为和功能的选项。

以下是Redis.conf中常见的一些选项配置:

  • bind: 指定Redis服务器监听的IP地址,默认为127.0.0.1,表示只能本地访问,可以改为0.0.0.0以允许来自任意IP地址的访问。

  • port: 指定Redis服务器监听的端口号,默认为6379。

  • timeout: 指定客户端连接到Redis服务器的超时时间,默认为0,表示无限制。

  • requirepass: 设置连接Redis服务器所需的密码,默认为空,即不需要密码。

  • databases: 指定Redis服务器中可以创建的数据库数量,默认为16个。

  • maxclients: 指定Redis服务器同时连接的最大客户端数量,默认为10000个。

  • maxmemory: 指定Redis服务器可以使用的最大内存数量,默认为0,表示不限制。

  • logfile: 指定Redis服务器的日志文件路径,默认为空,即不输出日志。

  • save: 指定Redis服务器进行持久化的条件,默认为三个条件都满足时进行持久化:900秒内进行了1次写操作、300秒内进行了10次写操作、60秒内进行了10000次写操作。

  • rdbcompression: 指定Redis服务器在进行RDB持久化时是否压缩数据,默认为yes。

  • appendonly: 指定是否开启AOF持久化,默认为no,可以改为yes。

  • appendfsync: 指定AOF持久化的方式,默认为everysec,表示每秒钟同步一次。

  • requirepass: 指定连接Redis服务器所需的密码,默认为空,表示不需要密码。

这些只是Redis.conf中的一部分选项,实际上还有很多其他选项可以进行配置。通过修改Redis.conf,可以根据实际需求对Redis服务器进行定制化的配置。
在这里插入图片描述

1.容量单位不区分大小写,G和GB有区别

在这里插入图片描述

2.可以使用 include 组合多个配置问题

在这里插入图片描述

3.网络配置

#ip绑定
bind 127.0.0.1
# Protected mode is a layer of security protection, in order to avoid that# Redis instances left open on the internet are accessed and exploited.
# When protected mode is on and if:
# 1) The server is not binding explicitly to a set of addresses using the"bind" directive.
# 2) No password is configured.
#
# The server only accepts connections from clients connecting from the# IPv4 and IPv6 loopback addresses 127.0,0,1 and ::1,and from Unix domain
# sockets.
# By default protected mode is enabled. You should disable it only if# you are sure you want clients from other hosts to connect to Redis# even if no authentication is configured, nor a specific set of interfaces# are explicitly listed using the"bind" directive.
#保护模式 默认开启
protected-mode yes
# Accept connections on the specified port,default is 6379 (IANA #815344)# If port @ isspecified Redis will not listen on a TCP socket.
#端口
port 6379

4.日志输出级别

daemonize yes  #以守护进程的方式运行,默认是 no,我们需要自己开启为yes!
pidfile /var/run/redis_6379.pid # 如果以后台的方式运行,我们就需要指定一个 pid 文件!
# 日志
# Specify the server verbosity Teve1
# This can be one of:
# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably) 生产环境
# warning (only very important / critical messages are logged)
loglevel notice
  1. 日志输出文件
logleve1 notice
logfile“” # 日志的文件位置名
databases 16 # 数据库的数量,默认是 16 个数据库
always-show-logo yes # 是否总是显示LOGO

6.持久化规则 (RDB)

由于Redis是基于内存的数据库,需要将数据由内存持久化到文件中

  • AOF
#持久化规则,持久化到文件 .rdb .aof
# 如果了900秒内 至少1个key进行了修改,就进行持久化
save 900 1
#300秒内 10个key进行了修改
save 300 10
save 60 10000
  • RDB文件相关
#持久化错误是否继续工作
stop-writes-on-bgsave-error yes
#Compress string objects using LZF when dump .rdb databases?
#For default that's set to 'yes' as it's almost always a win.
#If you want to save some CPU in the saving child set it to 'no' but# the dataset will likely be bigger if you have compressible values or keys.#是否压缩.rdb文件
rdbcompression yes
#Since version 5 of RDB a CRC64 checksum is placed at the end of the file.# This makes the format more resistant to corruption but there is a performance# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
#for maximum performances.
#RDB files created with checksum disabled have a checksum of zero that will
#tell the Loading code to skip the check.
#校验校rdb文件
rdbchecksum yes
#The filename where to dump the DB
dbfilename dump.rdb
# 如果900s内,如果至少有一个1 key进行了修改,我们及进行持久化操作
save 900 1
# 如果300s内,如果至少10 key进行了修改,我们及进行持久化操作
save 300 10
# 如果60s内,如果至少10000 key进行了修改,我们及进行持久化操作
save 60 10000
# 我们之后学习持久化,会自己定义这个测试!
# 持久化如果出错,是否还需要继续工作!
stop-writes-on-bgsave-error yes
rdbcompression yes  #是否压缩 rdb 文件,需要消耗一些cpu资源!
rdbchecksum yes  #保存rdb文件的时候,进行错误的检查校验!
dir ./ #rdb 文件保存的目录!

7.主从复制

replication在这里插入图片描述

8.Security模块中进行密码设置

在这里插入图片描述

在这里插入图片描述

9.客户端连接相关

maxclients 10000 #设置能连接上redis的最大客户端的数量
maxmemory <bytes> # redis 配置最大的内存容量
maxmemory-policy noeviction # 内存到达上限之后的处理策略
1、volatile-lru: 只对设置了过期时间的key进行LRu(默认值)
2、allkeys-lru: 删除lru算法的key
3、volatile-random: 随机删除即将过期key
4、allkeys-random: 随机删除
5、volatile-tt1 :删除即将过期的
6、noeviction : 永不过期,返回错误
maxclients 10000  最大客户端数量
maxmemory <bytes> 最大内存限制
maxmemory-policy noeviction # 内存达到限制值的处理策略

redis 中的默认的过期策略是 volatile-lru

设置方式

config set maxmemory-policy volatile-lru 

10.AOF相关部分

appendonly no  # 默认是不开启aof模式的,默认是使用rdb方式持久化的,在大部分所有的情况下,rdb完全够用!
appendfilename "appendonly.aof"  # 持久化的文件的名字
#appendfsync always  # 每次修改都会 sync。消耗性能
appendfsync everysec  # 每秒执行一次 sync,可能会丢失这1s的数据!
# appendfsync no # 不执行 sync,这个时候操作系统自己同步数据,速度最快!
appendonly no # 默认不开启 aof 使用rdb持久化
# The name of the append only file (default: "appendonty.aof")	
appendfilename"appendonly.aof"
# appendfsync always 每次修改进行同步
appendfsync everysec # 每秒执行一次同步
# appendfsync no 不进行同步 由操作系统进行同步 速度最快

Redis-浅谈redis.conf配置文件 到此完结,笔者归纳、创作不易,大佬们给个3连再起飞吧

http://www.yayakq.cn/news/376601/

相关文章:

  • 爱站网 关键词挖掘工具外贸营销推广方案
  • 安徽省建设总站网站企业邮箱怎么写
  • 网站空间位置wordpress亿起发
  • h5网站建设方案.doc正规网络游戏平台
  • wordpress网站更换空间网站生成静态慢原因
  • 如何查看一个网站的域名解析网站规划包含哪些内容
  • 用jsp做网站怎么分区网站建设公司兴田德润i优惠吗
  • 西安网站seo分析中国建设银行浙江分行网站
  • 高端型网站建设同源大厦 网站建设
  • 东莞住房建设网站的网丹东制作网站公司
  • 网站开发并发处理如何优化推广网站
  • 神鹰网站建设公司做网站的岗位
  • 网站首页二级下拉框怎么做盘锦网站建设流程
  • 连接国外网站做端口映射服务专业的网页制作服务
  • 宁波网站建设速成什么做网站做个网站一般要多少钱啊
  • 自己做的网站显示不安全怎么回事开发软件需要什么技术
  • 长兴网站建设列举企业网站建设有哪些好处湛江网站建设方案优化
  • 社交型网站首页面设计分析湖北建设厅网站怎么打不开
  • 建设网站基础知识做搜狗网站快速排名软
  • 企业网站案例公司浙江建筑信息网港
  • 邵阳建网站多少钱网站建设竞标
  • 网站开发连接数据库网站建设公司如何
  • 会计网站建设意义昆凌做的广告买化妆品网站
  • 建站行业的发展前景网站前端静态模板下载
  • 毕设做网站些什么比较简单网站建设刂搜金手指下拉贰肆
  • 如何做汽车的创意视频网站网站改版原则
  • 网站底部技术支持网络营销机构官方网站
  • 绵阳住房和城乡建设局网站海曙区网站开发培训
  • 佛山网站建设策划设计师35岁后的出路
  • 网站建设费用估计wordpress页面设置