2023年2月2日
摘要: 1. 下载fedora的 epel 仓库 yum install epel-release2. 安装 redisyum install redis3. 查看 redis 状态安装完毕后需要启动 # 启动redisservice redis start# 停止redisservice redis st 阅读全文
posted @ 2023-02-02 12:11 JentZhang 阅读(1148) 评论(0) 推荐(0)
  2023年1月14日
摘要: docker swarm 部署Kafka集群 本次部署主要是搭建zookeeper * 3 + kafka_broker * + kafka_manager * 1 的集群。 0. 创建专属网络 & 打标签 # 创建网络 docker network create --driver overlay 阅读全文
posted @ 2023-01-14 11:58 JentZhang 阅读(695) 评论(0) 推荐(0)
摘要: Docker Swarm集群管理 1. 创建Swarm集群 在已经安装好 Docker 的主机上执行如下命令: $ docker swarm init --advertise-addr 172.25.114.4 Swarm initialized: current node (dxn1zf6l61q 阅读全文
posted @ 2023-01-14 11:57 JentZhang 阅读(519) 评论(0) 推荐(1)
  2023年1月12日
摘要: docker swarm 部署ES集群 0. 环境准备 修改系统配置,在所有主机中,编辑 /etc/sysctl.conf,追加以下内容: vm.max_map_count=262144 保存后,执行sysctl -p 创建专用网络: docker network create --driver o 阅读全文
posted @ 2023-01-12 19:58 JentZhang 阅读(966) 评论(0) 推荐(0)
  2022年10月25日
摘要: Caddy File Server Docker部署 1. 切换到应用的文件夹下面 $ cd /alidata1/admin/app/caddy 2. 编辑docker-compose.yml version: "3.7" services: caddy: image: caddy:latest r 阅读全文
posted @ 2022-10-25 16:19 JentZhang 阅读(661) 评论(0) 推荐(0)
摘要: def nested_dict_2_dict(nested_dict): """ 嵌套字典转化为字典(闭包实现) 形如: 转化前:{"a": {"name": "张三", "friends": {"name": "lisi"}},"b": 20} 转化后:{'a.name': '张三', 'a.fr 阅读全文
posted @ 2022-10-25 10:10 JentZhang 阅读(184) 评论(0) 推荐(0)
  2022年10月10日
摘要: Python3实现i18n国际化 主要涉及Python基础类库gettext。详细步骤如下: 1. 编写公共方法的python文件(_i18n.py) #!/usr/bin/env python # -*- coding:utf-8 -*- # @Time:2022/9/21 10:39 # @So 阅读全文
posted @ 2022-10-10 14:59 JentZhang 阅读(1828) 评论(0) 推荐(1)
  2022年8月3日
摘要: import pytz from apscheduler.schedulers.asyncio import AsyncIOScheduler # other schedulers are available from fastapi import FastAPI from fastapi_sqla 阅读全文
posted @ 2022-08-03 13:32 JentZhang 阅读(1443) 评论(0) 推荐(0)
  2022年3月25日
摘要: package main import ( "fmt" "io/ioutil" "log" "path" "github.com/jung-kurt/gofpdf" ) // Hello 测试 func Hello() { pdf := gofpdf.New("P", "mm", "A4", "") 阅读全文
posted @ 2022-03-25 11:02 JentZhang 阅读(765) 评论(0) 推荐(0)
  2022年3月2日
摘要: Python操作Redis实现排行榜功能实例 #!/usr/bin/env python # -*- coding:utf-8 -*- # @Time:2022/3/2 15:41 # @Software:PyCharm __author__ = "JentZhang" import redis i 阅读全文
posted @ 2022-03-02 16:11 JentZhang 阅读(245) 评论(0) 推荐(0)