2012年1月29日 星期日

2012年1月28日 星期六

2012年1月27日 星期五

Light weight Linux

Reference: http://www.tuxradar.com/content/whats-best-lightweight-linux-distro

1. ttylinux
2. tinycore

Linux download 總覽

http://distro.ibiblio.org/

PXE Server 架設基礎篇


PXE Server 架設基礎篇
需求說明:免外接儲存媒體進行系統維護或者安裝,一般可用於 Linux 系統安裝/記
憶體測試/ghost/無硬碟式系統等等….

Server 系統需求:Linux server 啟動 DHCPD/TFTPD
Client 系統需求:網路卡支援 PXE 功能即可

Server 端 DHCPD 設置
[root@centos ~]# more /etc/dhcpd.conf
ddns-update-style               none;
allow bootp;
allow booting;
option ip-forwarding    false;  # No IP forwarding
option mask-supplier    false;  # Don't respond to ICMP Mask req
default-lease-time              259200;
max-lease-time                  518400;
option broadcast-address        192.168.0.255;
subnet 192.168.0.0 netmask 255.255.255.0{
  range 192.168.0.51 192.168.0.100;
  option root-path     "192.168.0.201:/opt/ltsp/i386"; #這是給 ltsp 用的
  option subnet-mask   255.255.255.0;
     #host Precision390 {
     #   hardware ethernet    00:40:95:30:43:B4;
     #   fixed-address        192.168.0.55;
     #}
  next-server 192.168.0.201;      #到這台 server 要 tftpd 服務
  filename "/pxelinux.0";      #PXE boot loader
}

設定 DHCP 服務介面 (多於一張網卡時可用)
[root@centos ~]# more /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS=eth0
DHCP 開機服務調整
查詢[root@centos ~]# chkconfig --list dhcpd
啟用[root@centos ~]# chkconfig --level 345 dhcpd on
關閉[root@centos ~]# chkconfig --level 345 dhcpd off

建立 auto run service on Windows

使用 SrvAny 或 firedaemon

使用PXE 在 WINDOWS 安裝 Linux


這編是引導大家使用WINDOWS 設置 PXE SERVER 來安裝 網絡內其他電腦安裝 Ubuntu(Linux)

1. 第一步到以下網址安載 Tftpd32
http://tftpd32.jounin.net/
下載後直接安排即可

2. 我們先建立一個資料夾,如 C:\PXE
然後從C:\Program Files\Tftpd32\Tftpd32.exe 複制到 C:\PXE

3. 到以下位置下載 netboot.tar.gz
http://archive.ubuntu.com/ubuntu/dists/
e.g. : http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/alpha-5/images/netboot/
jaunty 為 9.04 版

4. 然後解壓到C:\PXE
5. C:\PXE\Ubuntu-installer\i386 下的 linux, pxelinux.0, pxelinux.cfg 複制到 C:\PXE
6. 執行 C:\PXE\Tftpd32.exe
7. 進入 setting -> choice "PXE Compatiliby" and "Allow / As Virtual Root" -> OK -> 重新開啟程式
8. 進入程式後轉去 DHCP Server
IP Address : 192.168.1.100
Size of pool : 30
Boot file : pxelinux.0
DNS : 192.168.1.1
Mask : 255.255.255.0
然後儲存"Save"

這樣就完成, 從其他電腦用PXE 即開機即可!

Ubuntu各版本主要差異

http://wiki.ubuntu-tw.org/index.php?title=Ubuntu各版本主要差異

2012年1月20日 星期五

一些 js

Node.js -> server js
Zombie.js -> client test js
jQuery
Unserscore.js
Wows.js
MooTool
CoffeeScript
sizzle

VirtualBox auto start on Windows

在 Windows 的 auto startup script 中加上
"C:\Program Files\Sun\xVM VirtualBox"
vboxmanage startvm "ubuntu-server"

2012年1月19日 星期四

VirtualBox install guest additions

sudo apt-get install dkms
sudo apt-get update
sudo apt-get upgrade
sudo sh ./VBoxLinuxAdditions.run

Ubuntu static IP 網路設定

1, 移除 NetworkManager
sudo apt-get remove network-manager

Ubuntu NetworkManager會寫入 /etc/NetworkManager/system-connections/ 與 resolv.conf 目錄中
2. 修改
/etc/network/interfaces
auto eth0
iface eth0 inet static
       address 192.168.1.99
       netmask 255.255.255.0
       gateway 192.168.1.1
       dns-nameservers 68.100.16.25 68.100.16.30  68.105.28.12
       dns-search cox.net

3. 修改 resolv.conf
 # Generated by NetworkManager
domain cox.net
search cox.net
nameserver 68.100.16.25
nameserver 68.100.16.30
nameserver 68.105.28.12

4. 重新啟動 network
sudo /etc/init.d/networking restart

Ubuntu 成功以全網絡安裝 PXE LINUX 在 WINDOWS 設定的方法


Ubuntu 成功以全網絡安裝 PXE LINUX 在 WINDOWS 設定的方法


1. 第一步到以下網址安載 Tftpd32
http://tftpd32.jounin.net/
下載後直接安排即可

2. 我們先建立一個資料夾,如 C:\PXE
然後從C:\Program Files\Tftpd32\Tftpd32.exe 複制到 C:\PXE

3. 到以下位置下載 netboot.tar.gz
http://archive.ubuntu.com/ubuntu/dists/
e.g. : http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/alpha-5/images/netboot/

4. 然後解壓到C:\PXE
5. C:\PXE\Ubuntu-installer\i386 下的 linux, pxelinux.0, pxelinux.cfg 複制到 C:\PXE
6. 執行 C:\PXE\Tftpd32.exe
7. 進入 setting -> choice "PXE Compatiliby" and "Allow / As Virtual Root" -> OK -> 重新開啟程式
8. 進入程式後轉去 DHCP Server
IP Address : 192.168.1.100
Size of pool : 30
Boot file : pxelinux.0
DNS : 192.168.1.1
Mask : 255.255.255.0
然後儲存"Save"

這樣就完成, 從其他電腦用PXE 即開機即可!

2012年1月18日 星期三

Java File Monitor

1. Java 7 WatchService
2. jNotify  http://jnotify.sourceforge.net/
3. jPathWatch http://jpathwatch.wordpress.com/
4. jxFileWatcher http://www.teamdev.com/jxfilewatcher/

2012年1月12日 星期四

Web Performance

可以查 Google Web performance tools

Google 說明 web performance 之處 http://code.google.com/speed/page-speed/docs/rtt.html

有兩個類似的東西
1. Google Web Accelerator:放在 browser 端
2. Google Page Speed Service:類似頻寬放大器

SysInternals 的 autorun_tools:可以查看Windows啟動時,所有執行的程式