go交叉编译

发表于 LINUX 分类,标签:
#!/usr/bin/env bashNAME=testOS=linuxARCH=amd64GOOS=${OS} GOARCH=${ARCH} go build -o ${NAME}_${OS}_${ARCH} ./${NAME}.goOS=linuxARCH=arm64GOOS=${OS} GOARCH=${ARCH} go build -o ${NAME}_${OS}_${ARCH} ./${NAME}.goOS=windowsARCH=amd64GOOS=${OS} GOARCH=${ARCH} go build -o ${NAME}_${OS}_...

kubectl sniff wireshark

发表于 LINUX 分类,标签:
cat /usr/local/binwireshark#!/usr/bin/env bashWIRESHARK="/Applications/Wireshark.app/Contents/MacOS/Wireshark"${WIRESHARK} "$@"exit $?sudo chmod +x /usr/local/bin/wiresharkhttps://zhuanlan.zhihu.com/p/526659456...

mac安装sshpass

发表于 LINUX 分类,标签:
curl -O -L  https://sourceforge.net/projects/sshpass/files/sshpass/1.09/sshpass-1.09.tar.gz && tar xvzf sshpass-1.06.tar.gzcd sshpass-1.06/./configuresudo make install...

CoreDNS添加自定义DNS解析记录

发表于 LINUX 分类,标签:
https://www.cnblogs.com/keithtt/p/13204497.htmlapiVersion: v1kind: ConfigMapmetadata:  name: coredns  namespace: kube-systemdata:  Corefile: |    .:53 {        errors        health      &nb...

升级指定内核版本

发表于 LINUX 分类,标签:
内核升级方法https://me.jinchuang.org/archives/539.html内核下载http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/INFO:taskblockedformorethan120secondshttps://www.cnblogs.com/yangliheng/p/5756615.html...

内核升级

发表于 LINUX 分类,标签:
uname-srrpm--importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.orgrpm-Uvhhttp://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpmyum--disablerepo="*"--enablerepo="elrepo-kernel"listavailableyum--enablerepo=elrepo-kernelinstallkernel-mlrebootuname-srvi/etc/default/grub修改GRUB_DEFAULT=0grub2-mkconfig-o/boot/grub2/grub.cfgreboothttps://me.jinchuang.org/archive...

debian:buster-slim基础镜像

发表于 LINUX 分类,标签:
deb http://mirrors.aliyun.com/debian/ buster main non-free contribdeb http://mirrors.aliyun.com/debian-security buster/updates maindeb http://mirrors.aliyun.com/debian/ buster-updates main non-free contribdeb http://mirrors.aliyun.com/debian/ buster-backports main non-free contribdeb-src http://m...

内核

发表于 LINUX 分类,标签:
sysctl net.ipv4.tcp_timestamps=0sysctlnet.ipv4.tcp_tw_recycle=0...

MaxCompute(ODPS)访问OSS--STS模式授权

发表于 LINUX 分类,标签:
同账号,用以下链接,一键授权需要注意的是,这里的关系是  MaxCompute通过这个角色(设置完之后就有权限了)去访问OSS,这里和AK没有半毛钱关系,所以这里不要去折腾AK,不要去折腾用户子账号,不要去折腾子账号和策略之类的关联关系。https://help.aliyun.com/document_detail/72777.html?spm=a2c4g.11186623.6.801.5a505fa3y766cV...

helm安装rabbitmq-找回密码

发表于 LINUX 分类,标签:
~/Desktophelminstallrabbitmq--test-frabbitmq.values.yamlstable/rabbitmq-nrabbitmq-testNAME:rabbitmq-testLASTDEPLOYED:ThuApr 112:59:262021NAMESPACE:rabbitmq-testSTATUS:deployedREVISION:1TESTSUITE:NoneNOTES:**Pleasebepatientwhilethechartisbeingdeployed**Credentials:  echo"Username   :rabbitmq-admin"  echo"...

安装kubectl客户端

发表于 LINUX 分类,标签:
考虑因为墙的原因,将以下版本整理收纳,下载之后放入path路径下,给予执行权限MacOS安装https://xyix.oss-cn-shenzhen.aliyuncs.com/public/kubectl/kubectl.Darwin-v1.20.5.zipLinux安装https://xyix.oss-cn-shenzhen.aliyuncs.com/public/kubectl/kubectl.Linux-v1.20.5.zipWindows安装https://xyix.oss-cn-shenzhen.aliyuncs.com/public/kubectl/kubectl.exe-v1.20.0.zip有条件的去官网下载https://kubernetes.io/docs/tasks/tools/...

go实现并发

发表于 LINUX 分类,标签:
packagemainimport("log""sync""time"//"github.com/gogf/gf/container/gpool")typepoolstruct{queuechanintwg  *sync.WaitGroup}funcNew(sizeint)*pool{ifsize<=0{size=1}return&pool{queue:make(chanint,size),wg:  &sync.WaitGroup{},}}func(p*pool)Add(deltaint){fori:=0;i<delta;i++{...

ingress-nginx 相关配置问题

发表于 LINUX 分类,标签:
kubectl get cm nginx-configuration -n kube-system -o yamlapiVersion: v1data:  allow-backend-server-header: "true"  enable-underscores-in-headers: "true"  generate-request-id: "true"  ignore-invalid-headers: "true"  log-format-upstream:&...

centos7 更新内核

发表于 LINUX 分类,标签:
脚本#!/bin/bashuname -runame -acat /etc/redhat-releaseyum -y updaterpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgyum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpmyum --disablerepo="*" --enablerepo="elrepo-kernel" list availableyum --enablerepo=elrepo-kernel&nb...

helm 安装rook-ceph

发表于 LINUX 分类,标签:
helm repo add rook-release https://charts.rook.io/releasekubectl create namespace rook-cephhelm install --namespace rook-ceph rook-ceph rook-release/rook-cephgit clone --single-branch --branch v1.5.4 https://github.com/rook/rook.gitcd rook/cluster/examples/kubernetes/cephkubectl create -...