2013/12/17

nagios install

 useradd nagios
 wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.2.tar.gz
 wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
 tar xfv nagios-4.0.2.tar.gz
 tar xvf nagios-plugins-1.5.tar.gz
 cd nagios-4.0.2
 ./configure --prefix=/usr/local/nagios
 make ; make all ; make install
 make install-init
 make install-config
 cd ../nagios-plugins-1.5
 ./configure --prefix=/usr/local/nagios && make all && make install

-- for nagios map --

yum install gd gd-devel

make clean
 ./configure --prefix=/usr/local/nagios --with-gd-lib=/usr/lib   --with-gd-inc=/usr/include
 ./configure --with-command-group=nagcmd
 make all; make install; make install-init; make install-config; make install-commandmode; make install-webconf 

-- for mail command --

yum install mailx


-- for perl --
yum -y install perl-Params-Validate perl-Math-Calc-Units perl-Regexp-Commonperl-Class-Accessor perl-Config-Tiny perl-Nagios-Plugin.noarch

2013/12/12

Convert a VMX to an OVF
ovftool f:/myvms/BigDemo.vmx x:/ovf/BigDemo.ovf


Convert a VMX to an OVA
ovftool vmxs/Nostalgia.vmx ovfs/Nostalgia.ova


Convert an OVF to a VMX
ovftool BigDemo.ovf x:/myvms/BigDemo.vmx

2013/12/11

send from Linux with file

yum -y install mutt mailx

echo "This is backup" | mutt -a "/backup/2013-12-11-10:59:09.tgz" -s "Master *** backup" --wtf@mail.mail

2013/12/03

bashrc







# .bashrc
export PS1='\[\033[01;32m\][`date +%T`]\[\033[01;31m\][\u@\h]\[\033[00m\] \w \$'

# User specific aliases and functions
alias ll='ls -lah'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ls='ls --color'
alias today="date '+%F week %u'"
alias bye='history -c;exit'
alias zhutf8='setenv LC_ALL zh_TW.utf8;setenv LANG zh_TW.utf8'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi