- 博客(13)
- 收藏
- 关注
原创 Hadoop windows 环境搭建与验证
环境、版本信息: Windows7旗舰版 Hadoop2.8 Java1.8.0_111 安装步骤:下载hadoop 2.8.0 http://archive.apache.org/dist/hadoop/core/hadoop-2.8.0/hadoop-2.8.0.tar.gz,然后解压 配置文件: ...
2018-08-13 16:43:33
1033
原创 docker 环境安装
环境: 虚拟机:ubuntu 16.04.4 amd64 server 安装过程: apt install docker.io 修改镜像源: 默认镜像源:https://hub.docker.com/ 国内镜像源:https://registry.docker-cn.com 操作: ...
2018-08-12 22:17:07
196
原创 Python 之 global用法
Python 之 global用法 废话不说,直接看代码代码1# coding: utf-8age = 18def happy_birthday(): print "age {}, happy birthday ~".format(age)happy_birthday()print "your age is {}".format(age)输出结果:...
2018-07-28 17:09:30
14647
原创 Python Threading 多线程之 print
Python Threading 多线程之 print 在实例中,发现一个关于print的问题,尚未得到答案,记录下来,等待答案揭晓的一天 代码1实例代码:# coding:utf-8import threadingimport timedef action(arg): time.sleep(1) print '[sub thread name] {...
2018-07-28 10:57:47
5946
原创 ssh 证书登录
1. 生成证书 ssh-keygen -t rsa 生成两个文件,密钥:id_rsa,公钥:id_rsa.pub 拷贝公钥到authorized_keys: cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys 2. 修改sshd_configPermitRoo...
2018-07-23 16:45:54
751
原创 SSH 允许root登录
内部开发测试时,为了方便,经常希望使用root登录服务器。本文介绍开放root用户连接ssh的方法 ssh的配置分为服务器端配置sshd_config,客户端配置ssh_config。开放目标机的root登录,只需要修改目标机作为ssh服务器的配置,即只需要修改sshd_config 修改sshd配置: 1. PermitRootLogin yes 允许r...
2018-07-23 15:04:57
6835
原创 Linux History 增加时间与操作者属性
设置环境变量 export HISTTIMEFORMAT='%F %T `whoami`' 即可 遇到错误:-bash: HISTTIMEFORMAT: 只读变量修改办法:1. cd /etc/profile.d/ 2. grep HISTTIMEFORMAT * -R ...
2018-07-17 12:17:03
3946
原创 *.whl is not a supported wheel on this platform. 解决办法
在安装lxml的时候遇到了lxml-4.2.3-cp27-cp27m-win32.whl is not a supported wheel on this platform.仔细一看发现两个错误, 1. cp27代表CPython2(我们到官网下载的python默认下载的都是CPython),而本机使用的是python3.6.5 2. win32代表32位windows操作...
2018-07-09 10:28:14
1420
原创 iptables NAT
SNAT iptables -t nat -A POSTROUTING -s 1.1.1.1 -j SNAT --to-source 2.2.2.2 查看结果:iptables -t nat -nvL DNAT iptables -t nat -I PREROUTING -p tcp --dport 8086 -j DNAT --to-destination 1.1.1.1...
2018-07-06 17:12:46
306
原创 iptables 自定义链
创建自定义链 iptables -t filter -N self_control -N = new 增加自定义链规则 iptables -t filter -I self_control -s 192.151.102.2 -j REJECT 引用自定义链 iptables -t filter -I INPUT -j self_control 删除自定义链 ...
2018-07-06 12:28:00
4043
原创 iptables 匹配规则
iptables 匹配规则1. 源地址匹配: a. ip地址匹配 iptables -t filter -I INPUT -s 192.168.1.111,192.168.1.118 -j DROP 用“,”分隔多个源地址,地址与“,”之间不能有空格 b. 网段匹配 iptables -t filter -I ...
2018-06-20 17:12:44
6376
原创 iptables操作
查看iptablesiptables -t filter -nvL INPUT参数: -t 指定了查看的表。 -n 表示不进行名称解析。如果不带-n source和destination的0.0.0.0/0会被解析成 anywhere,in和out的*会被解析成any -v 表示详细信息(verbose),会增加pkts,bytes,in,out信息 -L 表示list信息...
2018-06-20 15:46:38
960
原创 iptables 简介
参考链接:http://www.zsythink.net/archives/1199朱双印先生创作的iptables系列非常优秀,为了加强自身的理解,写下此文。欢迎各位斧正iptables是一个用户态工具,其功能是由内核中的netfilter提供。(相当于qemu与kvm的关系)我们知道iptables是按照规则来办事的,我们就来说说规则(rules),规则其实就是网络管理员预定义的条件,规则一般...
2018-06-19 16:20:37
280
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人