logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

docker学习笔记-docker安装与配置(使用清华镜像源)

下载设置清华镜像源wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo替换默认下载源sed -i "s@https://download.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce/@g

Python 定时同步远程数据库的某个表中数据到另一个数据库的某个表(版本1)

话不多直接上脚本,新手写法-还请指点#-*- coding: utf-8 -*-import pymysql#根据id同步,获取本地最大IDdef loacl():    db =pymysql.connect(‘127.0.0.1’','root','PASSWORD','DETABASES',charset='utf8')    cursor = db.cursor()  ...

#python
centos7下使用LVM给系统(/)根目录-硬盘扩容(图文)

测试目标:把一台CentOS7虚拟机原系统磁盘扩容1G。操作步骤:虚拟机编辑设置添加一块新硬盘,本实验添加的硬盘2-1G,请忽视新硬盘那个。2.为了让在系统里能够显示新添加的硬盘已知有两种操作方法(1).重启#一般我们使用方法2因为是使用中的服务器(2).输入 echo “- - -” > /sys/class/scsi_host/host0/scan并且scsi_hos...

python2-监控error日志,实时发送到钉钉

原理用python常链接一个日志文件,每当有新的内容写入,就通过钉钉机器人转发到群里#!/usr/bin/python#-*- coding: utf-8 -*import urllib, urllib2, jsonimport sys, shutil, os, string, datetime,timeserverip="服务器IP"name="日志名"t

python2-监控error错误日志,实时发送到钉钉(版本2)

这一版是写了个方法,把要监控的日志当成变量传一下 就开启监控日志内容了。实现实时警报。运行nohup python/root/error.py日志路径 &以下是error.py内容#!/usr/bin/python# -*- coding: utf-8 -*import urllibimport urllib2import jsonimport sys, shu...

python-使用wxpy通过微信发警报error消息

参考文档https://wxpy.readthedocs.io/zh/latest/index.html#环境python3.4-3.6,pip安装wxpypip3.6 install -U wxpy -i “https://pypi.doubanio.com/simple/”#!/usr/bin/python# -*- coding: utf-8 -*import urlli...

python脚本--用企业微信实现发送信息

#!/usr/bin/python# -*- coding: utf-8 -*-import timeimport requestsimport json,osclass WeChat_SMS:def __init__(self):self.CORPID = 'XXXX'#企业ID, 登陆企业微信,在我的企业-->企业信息里查看s...

到底了