上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页
摘要: 1.文档: string模块:https://docs.python.org/3/library/string.html random模块:https://docs.python.org/3/li... 阅读全文
posted @ 2017-06-01 04:08 fanren224 阅读(373) 评论(0) 推荐(0) 编辑
摘要: centos: 1.查询一个包是否被安装 rpm -q < package name> 2.列出已安装软件相关的所有包 rpm -qa < package name> ubuntu: 1. 查找包名 apt-cache search 2.查找系统中已安装的软件 dpkg -l |grep -i 3. 阅读全文
posted @ 2017-05-31 23:46 fanren224 阅读(307) 评论(0) 推荐(0) 编辑
摘要: text返回的是Unicode型的数据 content返回的是是二进制的数据。 也就是说,如果你想取文本,可以通过r.text。 如果想取图片,文件,则可以通过r.content>>> impor... 阅读全文
posted @ 2017-05-31 23:30 fanren224 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 网站入口:http://wise.xmu.edu.cn/people/faculty 爬取信息:姓名和主页地址 python版本:3.5import requestsr = requests.ge... 阅读全文
posted @ 2017-05-31 03:38 fanren224 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 需要阅读的文档: Requests:http://cn.python-requests.org/zh_CN/latest/user/quickstart.html BeautifulSoup:ht... 阅读全文
posted @ 2017-05-31 01:20 fanren224 阅读(191) 评论(0) 推荐(0) 编辑
摘要: # -*-coding:utf-8-*-# 定义类是通过class关键字,class后面紧接着是类名,即Student,类名通常是大写开头的单词,紧接着是(object),表示该类是从哪个类继承下... 阅读全文
posted @ 2017-05-29 20:11 fanren224 阅读(119) 评论(0) 推荐(0) 编辑
摘要: ubuntu16.04中默认已经安装了python2.7和python3.5hanli@ubuntu:/usr/bin$ ls |grep pythondh_python2dh_python3py... 阅读全文
posted @ 2017-05-28 01:05 fanren224 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1.user资源就是用来管理目标服务器上的用户的,比如创建用户、修改用户、删除用户,user资源的常用属性如下user{'test': ensure => present, uid =... 阅读全文
posted @ 2017-05-26 14:48 fanren224 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1.先看两个例子: a.创建一个文件file{"/tmp/12567.txt": content => aaaaababbau, ensure => present... 阅读全文
posted @ 2017-05-26 13:40 fanren224 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 单机测试apply命令: 以独立的方式,将清单中的配置应用于本机,也就是说,根据配置清单配置当前服务器。1.apply这个子命令有很多选项,而我们常用的有debug、verbose、noop等,d... 阅读全文
posted @ 2017-05-26 12:48 fanren224 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 说明: lvs+keepalived-master 172.16.0.111 lvs+keepalived-backup 172.16.0.112 web-1 172.16.... 阅读全文
posted @ 2017-05-25 15:22 fanren224 阅读(90) 评论(0) 推荐(0) 编辑
摘要: IP地址分为5类: 1.A类地址 一个A类IP地址由1字节(每个字节是8位)的网络地址和3个字节主机地址组成,网络地址的最高位必须是“0”,即网络位最低为0000 0000,网络位最高为0111 1111,转换为10进制即为0~127. 因此A类地址范围为0.0.0.0~127.255.255.25 阅读全文
posted @ 2017-05-21 19:31 fanren224 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 说明 系统:CentOS7.3 内核:3.10[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (... 阅读全文
posted @ 2017-05-21 13:55 fanren224 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Nmap是一款针对大型网络的端口扫描工具,它也适用于单机扫描,它支持很多扫描,也同时支持性能和可靠性统计。[root@localhost ~]# yum install namp[root@loc... 阅读全文
posted @ 2017-05-19 13:44 fanren224 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 简介: 基于C/S架构的Puppet更新方式一般有两种,一种是Agent端设置同步时间主动去PuppetMaster端拉取配置,另一种是通过PuppetMaster端使用puppet kick命令... 阅读全文
posted @ 2017-05-18 17:57 fanren224 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页