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

什么是微网站看广告领收益的软件

什么是微网站,看广告领收益的软件,网站开发时间,汕头网站建设推广一、使用Docker启动的Redis容器使用的配置文件路径等问题 1.docker启动的redis使用的配置文件路径是什么 使用docker搭建redis服务#xff0c;本身redis启动的时候可以指定配置文件的#xff0c; redis-server /指定配置文件路径/redis.conf。 但手上也没有一个redis配置文件…一、使用Docker启动的Redis容器使用的配置文件路径等问题 1.docker启动的redis使用的配置文件路径是什么 使用docker搭建redis服务本身redis启动的时候可以指定配置文件的 redis-server /指定配置文件路径/redis.conf。 但手上也没有一个redis配置文件。 在使用非docker安装时redis的安装包里到是有redis.conf默认文件但使用docker安装时不好直接找到啊。没法使用redis本身自带的redis.conf。于是直接启动一个redis服务不指定配置文件 docker run -itd \ --name redis7 \ --privilegedtrue \ --restartalways \ -p 6379:6379 \ -v /opt/redis/data:/data \ -v /opt/redis7/conf/redis.conf:/etc/redis/redis.conf \ redis:latest redis-server /etc/redis/redis.conf --appendonly yes 启动之后使用info server查看config_file为空没有使用任何配置文件。 executable:/data/redis-server config_file: 所以整理一个精简的redis配置文件放在这里吧。docker搭建redis7.2时可使用的精简redis.conf配置文件 [#root] cat /opt/redis7/conf/redis.conf port 6379 daemonize no databases 1 tcp-backlog 128 tcp-keepalive 300 logfile /data/redis.log syslog-enabled yes crash-log-enabled yes timeout 0 maxmemory 4gb maxmemory-policy volatile-lru save 3600 1 300 100 60 10000 stop-writes-on-bgsave-error yes rdbcompression yes rdbchecksum yes dbfilename dump.rdb # syslog-ident redis # requirepass foobared # maxclients 10000 2.Redis启动时警告Memory overcommit must be enabled WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, To fix this issue add vm.overcommit_memory 1 to /etc/sysctl.conf and then reboot or run the command sysctl vm.overcommit_memory1 for this to take effect. docker exec redis7.2 sysctl vm.overcommit_memory1 3.docker搭建redis服务时daemonize设置为no docker搭建redis服务时daemonize设置为no为YES的时候redis启动不了。默认值为no 为不守护进程模式如果是直接在宿主机启动. 4.发现python项目里多了个venv文件夹 python3.3之后可以用模块 venv 代替 virtualenv 工具创建、删除虚拟环境。venv就是一个虚拟python环境的文件夹。可以实现多个项目使用不同的python环境。 二、Python使用clickhouse_driver操作clickhouse数据库 Python要实现使用clickhouse_driver操作clickhouse数据库首先需要安装clickhouse_driver模块pip install clickhouse_driver PIP安装的时候有时会遇到报警 WARNING: Retrying (Retry(total4, connectNone, readNone, redirectNone, statusNone)) after connection broken by NewConnectionError(pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd06b379a90: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution): /simple/clickhouse-driver/。 如果不是在DOCKER容器中一般可以通过指定PIP源的方法解决如果是在docker容器中一般要修改docker中的DNS地址可在本CSDN博客中搜索我的文章内容。 from clickhouse_driver import Client #可以再加个连接超时时间send_receive_timeoutsend_receive_timeout client Client(hosthost, portport, useruser, passwordpassword,databasedatabase) result client.execute(select * from 数据库.表 limit 10) print(result) 连接的时候可能碰到报错 File /usr/local/lib/python3.8/site-packages/clickhouse_driver/connection.py, line 437, in receive_hello raise errors.UnexpectedPacketFromServerError(message) clickhouse_driver.errors.UnexpectedPacketFromServerError: Code: 102. Unexpected packet from server None:None (expected Hello or Exception, got Unknown packet) 这是因为端口使用错误导致clickhouse有两个端口8123和9000。分别用于接收 http协议和tcp协议请求管理后台登录用的8123(jdbc连接)而程序连接clickhouse(driver连接)则需要使用9000端口。如果在程序中使用8123端口连接就会报错 clickhouse_driver.errors.UnexpectedPacketFromServerError: Code: 102. Unexpected packet from server None:None (expected Hello or Exception, got Unknown packet)
http://www.yingshimen.cn/news/44088/

相关文章:

  • 宁波网站备案幕布拍照利用wps做网站
  • 南京网站建设南京搜索引擎优化指南
  • 简单的购物网站制作做公众号的网站模板下载
  • 网站全景图怎么做wordpress如何正常打开二级菜单
  • 用英文介绍购物网站安阳做网站公司
  • 交互式网站有哪些功能湖南平台网站建设哪里好
  • 千库网网站建立网站要怎么做
  • 网站开发实用案例教程网红营销平台
  • 网站模版 之星大连开发区招聘网站
  • 顺德网站建设公司信息大型购物网站建设
  • 做网站用vs还是dw深圳网站开发公司宝网
  • 网站建设 自动生成php 企业网站开发教程
  • 网站设计的主要步骤网站建设前的市场分析
  • 无锡网站制作8南海最新军事
  • 网站导航下拉菜单代码网站建设江阴
  • 百度官方网站入口如何做跨境购物网站
  • 网站按钮特效专业视频网站开发
  • 网站编辑网上国网注册推广有多少钱
  • 上海大型网站制作公司成都网站开发工作室
  • 网站 带数据开发聊天软件成本
  • 网站建设与管理期末总结广州专业网站设计
  • 珠海网站建设运营公司类似于微博网站怎么做
  • 建网站需要哪些免费做课设的网站
  • 做视频网站 视频放在哪里找帝国网站如何做中英文切换
  • 手机网站开发相关问题许昌 网站建设
  • 数据库和网站开发营销策划公司 采纳策划
  • 做网站一个月需要多少钱广东省建设信息港网站
  • 高端网站建设收费为何比较贵如何做微信ppt模板下载网站
  • 公司做外地网站优化网站排名工具
  • 宁波公司建设网站网站建设推广好做吗