上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 要将自己编写的Go程序制作成Docker镜像,你需要创建一个Dockerfile,然后使用Docker命令构建镜像。以下是一个基本的示例: 创建一个名为Dockerfile的文件,并添加以下内容: # 使用官方Go镜像作为构建环境 FROM golang:1.18-alpine AS builder 阅读全文
posted @ 2024-05-17 15:56 zhaoguanhao 阅读(87) 评论(0) 推荐(0)
摘要: 相关环境 centos7.7.1908 安装相关插件 安装docker # 前置安装完docker # 安装epel源 yum install -y epel-release # 安装docker-compose yum install docker-compose -y 下载harbor安装包 h 阅读全文
posted @ 2024-05-17 10:22 zhaoguanhao 阅读(362) 评论(0) 推荐(0)
摘要: centos7 部署harbor 在CentOS 7上部署Harbor,您可以遵循以下步骤: 安装Docker Compose: sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compo 阅读全文
posted @ 2024-05-16 17:05 zhaoguanhao 阅读(27) 评论(0) 推荐(0)
摘要: golang 在 Mac , Linux , Windows 下交叉编译 https://blog.csdn.net/weixin_30359021/article/details/101164752 #linux 下运行 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 阅读全文
posted @ 2024-05-10 17:33 zhaoguanhao 阅读(16) 评论(0) 推荐(0)
摘要: zabbix 安装教程 https://blog.csdn.net/zzzxxx520369/article/details/137771649 阅读全文
posted @ 2024-04-30 18:09 zhaoguanhao 阅读(33) 评论(0) 推荐(0)
摘要: 慢SQL(增删改查)记录 SELECT TOP 100 (total_elapsed_time / execution_count)/1000 N'平均时间ms' ,total_elapsed_time/1000 N'总花费时间ms' ,total_worker_time/1000 N'所用的CPU 阅读全文
posted @ 2024-04-28 09:43 zhaoguanhao 阅读(24) 评论(0) 推荐(0)
摘要: golang 1.20.13 定时执行bat shell 脚本 package main import ( "fmt" _ "github.com/CodyGuo/godaemon" "os/exec" "time" ) func main() { // 设置定时任务的时间 t := time.No 阅读全文
posted @ 2024-04-26 13:55 zhaoguanhao 阅读(150) 评论(0) 推荐(0)
摘要: 定时清理1年前过期log日志数据 select min(createtime),max(createtime) from dbo.Sys_LoggerOperate SELECT count(1) FROM dbo.Sys_LoggerOperate WHERE createtime < DATEA 阅读全文
posted @ 2024-04-25 16:21 zhaoguanhao 阅读(147) 评论(0) 推荐(0)
摘要: golang 实现文件下载 http://localhost/files package main import ( "fmt" "net/http" ) func main() { // 指定要共享的文件或目录路径 shareDirectory := "G:\\Databackup" // 替换为 阅读全文
posted @ 2024-04-24 19:46 zhaoguanhao 阅读(845) 评论(0) 推荐(0)
摘要: 编写Shell脚本以备份和还原规则在清空规则之前,可以使用iptables-save命令将当前规则保存到文件中,以备之后的恢复。之后,可以使用iptables-restore命令来还原规则。 保存规则到文件: shelliptables-save > backup.rules 清空所有规则: she 阅读全文
posted @ 2024-04-24 14:57 zhaoguanhao 阅读(1737) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页