Archive for the ‘Linux How to’ Category

mount iso on solaris

Posted: 30th July 2010 by admin in Linux How to

two command #lofiadm -a /root/my.iso /dev/iso01 #mount -F hsfs -o ro /dev/iso01 /mnt one command #mount -F hsfs -o ro `lofiadm -a /root/my.iso` /mnt

zfs basic command

Posted: 30th July 2010 by admin in Linux How to

# zpool create mypool /dev/dsk/c0t0d0 # zfs list # zfs mount mypool # zfs unmount mypool # zfs create mypool/test # zfs destroy mypool/test # zfs rename mypool/test mypool/test2 # zfs set canmount=off mypool # zfs set mountpoint=/home mypool # zfs set compression=on mypool # zfs set atime=off mypool # zfs set quota=1G mypool/test

bash: rsync: command not found

Posted: 29th July 2010 by admin in Linux How to

bash: rsync: command not found fix by add –rsync-path=PATH

configure: error: C compiler cannot create executables install SUNWarc from dvd for fix it

Install and config Java on gentoo linux

Posted: 6th July 2010 by admin in Linux How to

Install JDK # emerge virtual/jdk Config JVM # java-config –list-available-vms # java-config –set-system-vm ???

การเปิด timestamp จะทำให้ต้องเพิ่ม ‏ 12bytes ไว้ที่ TCP header ครับ Linux เปิด : echo 1 >/proc/sys/net/ipv4/tcp_timestamps ปิด : echo 0 >/proc/sys/net/ipv4/tcp_timestamps *BSD เปิด : sysctl -w TCPCTL_DO_RFC1323=true ปิด : sysctl -w TCPCTL_DO_RFC1323=false หรือ เปิด : sysctl -w net.inet.tcp.rfc1323=true ปิด : sysctl -w net.inet.tcp.rfc1323=false

การแก้ไข default gateway

Posted: 25th May 2009 by admin in Linux How to
Tags:

[root@demo01 ~]#route del default [root@demo01 ~]#route add default gw xxx.xxx.xxx.xxx <<เปลี่ยนเป็น ip gateway

ปัญหาเกิดจากเมื่อใช้ squid ทำ reverse proxy แล้ว ip ใน log ของ apache กลายเป็น ip ของเครื่องเรา มาแก้ปัญหากันเลย [root@demo01 ~]#wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz [root@demo01 ~]#tar -xvzf mod_rpaf-0.6.tar.gz [root@demo01 ~]#cd mod_rpaf-0.6 [root@demo01 ~]#apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c นำข้อความด้านล่างไปใส่ใน httpd.conf แล้วจัดการเซฟ LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so #Reverse proxy RPAFenable On RPAFsethostname On RPAFproxy_ips 127.0.0.1 xxx.xxx.xxx.xxx <– เปลี่ยนเป็นไอพีเครื่องเราเช่น 122.155.3.59 RPAFheader X-Forwarded-For สั่ง restart apache [...]

การ backup/restore OpenLdap (BerkleyDB)

Posted: 25th May 2009 by admin in Linux How to
Tags:

Backup: [root@demo01]#slapcat > backup.ldif Restore: [root@demo01]#slapadd < backup.ldif