- 博客(108)
- 资源 (8)
- 收藏
- 关注
原创 iptables 地址、端口转发
一、iptables知识介绍:iptables防火墙可以用于创建过滤(filter)与NAT规则。所有Linux发行版都能使用iptables,因此理解如何配置iptables将会帮助你更有效地管理Linux防火墙。如果你是第一次接触iptables,会觉得它很复杂,但是一旦理解iptables的工作原理,会发现其实它很简单。四表 filter表:过滤规则表 nat表:地址转换规则表 mangle表:修改数据标记位规则表 raw表:跟踪数据表规则表五链 input:入站数
2020-06-02 18:34:35
384
原创 ansible delete the “u” from the list output
https://stackoverflow.com/questions/21413613/convert-ansible-variable-from-unicode-to-asciiif you really do have an array:[u'string1', u'string2', u'string3']And you want your template/whateve...
2020-02-21 11:12:23
536
原创 kvm创建虚拟网桥
1.创建xml文件[root@kolla tools]# cat new-net.xml<network> <name>virbr1</name> #vbr为虚拟网络的名字 <bridge name="virbr1"/> <forward mode="nat"/> <ip add...
2019-12-13 11:55:58
1830
转载 Centos7 创建虚拟网卡(tun/tap)
创建网卡、创建网桥并建立桥接[root@kolla ~]# cat create.shcreate_br(){ tunctl -t storage -u root brctl addbr virbr2 brctl addif virbr2 storage ifconfig virbr2 10.10.1.1 netmask 255.255.255.0 up ...
2019-12-12 12:04:46
5983
1
原创 Centos7部署etcd flannel
1、etcd 配置以及常用命令yum install etcd[root@localhost ~]# cat /etc/etcd/etcd.conf | grep -v "#"ETCD_DATA_DIR="/var/lib/etcd/default.etcd"ETCD_LISTEN_PEER_URLS="http://10.1.204.164:2380,http://localhos...
2019-06-28 23:25:58
529
原创 kubeadm HA master(v1.14.0)离线包 + 自动化脚本 + 常用插件 For Centos/Fedora
本文面向具有基本K8s使用经验的读者项目作者在业余时间看心情维护,不求你用,爱用不用。建议那些有钱的,懒得动脑子的,有甲方病的,出门左转找个收费的装,花点,不丢人。关于kubernetes v1.14.0:kubeadm开始建议使用systemd作为节点的cgroup控制器,因此建议读者参考本文流程配置docker为使用systemd,而非默认的Cgroupfs。 kubelet额外...
2019-06-26 17:18:31
1476
原创 linux 网络接口 dummy KVM
Load the dummy interface modulemodprobe dummyCreate a dummy interface called mynic0ip link set name mynic0 dev dummy0Set its MAC addressifconfig mynic0 hw ether 00:22:22:dd:ee:ffAdd a tap device...
2019-06-13 12:25:55
2702
原创 01-route
主要理解:1、路径如何访问2、转换器使用(int、float)int时到书的id,float时到书的价格#-*-coding:utf-8-*-from flask import Flaskapp = Flask(__name__)@app.route('/login/<name>')def hello_world(name): s = '<h1&...
2019-03-04 18:54:22
179
原创 Allow requests to the local network from hooks and services
http://note.youdao.com/noteshare?id=53851c201a49bf6c0e5b6db244270f88
2019-02-28 13:27:56
1116
转载 Kubernetes 部署 gitlab
1.下载相应文件# mkdir gitlab && cd gitlab# vim url.txt https://raw.githubusercontent.com/zhijiansd/ansible-k8s/master/addons/gitlab/gitlab-ns.yamlhttps://raw.githubusercontent.com/...
2019-02-15 20:16:14
682
原创 docker + grafana + prometheus + Mysql
1、prometheus 部署,系统架构图2、prometheus 部署过程 1. docker pull prom/prometheus2. docker run -p 9090:9090 -v /prometheus-data \ prom/prometheus --config.file=/prometheus-data/prometheus.yml3...
2018-12-25 16:40:05
723
原创 Ceph-ansible 部署
1、部署规划 主机名 IP地址 系统os 用途 备注 ansible-deployment 10.1.204.108 centos7.5 ansible 部署主机,当作部署客户端 node1 10.1.210.105 centos7.5 ...
2018-11-09 20:02:09
1421
原创 heapster Error in scraping containers from kubelet 10255: getsockopt: connection refused
apiVersion: v1 kind: ServiceAccount metadata: name: heapster namespace: kube-systemapiVersion: extensions/v1beta1 kind: Deployment metadata: name: heapster namespace: kube-system ...
2018-08-29 20:13:31
2687
转载 利用 Kubeflow 來管理 TensorFlow 應用程式
https://kairen.github.io/2018/03/15/tensorflow/kubeflow/Kubeflow 是 Google 開源的機器學習工具,目標是簡化在 Kubernetes 上運行機器學習的過程,使之更簡單、可攜帶與可擴展。Kubeflow 目標不是在於重建其他服務,而是提供一個最佳開發系統來部署到各種基礎設施架構中,另外由於使用 Kubernetes 來做為基礎...
2018-08-22 11:54:03
1111
1
原创 shell中统计时间到微妙
!/bin/bashcurrent=date "+%Y-%m-%d %H:%M:%S" timeStamp=date -d "$current" +%s currentTimeStamp=$((timeStamp*1000+date "+%N"/1000000)) echo currentTimeStampseq8|parallel−j8–workdircurrentTimeStamp...
2018-07-26 15:15:17
1075
原创 How to setting Ubuntu open files
Ubuntu修改open files数需4步:1、# vi /etc/security/limits.conf (最后新加)nofile 204800:wq2、# vi /etc/pam.d/susession required pam_limits.so (默认是注释掉的):wq3、# vi /etc/profileulim...
2018-07-18 14:09:01
563
原创 docker hub push 镜像
dockerhub push 镜像报错:denied: requested access to the resource is denied# docker push docker.io/szh1124/mediawiki-apb:v3.10The push refers to a repository [docker.io/szh1124/mediawiki-apb]a21152fe65...
2018-05-18 22:46:42
290
转载 How to install KVM on Ubuntu 16.04 LTS Headless Server
How to install KVM on Ubuntu 16.04 LTS Headless Server in Categories Linux KVM, Ubuntu Linux, Virtualization last updated February 9, 2018 Kernel-based Virtual Machine (KVM) is a virtualization modul
2018-05-08 20:42:30
527
原创 python 实现9宫格
#!/bin/env pythonimport itertoolscount=0lst = [p for p in itertools.permutations(range(1,10),3) if sum(p) == 15 ]print lstfor a0_0,a0_1,a0_2 in lst: for a1_0,a1_1,a1_2 in lst:
2017-11-26 21:06:45
3234
转载 hadoop中datanode节点不同的dfs.data.dir之间数据均衡问题
问题:集群中的存储数据增大,导致datanode的空间都快占满了(以前的dfs.data.dir=/data/hdfs/dfs/data),机器的硬盘监控程序不停的报警 。 给每台机器加了一倍的存储硬盘(新的dfs.data.dir=/data/hdfs/dfs/data,/data/hdfs/dfs/data2 新的硬盘挂载在/data/hdfs/dfs/da
2017-10-24 17:00:18
991
原创 hadoop HA +zookeeper +yarn
一、安装版本:JDK1.8.0_111-b14hadoophadoop-2.7.3zookeeperzookeeper-3.5.2二、安装步骤: JDK的安装和集群的依赖环境配置不再叙述https://my.oschina.net/u/2500254/blog/8061141、hadoop配置
2017-10-18 15:04:56
11776
原创 自动创建docker容器脚本
#!/bin/bash -xv#set -xHOST_NAME=$1HOST_IP=$2GATEWAY=172.27.0.1#ISO_PATH=/root/iso#VOLUME_PATH=/home/volume/$HOST_NAMEimage=4paradigm/centos:7.2if [[ $# != 2 ]];thenecho "use comm
2017-09-18 14:11:49
2208
原创 hadoop scheduler.capacity queues 配置
yarn.scheduler.capacity.maximum-applications 10000 Maximum number of applications that can be pending and running. yarn.scheduler.capacity.maximum-am-resource-
2017-09-12 19:56:40
520
原创 ssh别名访问远程服务
ssh一般访问远程服务器方式为ssh root@10.0.1.181 -p 36000如果想要ssh 181登陆,修改配置文件 vi ~/.ssh/configHost 181HostName 10.0.1.181User rootIdentitiesOnly yes
2017-09-07 16:25:57
513
原创 存储过程 游标嵌套
有一个需求,三张表,role表中找出管理员的role_id,resource表中找出sub_module=‘‘分组’’的source_id,如role_id为1,source_id为7 8 9,则在中间表dpm_common_role_resource中插入1 7,1 8,1 9.dpm_common_role表,( SELECT role_id FROM dpm_common_role
2017-07-29 14:32:53
487
转载 Hadoop Yarn Container 资源分配
在Hadoop2.0中, YARN负责管理MapReduce中的资源(内存, CPU等)并且将其打包成Container. 这样可以精简MapReduce, 使之专注于其擅长的数据处理任务, 将无需考虑资源调度. YARN会管理集群中所有机器的可用计算资源. 基于这些资源YARN会调度应用(比如MapReduce)发来的资源请求, 然后YARN会通过分配Container来给每个应用提供处理能
2017-07-27 11:42:40
7733
原创 web.xml is missing the currently displayed page contains invalid values
项目导进来在 packaging>warpackaging>显示web.xml is missing and is set to true点击deploment assembly显示the currently displayed page contains invalid values照着其他程序修改文件即可。.settings $ vi org.eclips
2017-07-14 14:07:10
376
转载 HDFS异常恢复调研报告
1 问题描述 HDFS在机器断电或意外崩溃的情况下,有可能出现正在写的数据(例如保存在DataNode内存的数据等)丢失的问题。再次重启HDFS后,发现hdfs无法启动,查看日志后发现,一直处于安全模式。 2 原因分析 出现前面提到的问题主要原因是客户端写入的数据没有及时保存到磁盘中,从而导致数据丢失;又因为数据块丢失达到一定的比率,导致hdfs启动进入安全模式。
2017-07-13 14:40:46
658
原创 Could not resolve dependencies for project . Could not find artifact
[ERROR] Failed to execute goal on projectintegration-arquillian-tests-sssd:Could not resolve dependencies for project org.keycloak.testsuite:integration-arquillian-tests-sssd:jar:3.3.0.CR1-SNAPSHO
2017-07-13 11:29:51
2397
原创 Shell常用语法归集
1、数学表达式:num=$[num+1]num=$((num+1))num=`expr $num+1`2、() 与{}()用户组合执行多个命令;{}用户组合执行多个命令;()多个命令在子Shell中执行;{}在当前Shell中执行;3、(()) 与$(())(())专用于数值计算;$(())直接获取数值计算结果;4、‘ 与 "‘号内
2017-05-18 00:48:30
348
原创 error KVM 桥接虚拟机不能使用
1、首先要正确配置桥接网络:[root@vhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp7s0f0#TYPE=EthernetDEVICE=enp7s0f0BOOTPROTO=static#UUID=8e9e9a12-1769-4200-a525-b229bae9a089ONBOOT=yesBRIDGE=br0NM_CO
2017-05-15 15:59:26
858
转载 Centos7 install KVM
Install KVM Hypervisor on CentOS 7.x and RHEL 7.xBy Pradeep Kumar | June 23, 2016KVM is an open source hardware virtualization software through which we can create and run multiple
2017-05-11 14:12:40
539
原创 centos 安装VNCSERVER
服务器安装图形化桌面:yum groupinstall "GNOME Desktop" "Graphical Administration Tools"ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.targetreboot安装vnc-server包:yum instal
2017-05-11 13:39:14
494
转载 wsgi-02
Remember, in Part 1 I asked you a question: “How do you run a Django application, Flask application, and Pyramid application under your freshly minted Web server without making a single change to th
2017-05-10 22:35:01
531
转载 wsgi-01
Out for a walk one day, a woman came across a construction site and saw three men working. She asked the first man, “What are you doing?” Annoyed by the question, the first man barked, “Can’t you see
2017-05-10 22:33:47
326
原创 多线程样例
#!/bin/env pythonimport threadingfrom time import sleep,ctimeloops = [4,2]def loop(nloop,nsec): print 'start loop', nloop, 'at:', ctime() sleep(nsec) print 'loop',nloop
2017-04-30 16:25:14
438
原创 CDH安装以及开启kerberos
首先感谢前任总结的一些经验,尤其是开启kerberos方面,看了好几篇文章才最终搞定,当然还有好基友同事的一起帮忙,首先说一下按照CDH官方网站上提供的文档,我没有搞定,可能是英文水平太差的原因。一、主机修改篇1、下载地址:http://archive.cloudera.com/cm5/cm/5/ CDHmanager下载cloudera-manager-centos7-cm5.7.5_
2017-04-05 20:01:19
5170
1
原创 三分钟搞定 git 使用
1、git安装yum install git2、git 配置git config --global user.email "you@example.com"git config --global user.name "Your Name"3、git clonegit clone git.XXXXX4、git 查看分支、创建分支、切换分支查看分支[root@pytest
2017-03-31 15:39:43
526
wso2 esb 服务编排
2015-02-15
WSO2 ESB 数据转换示例
2015-02-15
WSO2 ESB消息路由示例
2015-02-15
WSO2 ESB 协议转换示例(http to jms)
2014-12-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人