• Smartctl: Device Read Identity Failed

    /usr/sbin/smartctl –all /dev/sda -d ata smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce AllenHome page is http://smartmontools.sourceforge.net/Smartctl: Device Read Identity Failed (not an ATA/ATAPI device) A mandatory SMART command failed: exiting. To continue, ...

    作者:2hei | 分类:linux | 阅读:1,327 views
    Smartctl: Device Read Identity Failed已关闭评论
  • linux 入侵监测工具 chkrootkit

    wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz compile:make sensegcc -DHAVE_LASTLOG_H -o chklastlog chklastlog.cgcc -DHAVE_LASTLOG_H -o chkwtmp chkwtmp.cchkwtmp.c: In function ?.ain?.chkwtmp.c:95: warning: incompatible implicit declaration of built-in function ?.xit?gcc -DHAVE_LASTL ...

    作者:2hei | 分类:OpenSource | 阅读:1,056 views | 标签:
    linux 入侵监测工具 chkrootkit已关闭评论
  • Set Default Value on Shell

    #!/bin/sh# v_test.sh# by 2hei.net  06/22/2011##get param from command linefisr_param=$1second_param=$2 #set default value when nullfisr_param=${fisr_param:=”First”} second_param=${second_param:=”Second”} #print valuesprintf “fisr_param:\t”$fisr_param̶ ...

    作者:2hei | 分类:shell | 阅读:1,633 views | 标签:
    Set Default Value on Shell已关闭评论
  • ATA bus error SError: { PHYRdyChg DevExch }

    ATA bus error in /var/log/messages: SCSI device sdb: 490350672 512-byte hdwr sectors (251060 MB) sdb: Write Protect is off sdb: Mode Sense: 00 3a 00 00 SCSI device sdb: drive cache: write back ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen ata1.00: irq_stat 0x00400040, ...

    作者:2hei | 分类:linux | 阅读:3,036 views | 标签:
    ATA bus error SError: { PHYRdyChg DevExch }已关闭评论
  • linux 环境变量中配置参数 use function but not use alias

    例子:使用两个参数匹配域名,其他部分自动补齐,减少键盘输入,然后ssh登陆到目的主机。 cat .bashrc  # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # update the PATH export PATH=${PATH}:/usr/sbin:/sbin sss() {   ssh $1.$2.2hei.net } use: $sss t ...

    作者:2hei | 分类:linux | 阅读:1,032 views | 标签:
    linux 环境变量中配置参数 use function but not use alias已关闭评论
  • openvpn vnc java firefox on centos5

    1. yum install openvpnwget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpmyum install epel-release-5-4.noarch.rpmyum intall openvpn vnp configs: 2hei.net.ovpn add:–script-security 2up “/etc/openvpn/update-resolv-conf up”down “/etc/openvpn/upd ...

    作者:2hei | 分类:linux, OpenSource | 阅读:1,182 views | 标签:, , ,
    openvpn vnc java firefox on centos5已关闭评论
  • bonding in linux

    ####### bond0 #######dond0 use dhcp$cat ifcfg-bond0DEVICE=bond0BOOTPROTO=dhcpONBOOT=yes $cat ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=noneUSERCTL=noMASTER=bond0SLAVE=yes DEVICE=eth1ONBOOT=yesBOOTPROTO=noneUSERCTL=noMASTER=bond0SLAVE=yes ####### bond1 #######$cat ifcfg-bond1DEVICE=bond1BOOTPROTO= ...

    作者:2hei | 分类:linux | 阅读:996 views | 标签:
    bonding in linux已关闭评论
  • useful python modules zz

    mark zz from http://bbs.chinaunix.net/viewthread.php?tid=1855562 :Graphical interface wxPython http://wxpython.org    Graphical interface pyGtk http://www.pygtk.org    Graphical interface pyQT http://www.riverbankcomputing.co.uk/pyqt/    Graphical interface Pmw http ...

    作者:2hei | 分类:python | 阅读:1,430 views | 标签:
    useful python modules zz已关闭评论
  • sftp get “Connection closed”

    Some users experience “Connection closed” messages when attempting to use sftp, scp, svn+ssh or other ssh tunneled services if their profile contains errors. use ssh+key can log to the server, but scp and sftp just return a “Connection closed” $sftp -v 2hei.net Connecti ...

    作者:2hei | 分类:OpenSource | 阅读:2,133 views
  • compile pyhton2.7 with zlib

    ensure you have installed zlib on your OS. [2hei.net]# rpm -qa|grep zlib zlib-1.2.3-3 zlib-devel-1.2.3-3 use source code to compile python2.7: ./configure –enable-shared && make && make install If you still have this issue: python: error while loading shared libraries: li ...

    作者:2hei | 分类:python | 阅读:1,267 views | 标签:,
    compile pyhton2.7 with zlib已关闭评论
  • eventfd() failed when start nginx

    yum install nginxservice nginx start error.log:2011/01/07 05:39:49 [emerg] 7180#0: eventfd() failed (38: Function not implemented)2011/01/07 05:39:49 [alert] 7179#0: worker process 7180 exited with fatal code 2 and can not be respawn2011/01/07 05:43:01 [emerg] 7296#0: eventfd() failed (38: Funct ...

    作者:2hei | 分类:nginx, OpenSource | 阅读:1,285 views | 标签:
    eventfd() failed when start nginx已关闭评论
  • postgresql learning notes

    1.Host Access file:/var/lib/pgsql/data/pg_hba.confhost    all         all        md5 2.logon postgresqlsu – postgres$psqlor $psql -U postg ...

    作者:2hei | 分类:database | 阅读:1,072 views | 标签:
    postgresql learning notes已关闭评论
  • DJANGO FORMS:This field is required

    when meet This field is required at django forms, we can add “required=False” at Fields. from django import forms class ContactForm(forms.Form):    subject = forms.CharField(max_length=100)    message = forms.CharField()    sender = forms. ...

    作者:2hei | 分类:python | 阅读:1,282 views | 标签:
    DJANGO FORMS:This field is required已关闭评论
  • nginx dynamic url rewrite — II

    nginx rewirte II, nginx if has no AND OR and nest,so we only can use regx to do it: ———————————- BEGIN—————————————– location /music/search.html ...

    作者:2hei | 分类:nginx, OpenSource | 阅读:1,038 views | 标签:
    nginx dynamic url rewrite — II已关闭评论
  • ibevent-1.1a.so.1 depend memcached CentOS5.5

    update to centos5.5, memcached has issue: resent failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y install memcached’ returned 1: memcached-1.2.6-1.el5.rf.x86_64 from EPEL-base has depsolving problems   –> Missing Dependency: libevent-1.1a.so.1()(64bit) is needed by ...

    作者:2hei | 分类:OpenSource | 阅读:906 views | 标签:
    ibevent-1.1a.so.1 depend memcached CentOS5.5已关闭评论
  • solved: Fatal error: Allowed memory size of 33554432 bytes exhausted

    wordpress2.8wp-settings.phpchange define(‘WP_MEMORY_LIMIT’, ’32M’);to:define(‘WP_MEMORY_LIMIT’, ’64M’); wordpress3.0 wp-config.php/** Database Charset to use in creating database tables. */define(‘DB_CHARSET’, ‘utf8’); /** T ...

    作者:2hei | 分类:OpenSource | 阅读:882 views | 标签:
    solved: Fatal error: Allowed memory size of 33554432 bytes exhausted已关闭评论
  • change linux swap size

    cat /proc/swaps
    free -m
    dd if=/dev/zero of=swapfile bs=1M count=8192
    swapoff -a
    mkswap swapfile
    swapon swapfile
    cat /etc/fstab
    /usr/swapfile swap    swap    defaults        0       0
    作者:2hei | 分类:linux | 阅读:1,439 views
    change linux swap size已关闭评论
  • use openvpn client in ubuntu

    #install openvpn and resovconf$sudo apt-get install openvpn $sudo apt-get install resovconf $sudo cat client.conf.mytestclient;dev tapdev tun;dev-node MyTapproto tcp;proto udpremote your-vpn-domain 1001remote your-vpn-domain 1002remote-randomresolv-retry infinitenobind;user nobody;group nogroupp ...

    作者:2hei | 分类:OpenSource | 阅读:964 views
    use openvpn client in ubuntu已关闭评论
  • a script of awk array – just mark

    Just mark it. 🙂 #!/bin/shawk -F”_t_7_Y_” ‘{if($1==1) {printf $2; for(i=3;i<=NF;i++) if(i==NF) print $i;else printf $i}}’ temp1  > 1.txtawk -F”_t_7_Y_” ‘{if($1==2) if($2 in S22){S22[$2]=$2;S23[$2]=$3″ “S23[$2];N2[$2]++}else {S22[$2] ...

    作者:2hei | 分类:shell | 阅读:862 views | 标签:
    a script of awk array – just mark已关闭评论