原创 在docker容器內部使用docker build

docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker centos:7 /bin/bash 使

原创 shell字符串替換命令

替換文件中的字符串 sed -i "s/oldstring/newstring/g" `grep oldstring -rl /tmp/mydir` shell腳本中替換字符串 #!/bin/bash str='hello olds

原创 python解析truelicense

from truepy import License import string import xml.dom.minidom as xmldom import os import xml.etree.ElementTree as ET

原创 calico報錯: Calico node 'node1' is already using the IPv4 address

使用k8s的過程中,發現一臺曾經安裝過harbor(後來清理掉了)的服務器的calico組件一直報錯: 2020-03-19 07:11:07.934 [INFO][11] startup.go 572: Using autodetec

原创 /bin/bash: po-crdgen: command not found

編譯coreos/prometheus-operator過程中報錯: /bin/bash: po-crdgen: command not found   解決方法,執行: cp $GOPATH/bin/po-crdgen /usr/bin

原创 構造nginx docker鏡像

首先在宿主機安裝nginx yum install gcc-c++ pcre pcre-devel  zlib zlib-devel  openssl openssl--devel   -y wget http://nginx.org/

原创 linux標準出錯重定向

https://blog.csdn.net/liucy007/article/details/90207830  

原创 kibana編譯

1. 構造nodejs環境 wget https://nodejs.org/dist/v10.15.2/node-v10.15.2-linux-amd64.tar.xz xz -d node-v10.15.2-linux-amd64.t

原创 bower install安裝時報錯ENOTFOUND Package abdmob/x2js=abdmob/x2js not found

bower install安裝時報錯: ENOTFOUND Package abdmob/x2js=abdmob/x2js not found 打開ember-cli-build.js,查找: app.import('bower_comp

原创 使用curl發送rancher請求

  登錄 curl -v -c cookie.info -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"admin","des

原创 過濾ip端口的python腳本

#!/usr/bin/env python #coding=utf-8 import sys reload(sys) sys.setdefaultencoding('utf-8') import re if __name__

原创 HUE的docker鏡像構建

編寫腳本: wget https://github.com/cloudera/hue/archive/release-4.6.0.zip unzip release-4.6.0.zip cat > hue-release-4.6.0/D

原创 centos編譯報錯/usr/bin/ld: cannot find -lstdc++

報錯: /usr/bin/ld: cannot find -lstdc++ 執行: yum install libstdc++-static  

原创 npm install過程中,解決fsevents報錯

npm install的過程中報錯: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux

原创 kibana日誌保存kibana 7.3.2 [_xpack], must not start with '_'., with { index_uuid=\"_na_\"

kibana使用了xpack插件,而es沒有使用,會保錯 "tags":["license","warning","xpack"],"pid":6,"message":"License information from the X-Pa