smb.conf
[global]
workgroup = MYGROUP
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
security = share
unix charset = utf8
display charset = utf8
dos charset = cp950
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65535 SO_SNDBUF=65535
syslog = 1
syslog only = yes
strict sync = no
sync always = no
log level = 1
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
dead time = 15
getwd cache = yes
lpq = 30
large readwrite = no
[123]
path = /mnt/123
public = yes
writable = yes
2011年5月25日 星期三
VMware dep. NAT
nat.conf
# Linux NAT configuration file
[host]
# NAT gateway address
ip = 172.16.12.2
netmask = 255.255.255.0
# VMnet device if not specified on command line
device = /dev/vmnet8
# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = 1
# Allows the source to have any OUI. Turn this one if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1
[udp]
# Timeout in seconds, 0 = no timeout, default = 60; real value might
# be up to 100% longer
timeout = 60
[incomingudp]
[incomingtcp]
10000 = 172.16.12.10:80
10001 = 172.16.12.11:80
10002 = 172.16.12.12:80
10003 = 172.16.12.13:80
10004 = 172.16.12.14:80
10005 = 172.16.12.15:80
10006 = 172.16.12.16:80
10007 = 172.16.12.17:80
20000 = 172.16.12.10:22
20001 = 172.16.12.11:22
20002 = 172.16.12.12:22
20003 = 172.16.12.13:22
20004 = 172.16.12.14:22
20005 = 172.16.12.15:22
20006 = 172.16.12.16:22
20007 = 172.16.12.17:22
then
/usr/bin/vmware-networks --stop
/usr/bin/vmware-networks --start
# Linux NAT configuration file
[host]
# NAT gateway address
ip = 172.16.12.2
netmask = 255.255.255.0
# VMnet device if not specified on command line
device = /dev/vmnet8
# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = 1
# Allows the source to have any OUI. Turn this one if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1
[udp]
# Timeout in seconds, 0 = no timeout, default = 60; real value might
# be up to 100% longer
timeout = 60
[incomingudp]
[incomingtcp]
10000 = 172.16.12.10:80
10001 = 172.16.12.11:80
10002 = 172.16.12.12:80
10003 = 172.16.12.13:80
10004 = 172.16.12.14:80
10005 = 172.16.12.15:80
10006 = 172.16.12.16:80
10007 = 172.16.12.17:80
20000 = 172.16.12.10:22
20001 = 172.16.12.11:22
20002 = 172.16.12.12:22
20003 = 172.16.12.13:22
20004 = 172.16.12.14:22
20005 = 172.16.12.15:22
20006 = 172.16.12.16:22
20007 = 172.16.12.17:22
then
/usr/bin/vmware-networks --stop
/usr/bin/vmware-networks --start
2011年5月18日 星期三
News for javascript and postgreSQL
JAVASCRIPT testing tool
http://www.swift-lizard.com/2009/11/24/test-driven-development-with-jquery-qunit/
PostgreSQL pgpool-II
http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#reference
http://www.swift-lizard.com/2009/11/24/test-driven-development-with-jquery-qunit/
PostgreSQL pgpool-II
http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#reference
2011年5月10日 星期二
Para-vir. installation tips
For para-vir. guest HTTP source req.
Install httpd server yum -y install httpd create a directory to mount your iso mkdir /var/www/html/pub mount -o loop /path-to-your-iso-image /var/www/html/pub turn off SELinux & Firewall setenforce 0 iptables -F service httpd start You should now be ready to install your Vm from http://<ip of dom0>/pub
XEN on CentOS Install
以下手動....
yum install -y xen virt-manager kernel-xen ipvsadm
chkconfig xend on
vim /boot/grub/grub.conf
default=0
reboot
....................
echo "Copying VMs"
for i in `seq 33 1 43`
do
echo "172.108.$i.2 NAT setting..."
ssh -l root 172.108.$i.2 "scp root@172.108.31.2:/var/lib/xen/images/*.img /var/lib/xen/images &"
ssh -l root 172.108.$i.2 "scp root@172.108.31.2:/etc/xen/ATC* /etc/xen &"
done
scp root@172.108.31.2:/var/lib/xen/images/*.img /var/lib/xen/images
scp root@172.108.31.2:/etc/xen/ATC* /etc/xen
XEN NAT
echo "Start Setting up NAT"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 NAT setting..."
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10000 -s rr | ipvsadm -a -t 172.108.$i.2:10000 -r 192.168.122.5:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10001 -s rr | ipvsadm -a -t 172.108.$i.2:10001 -r 192.168.122.6:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10002 -s rr | ipvsadm -a -t 172.108.$i.2:10002 -r 192.168.122.7:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10003 -s rr | ipvsadm -a -t 172.108.$i.2:10003 -r 192.168.122.8:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10004 -s rr | ipvsadm -a -t 172.108.$i.2:10004 -r 192.168.122.9:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10005 -s rr | ipvsadm -a -t 172.108.$i.2:10005 -r 192.168.122.10:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10006 -s rr | ipvsadm -a -t 172.108.$i.2:10006 -r 192.168.122.11:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10007 -s rr | ipvsadm -a -t 172.108.$i.2:10007 -r 192.168.122.12:80 -m"
done
xm COMMAND
echo "Start All Xen VMs"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 starting..."
ssh -l root 172.108.$i.2 "xm create ATC0 | xm create ATC1 | xm create ATC2 | xm create ATC3 | xm create ATC4 | xm create ATC5 | xm create ATC6 | xm create ATC7 &"
done
echo "Stop All Xen VMs"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 stoping..."
ssh -l root 172.108.$i.2 "xm shutdown ATC0 | xm shutdown ATC1 | xm shutdown ATC2 | xm shutdown ATC3 | xm shutdown ATC4 | xm shutdown ATC5 | xm shutdown ATC6 | xm shutdown ATC7 &"
done
Test CGIs
http://172.108.31.2:10001/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10002/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10003/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10004/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10005/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10006/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10007/cgi-bin/testcgi.cgi?action=node_status
yum install -y xen virt-manager kernel-xen ipvsadm
chkconfig xend on
vim /boot/grub/grub.conf
default=0
reboot
....................
echo "Copying VMs"
for i in `seq 33 1 43`
do
echo "172.108.$i.2 NAT setting..."
ssh -l root 172.108.$i.2 "scp root@172.108.31.2:/var/lib/xen/images/*.img /var/lib/xen/images &"
ssh -l root 172.108.$i.2 "scp root@172.108.31.2:/etc/xen/ATC* /etc/xen &"
done
scp root@172.108.31.2:/var/lib/xen/images/*.img /var/lib/xen/images
scp root@172.108.31.2:/etc/xen/ATC* /etc/xen
XEN NAT
echo "Start Setting up NAT"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 NAT setting..."
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10000 -s rr | ipvsadm -a -t 172.108.$i.2:10000 -r 192.168.122.5:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10001 -s rr | ipvsadm -a -t 172.108.$i.2:10001 -r 192.168.122.6:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10002 -s rr | ipvsadm -a -t 172.108.$i.2:10002 -r 192.168.122.7:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10003 -s rr | ipvsadm -a -t 172.108.$i.2:10003 -r 192.168.122.8:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10004 -s rr | ipvsadm -a -t 172.108.$i.2:10004 -r 192.168.122.9:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10005 -s rr | ipvsadm -a -t 172.108.$i.2:10005 -r 192.168.122.10:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10006 -s rr | ipvsadm -a -t 172.108.$i.2:10006 -r 192.168.122.11:80 -m"
ssh -l root 172.108.$i.2 "ipvsadm -A -t 172.108.$i.2:10007 -s rr | ipvsadm -a -t 172.108.$i.2:10007 -r 192.168.122.12:80 -m"
done
xm COMMAND
echo "Start All Xen VMs"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 starting..."
ssh -l root 172.108.$i.2 "xm create ATC0 | xm create ATC1 | xm create ATC2 | xm create ATC3 | xm create ATC4 | xm create ATC5 | xm create ATC6 | xm create ATC7 &"
done
echo "Stop All Xen VMs"
for i in `seq 31 1 43`
do
echo "172.108.$i.2 stoping..."
ssh -l root 172.108.$i.2 "xm shutdown ATC0 | xm shutdown ATC1 | xm shutdown ATC2 | xm shutdown ATC3 | xm shutdown ATC4 | xm shutdown ATC5 | xm shutdown ATC6 | xm shutdown ATC7 &"
done
Test CGIs
http://172.108.31.2:10001/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10002/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10003/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10004/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10005/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10006/cgi-bin/testcgi.cgi?action=node_status
http://172.108.31.2:10007/cgi-bin/testcgi.cgi?action=node_status
2011年5月5日 星期四
Apache~ GZIP 啟動
安裝 mod_deflate
修改 C:/AppServ/Apache2.2/conf/httpd.conf 添加
#LoadModule deflate_module modules/mod_deflate.so
去掉前面的 #
LoadModule deflate_module modules/mod_deflate.so
在底下添加:
存檔,重新啟動 Apache
修改 C:/AppServ/Apache2.2/conf/httpd.conf 添加
#LoadModule deflate_module modules/mod_deflate.so
去掉前面的 #
LoadModule deflate_module modules/mod_deflate.so
在底下添加:
<ifmodule mod_deflate.c> DeflateCompressionLevel 9 AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php AddOutputFilter DEFLATE js css </ifmodule>
訂閱:
文章 (Atom)