原创 kubernetes 集羣搭建
安裝主要分成3部分:etcd集羣、master節點和minions master 192.168.1.1 minion 192.168.1.2 master, minion: vim /etc/yum.repos.d/virt7
原创 容器時間與系統時間不一致的解決辦法
在DockerFile中添加: #調整系統時間 RUN ["rm", "-f", "/etc/localtime"] RUN ["ln", "-s", "/usr/share/zoneinfo/Asia/Shanghai", "/et
原创 python3.4-3.8幾個新特性
from enum import Enum from typing import List, Dict class Color(Enum): RED = 1 GREEN = 2 BLUE = 3 def gr
原创 influxdb 修改數據保留策略
查看現有策略 SHOW RETENTION POLICIES ON [庫名] > SHOW RETENTION POLICIES ON prometheus; name duration shardGroupDuration rep
原创 GPU監控
說明 NVIDIA Data Center GPU Manager (DCGM) 是一套用於在集羣環境中管理和監視Tesla™GPU的工具。可以集成到Prometheus監控方案中。 部署 從 https://developer.
原创 innobackupex 使用--tables-file報 xtrabackup: `mysql.user...` name is too long 錯誤
最近使用innobackupex這個備份工具,使用了--tables-file參數,原命令如下: /usr/bin/innobackupex --no-timestamp --user='xxx' --password='xxxx' -
原创 nginx + gunicorn + pypy + gevent 部署 web.py
nginx配置: server { listen 9010; server_name xxx.xxx.net; location / { proxy_pass http://127.0.0.
原创 mysql熱備工具xtrabackup與innobackupex的區別
xtrabackup可以在不加鎖的情況下備份innodb數據表,不過此工具不能操作myisam。 innobackupex是一個封裝了xtrabackup的腳本,能同時處理innodb和myisam,但在處理myisam時需要加一個讀鎖。
原创 vip綁定
ip addr add 10.10.25.71 dev eth0 ip addr del 10.10.25.71 dev eth0 查看 ip a
原创 linux下部署jenkins
下載jenkins: wge http://mirrors.jenkins.io/war-stable/latest/jenkins.war 啓動: nohup java -jar jenkins.war --httpPort=8000
原创 使用pypy提升python程序性能, 附下載地址
1.下載pypy二進制文件 2.下載get_pip.py 3.pypy/bin/pypy get_pip.py 安裝pip 4.pypy/bin/pip intall agileutil 安裝應用需要的依賴 5.添加環境變量 6.pypy
原创 php過濾輸入
function s($str){ $html_string = array("&", " ", "'", '"', "<", ">", "\t", "\r"); $html_clear = array("
原创 安裝rpm包提示如果安裝rpm包時提示"filename.rpm is not signed“
如果安裝rpm包時提示"filename.rpm is not signed",只需將/etc/yum.conf中"gpgcheck=1"這一行改爲"gpgcheck=0"即可。 點贊 收藏 分享 文
原创 AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 解決辦法
最近執行pip安裝包,pip install fire, 發現pip突然報錯如下:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'解決辦法:升級pip,easy_
原创 記錄rabbitmq一些特性
最近工作中又重新使用了rabbitmq這個消息隊列組件,由於距離之前使用相隔很久,很多特性有些記不清了。這裏記錄一下: 下面列出了rabbitmq幾個參數的含義: durable rabbitMQ默認將消息存儲在內存中,若rabbitMQ