摘要: 因为机房内的服务器并不是所有都能上外网,所以利用zabbix官方源的安装方法就行不通了,又嫌弃编译安装麻烦,所以这里选择离线RPM包安装zabbix。(如需完整rpm包可以留言与我联系) 下载zabbix离线安装包 1.首先在可以上外网的测试机上(测试机系统版本需要与离线服务器相同)安装zabbix 阅读全文
posted @ 2018-07-24 10:29 ForLivetoLearn 阅读(6757) 评论(2) 推荐(0) 编辑
摘要: 用date -s命令修改时间后,发现时间又被更新成+8小时了,在确定时区已经正确配置的情况下,看看ntp校时功能是否开启,总在那瞎校时,timedatectl set-ntp false 要在CentOS上修改时间,您可以使用timedatectl命令。以下是一些常见的时间操作: 查看当前时间设置: 阅读全文
posted @ 2024-01-16 11:44 ForLivetoLearn 阅读(53) 评论(0) 推荐(0) 编辑
摘要: #### 解决数据量占用系统资源问题 定期清理历史数据 #### 删除正式环境2019年6月份之前的所有历史数据. #### 流程描述 - 确定Mysql需要清理的库: ``` product_tst_iot_guangzhouwanli product_tst_iot_guilun product 阅读全文
posted @ 2023-08-10 09:10 ForLivetoLearn 阅读(40) 评论(0) 推荐(0) 编辑
摘要: range分区的片需要连续,所以添加时需要先把之前的p9999删掉,在按时间顺序添加,下面是目前使用的建表语句 ```sql CREATE TABLE `t_machine_alert_gantt` ( `id` bigint(20) NOT NULL COMMENT 'id', `machine_ 阅读全文
posted @ 2023-08-10 09:07 ForLivetoLearn 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1. 线程 开始线程只需要使用go关键字即可 2. 线程等待 主线程需要所有子线程执行完成后才结束 线程等待包 sync.WaitGroup 添加等待线程数 waitGroup.Add(100) 子线程结束标志 waitGroup.Done() 主线程等待标志 waitGroup.Wait() im 阅读全文
posted @ 2023-03-15 10:45 ForLivetoLearn 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 同一个目录下, package包名需要相同,通常都有父级目录文件名为包名 package Gotest 导入包 import ( "fmt" "其他..." ) 别名 import ( "fmt" // 别名 "包所在位置" a "Go/a" // 全部导入(少用) . "Go/a" // 匿名 _ 阅读全文
posted @ 2023-03-14 14:32 ForLivetoLearn 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 当前结构体方法只要将接口上定义的方法全部实现,通过该结构体实例化后的实例就可以当为接口实例 type person interface { walk() talk() smile() } type student struct { name string } func (s student) tal 阅读全文
posted @ 2023-03-14 13:08 ForLivetoLearn 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1. 指针 指针类型,指针的值: * 指针引用,指针位置: & type person struct { name string } func changeStrValue(p *person) { p.name = "new" } func main() { p := person{name: " 阅读全文
posted @ 2023-03-13 16:32 ForLivetoLearn 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1. type关键字 定义类型别名 type myInt = int var a myInt = 1 var b int = 2 fmt.Println(a + b) 类型定义 定义接口 定义结构体 类型判断 2. 结构体 定义结构体 type person struct { name string 阅读全文
posted @ 2023-03-13 15:48 ForLivetoLearn 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 1. 函数定义 func 函数名(参数1, 参数2 类型, 参数3 类型) (返回值1类型, 返回值2类型){ ​ return 类型1, 类型2 } func main() { add(1, 2, 3.1) } func add(a, b int, c int) (int, error) { re 阅读全文
posted @ 2023-03-11 21:35 ForLivetoLearn 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1. 数组 go中的数组需要提前定义好长度 初始化 1 var course [3]string course[0] = "go" course[1] = "grpc" course[2] = "gin" 初始化 2 course := [3]string{"go", "grpc", "gin"} 阅读全文
posted @ 2023-03-09 22:22 ForLivetoLearn 阅读(17) 评论(0) 推荐(0) 编辑