摘要: /* if ....else .... */ [root@localhost test1]# vim 5.py //ADD #!/usr/bin/python if 1>2: print 'hello python' print 'TRUE' else: print 'FALSE' [root@localhost test1]# python 5.py FALSE ... 阅读全文
posted @ 2016-09-04 15:23 Frankiee 阅读(209) 评论(0) 推荐(0) 编辑
摘要: [root@localhost test1]# vim 4.py //ADD #!/usr/bin/python info = {} name = raw_input("Please input a name: ") age = raw_input("Please input your age: ") gender = raw_input("Please input (M/F): ") inf... 阅读全文
posted @ 2016-09-04 14:03 Frankiee 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Python数据类型 1。数值 --类型: 1/整型 2/长整型 3/浮点型 -- 0.0, 12.0, -18.8, 3e+7等 4/复数型 -- complex 2. 字符串 --是一个序列 -- 对于序列的操作 可以通过索引和切片 3. 列表 4. 元组 5. 字典 阅读全文
posted @ 2016-09-03 12:22 Frankiee 阅读(2228) 评论(0) 推荐(0) 编辑
摘要: id() -- 可以查看变量指向内存的地址 赋值为字符串,需要用 单引号 '' type() --可以查看此变量是什么类型的 Tranning: 写一个四则运算器 1.要求从键盘读取数字 2. 分清楚input() and raw_input()的区别 阅读全文
posted @ 2016-09-02 18:00 Frankiee 阅读(229) 评论(0) 推荐(0) 编辑
摘要: /* 1. python 源码文件以"py"为扩展名 */ [root@localhost ~]# mkdir test1 [root@localhost ~]# cd test1/ [root@localhost test1]# vi 1.py //ADD #!/usr/bin/python print 'hello world' [root@localhost test1]# pytho... 阅读全文
posted @ 2016-09-02 17:34 Frankiee 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1. python安装 //先查看是否存在python的包,如果没有,那可以用yum或去python的官网安装 [root@localhost ~]# rpm -qa|grep python python-2.6.6-51.el6.i686 python-iniparse-0.3.1-2.1.el6.noarch python-urlgrabber-3.9.1-9.el6.noarch 2.... 阅读全文
posted @ 2016-09-02 17:20 Frankiee 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 1. 两台虚拟机,安装Centos7系统 两个网卡 -- 一个NAT模式,一个仅主机模式 两个硬盘 -- 一个20GB,一个50GB 内存 -- 主 2.6GB(根据自己的配置,大于2G即可) 从 1.6 GB 2. 配置网络 (参照博文 ”Centos7 配置网络) 3. 关闭 selinux ,关闭iptables(两台机器都要操... 阅读全文
posted @ 2016-09-01 15:15 Frankiee 阅读(339) 评论(0) 推荐(0) 编辑
摘要: /* Centos7 的网络 不可以用ifconfig获取,需要安装包 所以 。*/ //查看ip [root@master ~]# ip a /* Centos7 的网卡名字与 Centos6有区别,要注意!*/ //获取网卡ip [root@master ~]# dhclient + 网卡名字 /*如果配置了两张网卡,很可能第二张没办法获取,因为进程一直存在。 所... 阅读全文
posted @ 2016-09-01 14:15 Frankiee 阅读(5423) 评论(0) 推荐(0) 编辑
摘要: 一、先把Centos7的镜像下载到本地 镜像下载网址:http://archive.kernel.org/centos-vault/ (里面有任何需要的版本) 二、启动VMware 1. 创建新的虚拟机 2. 编辑虚拟机设置 : 根据需求,并且加入镜像 3. 开启虚拟机 选择安装时的语言 --〉 中 阅读全文
posted @ 2016-09-01 13:19 Frankiee 阅读(230) 评论(0) 推荐(0) 编辑
摘要: [root@localhost ~]# vi Dockerfile //ADD FROM centos_with_net MAINTAINER frankie onez0714@163.com RUN yum install -y pcre-devel wget net-tools gcc zlib zlib-devel make openssl-devel ADD http://nginx.o... 阅读全文
posted @ 2016-08-31 14:02 Frankiee 阅读(8499) 评论(0) 推荐(1) 编辑