fanlong0212

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2022年8月18日

摘要: 1、正常写法 name1 ansible_ssh_host=192.168.8.111 ansible_ssh_user="root" ansible_ssh_pass="123456" ansible_ssh_port=22 name2 ansible_ssh_host=192.168.8.222 阅读全文
posted @ 2022-08-18 15:39 fanlong0212 阅读(186) 评论(0) 推荐(0) 编辑

2021年2月3日

摘要: 登录PVE主机,使用nano /etc/network/interfaces 命令编辑网卡信息:一、添加物理接口子接口:auto eno3.200iface eno3.200 inet manual auto eno3.100iface eno3.100 inet manual auto vmbr0 阅读全文
posted @ 2021-02-03 11:08 fanlong0212 阅读(1149) 评论(0) 推荐(0) 编辑

2021年1月28日

摘要: 部署 准备源下载软件包 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget http://dl.fedoraproject.org/pub/epel/epel-rele 阅读全文
posted @ 2021-01-28 12:04 fanlong0212 阅读(4) 评论(0) 推荐(0) 编辑

2020年8月23日

摘要: 想要 把 自定义脚本 加进zabbix 有如下步骤: 1.修改 配置文件 /etc/zabbix/zabbix_agentd.conf UnsafeUserParameters=1 (默认为0,即不可以自定义) UserParameter=process.count[*],sudo ps -x | 阅读全文
posted @ 2020-08-23 18:21 fanlong0212 阅读(416) 评论(0) 推荐(0) 编辑

摘要: 转载自:https://blog.csdn.net/weixin_30416497/article/details/97817262 待测试?? 阅读全文
posted @ 2020-08-23 02:28 fanlong0212 阅读(210) 评论(0) 推荐(0) 编辑

2020年8月4日

摘要: 转载:https://www.cnblogs.com/python-robot/p/9958352.html 例子: import xlwt # 创建一个workbook 设置编码 workbook = xlwt.Workbook(encoding = 'utf-8') # 创建一个workshee 阅读全文
posted @ 2020-08-04 17:36 fanlong0212 阅读(142) 评论(0) 推荐(0) 编辑

2020年7月28日

摘要: 一: 使用paramiko #设置ssh连接的远程主机地址和端口t=paramiko.Transport((ip,port))#设置登录名和密码t.connect(username=username,password=password)#连接成功后打开一个channelchan=t.open_ses 阅读全文
posted @ 2020-07-28 14:32 fanlong0212 阅读(278) 评论(0) 推荐(0) 编辑

2020年7月25日

摘要: 通过pexpect模块登录到远程主机,1,从远程主机复制文件到本地服务器2,从本地服务器复制文件到远程主机3,查看远程主机IP地址并写入到create.txt文件中4,查看远程主机docker信息并写入到create1.txt文件中5,定义一个选择函数 #!/usr/bin/python # -*- 阅读全文
posted @ 2020-07-25 21:08 fanlong0212 阅读(177) 评论(0) 推荐(0) 编辑

摘要: yum -y install wget yum -y install setup yum -y install perl yum install openssl-devel -y yum install zlib-devel -y yum -y groupinstall "Development t 阅读全文
posted @ 2020-07-25 11:28 fanlong0212 阅读(439) 评论(0) 推荐(0) 编辑

2020年7月24日

摘要: #!/usr/bin/python # _*_ coding:utf-8 _*_ import pymysql import xlsxwriter #打开数据库链接 conn = pymysql.connect(host = '10.61.3.181',user = 'zabbix',passwor 阅读全文
posted @ 2020-07-24 18:23 fanlong0212 阅读(108) 评论(0) 推荐(0) 编辑