原创 python利用wmi模塊統計windows下cpu信息
# -*- coding: utf-8 -*- #import ######################################################################## import o
原创 linux下python安裝pymssql模塊
安裝pymssql需要的包:freetds(http://www.filewatcher.com/m/freetds-0.82.tar.gz.1596755-0.html)setuptools(https://pypi.python.org
原创 /usr/bin/ld: cannot find -lmysqlclient_r
在服務器安裝安裝mysql-python,會提示如下錯誤信息:/usr/bin/ld: cannot find -lmysqlclient_r collect2: ld returned 1 exit status error: c
原创 Updating power_state in the DB to match the hypervisor
報錯信息如下:2017-10-02 22:42:02.944 80378 INFO nova.compute.manager [req-347dcc06-13cb-4ced-a10d-b21bf4427430 - - - - -] [ins
原创 Python學習路線(針對具備一定編程經驗者)
相比C,C++,JAVA等編程語言,Python是易學的。但要想深入地理解Python,並熟練地編寫Python風格的Python代碼。我想還是有一長段路程要走的。下面即是我的一點經驗總結,主要是爲了整理自己學習的思路。花1-2天的時間閱讀
原创 centos系統下安裝vim包
如果在我們在使用系統命令的時候 發現vim無法使用,請用yum安裝下面vim包:#yum -y install vim-enhanced
原创 python利用pymssql連接SQL
首先需要安裝pymssql模塊(http://linuxshow.blog.51cto.com/1572053/1407255)配置下freetds#cat /usr/local/freetds/etc/freetds.conf# $I
原创 我的友情鏈接
51CTO博客開發學習要永恆清哥ALLEN_YNAGsnow
原创 查詢mysql表是否被損壞和修復、優化
查詢mysql表是否被損壞命令,如下:# CHECK TABLE 表名mysql的長期使用,肯定會出現一些問題,一般情況下mysql表無法訪問,就可以修復表了,優化時減少磁盤佔用空間。方便備份。表修復和優化命令,如下:#REPAIR TAB
原创 python 發送html郵件
簡單的python發送html郵件代碼,如下:#!/usr/bin/env python #-*- coding:utf-8 -*- import smtplib from email.header import Header from e
原创 nginx 500 error
nginx服務器頻繁報“500 Internal Server Error”錯誤,是由於服務器上文炳數設置太小, 設置方法如下: 1>. /etc/security/limits.conf文件,最後加上兩句 * soft nofile 6
原创 Puppet nginx+Mongrel安裝配置篇
建立一個epel源Vim /etc/yum.repos.d/local.repo配置[epel]name=Red Hat Enterprise Linux $releasever - $basearch - epelbaseurl=htt
原创 Linux下源碼安裝mysql
1. mysql高版本之後,利用cmake進行編譯安裝2. yum安裝cmake#yum -y install cmake3.下載mysql源碼包#wget http://mirrors.sohu.com/mysql/MySQL-5.5/m
原创 salt源碼安裝
安裝需求:python >=2.6 <3.0zeromq >=2.1.9pyzmp >=2.1.9pycryptomsgpack-pythonyamljinja21. yum源設置#vim /etc/yum.repos.d/epel.rep
原创 Puppet 源碼安裝篇
puppet 需要預先安裝一些軟件包(master和client都得安裝)#yum install ruby ruby-libs ruby-shadowpuppet 源碼包安裝1.Master端安裝facter#wget http://pu