原创 linux atop

# centos 7 yum install kernel-devel zlib-devel wget http://www.atoptool.nl/download/netatop-3.1.tar.gz tar xf netatop-3

原创 MySQL Innodb鎖

排它鎖 客戶端都使用排他鎖,則後者不能看到數據也不能修改 實現:for update 共享鎖 c1上了共享鎖,c2可以看到數據,但是不能修改; 若c1做update操作,c2使用lock in share mode,則c2

原创 證書術語

TLS:傳輸層安全協議 Transport Layer Security的縮寫 SSL:安全套接字層 Secure Socket Layer的縮寫 KEY 通常指私鑰。 CSR 是Certificate Signing Request

原创 minio 搭建

# centos 7 apt install wget # root cd ~ wget http://dl.minio.org.cn/server/minio/release/linux-amd64/minio wget https://

原创 python udp組播

# 發送組播 import socket import struct import time mcast_group_ip = '234.2.2.2' mcast_group_port = 23456 def sender():

原创 go包引用

環境:ubuntu 16.04 # 下載go安裝包,解壓後放入 /usr/local/go # ~/.profile # export PATH=$PATH:/usr/local/go/bin # export GO111MODULE

原创 python udp廣播

# 接收廣播 from time import sleep from socket import * s = socket(AF_INET, SOCK_DGRAM) s.setsockopt(SOL_SOCKET, SO_BROADCAS

原创 python方法超時限制

import time import functools from concurrent import futures # 方法裝飾器 executor = futures.ThreadPoolExecutor(1) def time

原创 rsync daemon模式

# centos 7 # server 192.168.1.1 # client 192.168.1.2 # server yum install rsync systemctl stop firewalld # /etc/rsy

原创 Shell啓動類型

Shell 被分爲兩個類型 login / non-login interactive / non-interactive Shell 組合起來看有四種類型 login + interactive # SSH 登

原创 git分支創建

# 創建倉庫 git init --bare xxx.git # 創建master git clone xxx.git cd xxx touch 1 git add 1 git commit -m 'init' git push orig

原创 gitlab查詢公鑰被哪個用戶使用

查看 /var/opt/gitlab/.ssh/authorized_keys,找到公鑰的key_id command="/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell

原创 python pickle存取對象

import pickle class A(object): task = '123' def __init__(self, name): self.name = name def greet

原创 nexus3搭建

環境 CPU:2核 OS:Centos6.7 MEM:4096M 搭建 下載 nexus-3.26.0-04-unix.tar.gz 安裝JDK,yum install java-1.8.0-ope

原创 python inotify

# pip install inotify import os import time import inotify.adapters import inotify.constants as Mask def _main():