May 29, 2008

學生電腦安裝手冊

在挖資料時發現以前寫的安裝手冊,把它丟上來給有需要的人
-------------------------------歷 史 的 分 隔 線-----------------------------------
一、... 傳播架構... 1
二、... 硬體環境... 1
三、... 軟體環境... 1
四、... Step 1前置步驟... 2
五、... Step 2製作開機映像檔... 3
六、... Step 3製作PXE開機選單... 8
七、... Step 4製作Ghost映像檔... 12
八、... Step 5多點傳播... 16
九、... Step 6修改各PC端IP、Hostname 19
十、... Step 7測試群組與IP.. 21
十一、參考資源... 21
十二、附錄一... 22
一、 傳播架構
clip_image002
PC1為製作映像檔之電腦,Multicast Server為傳播映像檔給所有電腦之伺服器,其傳播過程分為兩階段,其一:PC1 經由網路備份映像檔至Multicast Server (Step1 - 4),其二:Multicast Server 經由網路還原映像檔給所有電腦,過程中所以使用的技術(DHCP、TFTP、PXE、GHOST)可於參考資源中查尋。
二、 硬體環境
l PC兩部(一台為Server另一台為製作映像檔用)
l PC需有PXE開機功能
l PC與Multicast Server需連接網路,屬同網段
三、 軟體環境
l Norton Ghost v8.2 Corporate Edition
l 3com Dynamic Access Boot Services
l Tftpd32 v2.83

四、 Step 1前置步驟
PC1:
依老師需求規劃分割區、安裝系統、使用者帳號和權限、網路群組名稱、TCP/IP資訊、軟體
Note
若有多個系統則考量是否需另外安裝開機選單
部份軟體在不同使用者會有註冊檔、權限問題,需登入各使用者環境,執行各類軟體測試(參閱附錄一)

Multicast Server:
安裝Ghost Enterprise、DABS、tftpd32
Note
安裝3com DABS 時安裝種類為Server
clip_image004

五、 Step 2製作開機映像檔
Multicast Server:
執行Ghost boot wizard
clip_image006
挑選TCP/IP Network Boot Image
clip_image008
挑選PXE Packet Driver
clip_image010
clip_image012
clip_image014
l 製作Ghost映像檔參數(用於Step 4):以Session Name 為Backup
-clone,mode=create,src=1,dst=@mcBackup -sure –rb
l 多點傳播參數(用於Step 5): 以Session Name 為Restore
-clone,mode=restore,src=@mcRestore,dst=1 -sure -rb
clip_image016
clip_image018
clip_image020
clip_image022
clip_image024

六、 Step 3製作PXE開機選單
Multicast Server:
執行Boot Image Editer
clip_image026
按Create a PXE menu boot file
clip_image028
按Add
clip_image030
按Browser挑選開機檔案存檔位址
clip_image032
按Save
clip_image034
選取開機選單存檔位址(需與開機映像檔為同一資料夾)
clip_image036
Note
第一次執行Boot Image Editor則會出現下列畫面(皆預設選項即可)
clip_image038
clip_image040
clip_image042

七、 Step 4製作Ghost映像檔
Multicast Server:
我的電腦→控制台→網路連線→區域連線→內容
更改為虛擬IP(可避免與實體IP的衝突)
clip_image044
執行TFTPD32
按Settings
clip_image046
勾選PXE Compatibility,按OK
clip_image048
設定下列資訊,按Save
clip_image050clip_image052
啟動GhostCast Server
設定下列資訊
clip_image054
按Accept Clients
clip_image056
PC1:
進入BIOS將網路開機功能開啟
重新開機後PC1會經由網路取得 IP設定→開機選(bootmenu.pxe)→開機映像檔(bootimg.sys)→進入Ghost畫面與開始傳輸)
Note
如果在備份或還原過程過於緩慢或過多PC中斷,可能有電腦正在傳送大量封包或病毒干擾(將其暫停傳輸)

八、 Step 5多點傳播
Multicast Server:
啟動GhostCast Server
設定下列資訊
clip_image058
Note
這時的開機映像檔參數為下(作法請方參照Step 2)
clip_image060
按Accept Clients
clip_image062
先執行下列PC步驟,當所有電腦都連線時即可按下Send開始傳送

所有要安裝的PC(需與PC1為同一機型):
進入BIOS將網路開機功能開啟
(重新開機後PC1會經由網路取得bootmenu.pxe並執行預設的bootimg.sys進入Ghost畫面與開始傳輸)
Note
如果已設好PXE的電腦可以用Wake-On-LAN的方式分段式的啟動
MC-WOL ethernet-address [/a ip-address] [/p password]
Example1: MC-WOL 00:01:02:58:A3:C7
需注意如同時啟動過多電腦則會導致bootimg.sys傳輸中斷

九、 Step 6修改各PCIPHostname
我的電腦→內容→電腦名稱
按變更
clip_image064
clip_image066
我的電腦→控制台→網路連線→區域連線→內容
選擇Internet Protocol(TCP/IP),按內容
clip_image068
設定IP與 DNS資訊
clip_image070
開始→電腦關機→重新啟動

十、 Step 7測試群組與IP
開始→執行→輸入cmd
clip_image072
輸入ipconfig
clip_image074
將所有PC*停留此畫面檢查
選擇任一PC進入網路芳鄰檢查群組中是否有所有電腦
十一、 參考資源
tftpd32 home page http://tftpd32.jounin.net/
用Ghost軟體實現基於PXE的網路硬碟克隆http://tools.yesky.com/15/2187015.shtml
GHOST V8.0 使用詳解 http://www.51testing.com/html/31/566.html
神出鬼沒 揭開Ghost 9的真面目 http://www.jcwcn.com/html/Ghost/16_48_07_890.htm
PXE——RPL的掘墓人 http://www.coollan.net/win98/PXE-RPL.htm
Intel® Boot Agent - PXE Related Resources http://www.intel.com/support/network/adapter/pro100/bootagent/sb/cs-008191.htm
Wake-On-LAN http://www.matcode.com/wol.htm
十二、 附錄一
由於使用者的權限會直接引響軟體的使用,所以切記在製作映像檔前需先登入所有使用者的操作環境,測試每一項自行安裝的軟體,否則事後的補救是極浪費時間與人力的。
一般的權限問題設置軟體執行目錄權限來解決,而某些特定的軟體則需另行找尋解決方法,已知目錄權限問題的軟體如下:
l Dr.eye 6
l Apache 2.x
l Mysql 4.0
l Cakewalk 9
l C++Builder 6
l …
操作步驟:
在任一資料夾→工具→資料夾選項
clip_image076
檢視→勾除”將使用簡易檔案共用”
clip_image078
以Dr.eye為例:
在C:\Program Files\Inventec 右鍵→內容
clip_image080
選安全性→按進階
clip_image082
勾除”從父項繼承套用到子物件…”
clip_image084
按移除
clip_image086
按新增
clip_image088
輸入Everyone,按確定
clip_image090
勾選完全控制,按確定
clip_image092
勾選 “以顯示從此套用到子物件…”,按確定
clip_image094
特定軟體
l SQL Server
解決步驟:
1. 將目錄權限開啟
2. 建置SQL使用者帳號

May 12, 2008

QR Code 雜記

技術議題

字元編解碼:

ISO規格定訂為JIS(日文),台灣行動上網連盟(OMIA)定訂為UTF-8,於不同規格的軟體解碼時會有字元集的轉換問題,使用英文則可避免此問題。

列印大小:

資料的應用方式是主要決定圖像大小的因素Symbol version(模組數),一個黑點即是一個模組,而模組列印大小(墨點數)決定於列印與讀取裝置的解析度。(各Symbol version模組數、資料量、錯誤更正等級對照表)

qrsizefig

QR Code Size Decision Factor

來源:http://www.denso-wave.com/qrcode/qrgene1-e.html

qrversion

symbol versions

來源:http://www.denso-wave.com/qrcode/qrgene2-e.html

prtdot4

Printer Head Density and Module Size

來源:http://www.denso-wave.com/qrcode/qrgene3-e.html

辨視效果:

主要決定於兩區塊"影像品質"與"辨視方法":影像品質看掃描的裝置品質(一般要求30萬像數、可近拍)、裝置設定、拍攝環境與方式,辨視方法則依Symbol version複雜度(越高辨視度相對下降),影像處理方法(去雜訊、翻轉、樣式比對)引響辨視穩定性(正確率、失敗率、錯誤率)與所需成本(時間與空間)。

行動條碼引申參考

二維條碼目前於行動商務之應用大致可分為四類,包括:
1.自動化文字輸入:以二維條碼儲存個人資訊,如地址、電話號碼、行事曆等,進行名片、行程資料等之快速交換。
2.數位內容下載:以二維條碼儲存數位內容之基本資料、進行數位內容之下載。
3.網址快速連結:於使用手冊、產品規格、報章雜誌、廣告宣傳資料等資料附加二維條碼資料,以提供使用者進行網址快速連結、電話快速撥號等。
4.身分鑑別及商務交易:於手機上顯示二維條碼資料,作為交易身分見別資料、或行動付款憑證,可用於如入場券、販賣機、會員身份確認、行動付款等應用。
(來源:中文版-OMIA行動條碼應用標準規範v3-2_2007-06-08.doc)

OMIA行動條碼規格:

image

參考連結

Introduction

Rex’s blah blah blah » 行動條碼 / 二維碼 / Mobile Barcode / QRCode

http://people.debian.org.tw/~chihchun/2006/07/04/mobile-barcode/

3公分圖案 儲存4千字資訊

http://paper.udn.com/udnpaper/POH0040/121378/web/

QRCode 官方站(英文)

http://www.denso-wave.com/qrcode/aboutqr-e.html

Code Standard:

行動上網聯盟 --- OMIA

http://www.omia.org.tw/

OMIA動條碼共通規範3.2之中英文版

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=96&step=1&newsno=3830

ISO/IEC 18004:2006

http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=43655

Survey:

マイボイスコム定期アンケート(携帯電話のQRコード)

http://www.myvoice.co.jp/biz/surveys/11101/index.html(英譯)

What Japan Thinks

http://whatjapanthinks.com/tag/qr-code/

Application:

QR Code and Two dimensional Bar Code News

http://2d-code.co.uk/

Bar code Insight 条码观察家

http://blog.donews.com/barcoder/archive/2007/04.aspx

All about Mobile Life

http://mobile.kaywa.com/qr-code-data-matrix/index.html

TABA臺灣農產品生產紀錄追溯網

http://www.taba.org.tw/index.asp?a=dp&mp=7&ShowSearch=Y

農產品產銷履歷諮詢服務

http://220.128.133.13/taft/admin/elearn.php

QRコードBlog

http://www.qrcodeblog.com/

いばらき農産物ネットカタログ

http://ibrk.jp/vipsv2/search.aspx?no=00021454

中央氣象局推出的手機入口網站

http://www.cwb.gov.tw/V5/wap/wap.htm

二維碼QR Code的擅場時代

http://bbs.mayacode.com/simple/index.php?t892.html

Software:

DoCoMo QR-factory

http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/tool/

フリーソフト -> QR Code Editor | Psytec

http://www.psytec.co.jp/docomo.html

OMIA與中華電信研究所合作之離線版行動條碼編碼軟體

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=96&step=1&newsno=3495

QuickMark_WebCam

http://www.quickmark.com.tw/cht/basic/download.asp#QuickMark_WebCam

Decode Library:

Open Source QRCode Library(C#)

http://www.codeproject.com/KB/cs/qrcode.aspx

A C/C++ library for decoding QR code based on JIS X 0510 and ISO/IEC18004. (C/C++)

http://trac.koka-in.org/libdecodeqr

工研院QRcode編解碼軟體(dll)

http://www.meworks.net/meworksv2a/meworks/page1.aspx?no=72518

Open Source QR Code Library(Java)

http://qrcode.sourceforge.jp/

Google ZXing ("Zebra Crossing")(Java)

http://code.google.com/p/zxing/

Apr 21, 2008

GPS 記錄器、相簿、工具、節點編輯...

GPS應用廣泛,尤其整合了網路資源後能擴展的方向很多,本篇是一則實作測試文,為了偷懶不多作說明與修飾,若你有進一步的興趣請勤奮的點選連結,有很多DEMO可以把玩。

20080412阿里山出遊路線分享(I-gotU GT-100)

[旅程中2個大斷層,跟沒結尾的冏況,所以出現大橫貫與圖片辜兒等精采結局請勿受到驚嚇]
step 1. 安裝i-gotU Desktop
step 2. 將 *.mdb(Link) 放至 C:\Documents and Settings\******\Application Data\MobileAction\GPSTracer 取代 Tracer.mdb
step 3. 選取兩筆track→合併
---------- (分隔線)繼續下列步驟或匯出*.gpx(Link)使用其它軟體後製(edit、gpscoding、gpstagging…)---------
step 4. 於下方的"相簿"右鍵→新增圖片
step 5. 選取圖片右鍵→儲存GPS
step 6. 點選上片track 會重新載入Google Map(Ps. i-gotU Desktop圖片太多(大)可能會當)
step 7. 匯出html,gpx,kml…
clip_image002
(相關討論請參考:[Mobile01分享]i-gotU(GT-100)旅程紀錄i-gotU操作手冊)

Geocode aware

GPicSync
Automatically geocode pictures from your camera and a GPS track log.
Picasa:
Picasa is a software application for organizing and editing digital photos, Google began offering Picasa for free download.
Google Earth
Google Earth lets you fly anywhere on Earth to view satellite imagery, maps, terrain, 3D buildings and even explore galaxies in the Sky. You can explore rich geographical content, save your toured places and share with others.
Friendly.Flickr:
一個整合Flickr上下傳的編輯工具

Geotagging Albums

clip_image003

(Demo)

clip_image005clip_image007
clip_image009clip_image011
clip_image013

(DEMO)

clip_image015clip_image017
clip_image018

(DEMO)

上傳圖片前先注意有無允許自動匯入GPS資訊(否則就要手動調整囉)
You→Your Account→Privacy & Permissions→Import EXIF location data
clip_image020clip_image022
clip_image024
除了在photostream 頁面下方的KML(僅單頁)
Subscribe to parkghost's photostream – Latest | geoFeed | KML
也有第三方做的 http://kmlphotos.metaltoad.com/
clip_image026
點選clip_image027就會啟動Google Earth,紅點即是Flickr的圖片位址
clip_image029
clip_image030

(DEMO)

整體來說還有很大的進步空間…
clip_image032

整合Flickr與 Urmap與Google Map/Earth

(來源請參考:UrKML / UrGPX照片軌跡整合線上地圖的小工具)
匯出KMZ
clip_image034
Flickr with Google Earth
clip_image036
KML with Google Map(DEMO)
clip_image038
Flickr with Google Map(DEMO)
1: 5mi
clip_image040
1:2000ft
clip_image042
Flickr with Urmap(DEMO)
1:6.4km
clip_image044
1:200m
clip_image046

Editor

JOSM
File→Open→*.gpx
clip_image048
使用Google Map圖資
(Ps.基本上空照圖是要收費的,所以大部份OpenSource是沒有空照圖的)
clip_image050clip_image052
clip_image054clip_image056
左手邊垃圾桶按鈕→刪點
clip_image058
(隨便玩玩~呵) 繞圈圈
clip_image060clip_image062
Desktop Componet

swinglabs > swingx-ws > JXMapViewer

image

一些詞條 (Wikipedia)

GPS tracking
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analysing the track later, using customized software. Such systems are not new; amateur radio operators have been operating their free GPS based nationwide realtime Automatic Position Reporting System since 1982.

Data loggers
A GPS logger simply logs the position of the device at regular intervals in its internal memory. Modern GPS loggers have either a memory card slot, or internal flash memory and a USB port. Some act as a USB flash drive. This allows downloading of the data for further analysis in a computer.

GPX
GPX, or GPS eXchange Format is an XML schema designed for transferring GPS data between software applications. It can be used to describe waypoints, tracks, and routes. The format is open and can be used without the need to pay licence fees.
Geotagging:
Geotagging, sometimes referred to as Geocoding, is the process of adding geographical identification metadata to various media such as websites, RSS feeds, or images and is a form of geospatial metadata. This data usually consists of latitude and longitude coordinates, though it can also include altitude, bearing, and place names.
Geocode:
Geocoding is the process of assigning geographic identifiers (e.g., codes or geographic coordinates expressed as latitude-longitude) to map features and other data records
Waypoint
Waypoints are sets of coordinates that identify a point in physical space. For the purposes of terrestrial navigation, these coordinates usually include longitude and latitude, and sometimes altitude (particularly for air navigation).

Track、Route
An ordered collection of points may be expressed as a track or a route. Conceptually, tracks are a record of where a person has been, routes are suggestions about where they might go in the future. So, for instance, there might be timestamps for each point in a track (because someone is recording where and when they were there), but timestamps for each point in a route are unlikely to be provided, because the author is suggesting it, and nobody might ever have travelled it.
KML
Keyhole Markup Language (KML) is an XML-based language schema for expressing geographic annotation and visualization on existing or future Web-based, two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. It was created by Keyhole, Inc, which was acquired by Google in 2004. The name "Keyhole" is an homage to the KH reconnaissance satellites, the original eye-in-the-sky military reconnaissance system first launched in 1976.

KMZ
KML files are very often distributed as KMZ files, which are zipped KML files with a .kmz extension

Mar 28, 2008

自動分割大型檔案備份至GMail

前陣子還有一台Lab的備份主機可以放系統備份,可惜在當兵期間系統就蒙主恩招,現在沒有異地備份總有一種不踏實的感覺,要定期下載備份存檔總會忘記,好在網路上也有許多免費空間可以利用,尤其是GMail這樣好用又大碗的選擇不好好利用實在是太浪費了 :P

1.申請GMail

2.安裝軟體(Postfix、Mutt、Rar)
選擇Rar的原因是只用Tar加split哪怕是傳輸中+-1Byte,就完了,rar有的加入還原資訊的選項,比較保險!!!。
Ps.執行rar指令若出現下行訊息
rar: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by rar)
表示需要GLIBC_2.4。如果沒有GLIBC_2.4可以使用rar_static
cp rar_static /usr/local/bin/rar

3.Script
#!/bin/bash
#backup to local and mail
#Author: Brandon Chen
#Email: parkghost@gmail.com

src_path=/var/www/html
dst_path=/var/www/alumni/backup/

bak_file="alumni"`date +%Y%m%d%H%M`
bak_data_recovery=15%
bak_split_size=19m
bak_mail_to=*****@gmail.com

db_user=*****
db_name=*****
db_password=*****

if ! test -d $dst_path"/mail"
then
mkdir -p $dst_path"/mail"
fi

cd $dst_path
mysqldump -u$db_user -p$db_password $db_name > $bak_file".sql"
tar --exclude .svn -zcf $bak_file".tar.gz" $src_path

cd mail
rm -rf * #remove old files
rar a -rr$bak_data_recovery -m5 -v$bak_split_size $bak_file".rar" ../$bak_file".tar.gz" > /dev/null
rar a -rr$bak_data_recovery -m5 $bak_file".sql.rar" ../$bak_file".sql" > /dev/null

for name in `ls`
do
mutt -s $bak_file -a $name $bak_mail_to < /dev/null
done

4.修改Postfix的最大寄送郵件大小
[root@alumni ~]# vi /etc/postfix/main.cf
message_size_limit = 40960000 #增加此行

5.加入系統排程
[root@alumni ~]# crontab -e
0 0 15,30 * * /var/www/alumni/scripts/backup.sh