wget http://download.openvz.org/openvz.repo
yum install vzctl.x86_64 vzquota.x86_64
service vz start
chkconfig vz on
wget http://sourceforge.net/projects/webvz/files/webvz/webvz%202.0/webvz.2.0.tar.gz/download
yum install ruby-devel.x86_64 ruby-libs.x86_64 ruby-ri.x86_64 ruby.x86_64 ruby-irb.x86_64 ruby-docs.x86_64 ruby-tcltk.x86_64 ruby-rdoc.x86_64 ruby-mode.x86_64
tar zxvf webvz.2.0.tar.gz
cd webvz.2.0
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar zxvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb
gem install rails
gem install sqlite3-ruby
rake db:migrate
rake rails:update:application_controller
wget http://linux.carreira.com.pt/ovzutils/setx86_64-0.5.tar.gz
tar zxvf setx86_64-0.5.tar.gz
bash setx86_64
vim /opt/webvz-2.0/app/models/user.rb
vim /opt/webvz.2.0/app/views/user/_editForm.html.erb
vim /opt/webvz.2.0/app/views/user/_form.rhtml
vim /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
Beberapa hari yang lalu temen saya edi bilang kalau ada masalah dengan traffic local yang tidak seperti biasanya, akhirnya coba dicheck ternyata ada masalah dengan salah satu dns serverku, file acl.conf yg seharusnya berisikan ip iix ternyata kosong melompong, akibatnya tidak ada pembagian yang sesuai karena semuanya dianggap international.Jalankan script bikinanku yang kemarin ternyata ada error dan gagal mendownload list ip akibat file acl.conf nya direplace oleh file acl.conf yang baru dan kosong.
Memberikan mekanisme checking sebelum mendownload langsung terlintas dipikiranku tapi gimana caranya ? baca manual wget belum menemukan pencerahan , baca manual telnet dengan asumsi kalau bisa ditelnet maka linknya pasti benar tapi tetap belum menemukan pencerahan.Akhirnya googling dan menemukan perl script yang berfungsi untuk mengecheck link apakah link tersebut dalam keadaan ok atau broken.
Download perl script tersebut dari situs linklint , setelah mendownload langsung aku pindahkan ke /usr/bin/ dan update script baru , seperti dibawah ini :
[root@sulum dns-conf]# wget http://www.linklint.org/download/linklint-2.3.5.tar.gz
[root@sulum dns-conf]# tar zxvf linklint-2.3.5.tar.gz
[root@sulum dns-conf]# cd linklint-2.3.5
[root@sulum linklint-2.3.5]# mv linklint-2.3.5 /usr/bin/linklint
Kemudian update scriptku yang berfungsi mendownload ip iix
[root@sulum dns-conf]# vim download-iix.sh
#!/bin/bash
#Simple Script Update IIX
#created by crazynuxer
linklint http://mikrotik.co.id/getfile.php?nf=nice.rsc -silent > test 2>&1
cond=`cat test |grep ok |awk '{print $1}'`;
if [ "$cond" == "ok" ]; then
named="/var/named";
cd $named
wget http://mikrotik.co.id/getfile.php?nf=nice.rsc
test=`cat nice.rsc |grep address| awk '{print $3}' | sed -e 's/address="//' | sed -e 's/"//' |grep [0-9]/[0-9]`
echo "acl iix { " > acl.conf
for i in $test;
do
echo "$i;" >> acl.conf;
done
echo "};" >> acl.conf;
service named reload;
rm nice.rsc
else
echo "link error"
exit 0
fi
setelah kejadian ini kepikiran juga untuk menggandengkan alert dengan sms jika file acl.conf ku masalah atau downloadnya errornya , tinggal nanti coba digabungkan dengan nagios juga