20150829
製作電腦教室汰換下來電腦的印象檔
準備將 PCB-A01~04 作為備用機
20150828
將幼兒園 花鹿班 E102-1 E102-2 加入網域
設定印表機連線 將小熊班印表機X64 driver加入 printer 主機
所用word軟體列印時 會發生錯誤 轉換成PDF再列印即OK
檢查C302教室電腦 與 網路電話(被鎖定!?)
重新插拔電腦電源後 即可開機
使用PXE開機還原C103電腦 C槽 (需先進BIOS 開啟 NIC Boot ROM)
使用PXE還原後 因接收到PXE server 所發送DHCP 無法順利加入網域
20150827
重新設定 幼兒園 白兔班 電腦名稱
E201-2 設定訊號分配器將訊號投影至單槍
E102 教室電源與網路需重新拉線
E102-1 ASUS MD570 安裝軟體 並進行備份
C棟網路不通 經確認 為廠商進行C棟2F電源施工
網路設備無法正常運作
確認F301網路電話正常
建議 將F402 電腦 C槽資料搬移至 D槽
確認 B403 教室鍵盤
20150826
學務處 體育組 開機緩慢
確認後 發現備份硬碟無法讀取 更換後即可正常使用
20150825
Promise VessR2600i 教育訓練
操作過程造成 VM iscsi 通訊中斷
回復方式:
所有在該datastore的VM 必須全部停止運作
到個別主機 HOST 組態 儲存區 重新整理 (該datastore 應該會自動消失)
到 組態 儲存裝置介面 (修改iscsi介面卡任何一個 靜態路由) 讓VM 重新掃描VHA
參考資料
http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2004684
(簡體中文) http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2082207
20150822
使用PXE方式 還原電腦教室A
20150822
使用USB碟方式 還原電腦教室A
20150819
還原電腦教室B
20150818
建立電腦教室B 電腦映像檔
20150809
颱風過後確認機房與資訊中心狀況
將主機開機
20150807
智慧光網路施工需停機
將主機關機
發現 cms ipam無法下達暖關機指令
cms 安裝 VM tool 並清除舊版kernel image 釋放boot空間
ipam 安裝 VM tool 並清除舊版kernel image 釋放boot空間
參考資料
Ubuntu 移除舊版本 Linux 核心
Read more: http://www.arthurtoday.com/2013/05/ubuntu-remove-all-older-linux-kernels.html#ixzz3nHOKcKyk
http://www.arthurtoday.com/2013/05/ubuntu-remove-all-older-linux-kernels.html
2015年8月30日 星期日
2015年8月29日 星期六
Support tools
https://support.microsoft.com/en-us/kb/838079
PS: I did test installing the Windows Server 2003 Support tools on a Windows Server 2008 domain controller in a lab environment, and it does work.
- Ipseccmd.exe
- Httpcfg.exe
- Replmon.exe
- Iadstools.dll
- Extract.exe
- Bitsadmin.exe
- Netdom.exe
repadmin.exe on
2008/2008 R2, or to use replmon.exe from a Windows Server 2003 server.
You can find the command reference for repadmin.exe in Windows Server 2008/2008 R2 here.A few examples:
repadmin.exe /showrepl shows the replication-status for the domain controller the tool are being run from.
repadmin.exe /showrepl servername shows the replication-status for the domain controller with the provided servername,
repadmin.exe /queue shows the replication-queue for the domain controller the tool are being run from.
repadmin.exe /queue servername shows the replication-queue for the domain controller with the provided servername,
repadmin.exe /replsummary shows a brief summary of the replication status.
I also checked if there are any PowerShell cmdlets for checking replication status in Windows Server 2008 R2, but its not. Hopefully this will be implemented some time in the future.PS: I did test installing the Windows Server 2003 Support tools on a Windows Server 2008 domain controller in a lab environment, and it does work.
2015年8月28日 星期五
Clonezilla 隨身碟 一鍵還原設定
參考資料:
http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/05_Preseed_options_to_do_job_after_booting&fullmode=1
http://wdpsestea.blogspot.tw/search?q=clonezilla
http://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/99_Misc
https://raymii.org/s/tutorials/Customize-your-clonezilla-live-CD.html#example
EFI開機選項設定檔:
/EFI/boot/grub.cfg
BIOS
syslinux/isolinux.cfg (光碟開機專用)
syslinux/syslinux.cfg
menuentry "clonezilla live with img 2015-08-18-04-imgca (Default settings, VGA 1024x768) ram nokey"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -k -p poweroff restoredisk 2015-08-18-04-imgca sda" ocs_live_extra_param="" ocs_live_batch=yes vga=791 ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=filesystem.squashfs ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t cifs //172.22.100.16/images /home/partimag" ocs_prerun4="sleep 3"
initrd /live/initrd.img
}
menuentry "clonezilla live with img 2015-08-18-04-imgca (Default settings, VGA 1024x768) ram nokey"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -k -p poweroff restoredisk 2015-08-18-04-imgca sda" ocs_live_extra_param="" ocs_live_batch=yes vga=791 ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=filesystem.squashfs ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -o user=admin -t cifs //172.22.100.16/images /home/partimag" ocs_prerun4="sleep 3"
initrd /live/initrd.img
}
參考資料
GRUB format:
menuentry "Clonezilla live (Default settings, VGA 1024x768)"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live username=user hostname=utopic config quiet union=overlayfs noswap edd=on nomodeset nodmraid noeject vga=788 toram=filesystem.squashfs splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 locales=zh_TW.UTF-8 ocs_live_keymap="NONE" ocs_live_batch="no" ip= ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount 10.241.97.252:/volume1/ntpcimg /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p poweroff restoredisk ntpcU-last-img sda "
initrd /live/initrd.img
}
label Clonezilla live
MENU DEFAULT
# MENU HIDE
MENU LABEL Clonezilla live restore ntpc img (To RAM. Boot media can be removed later)
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live username=user hostname=utopic config quiet union=overlayfs noswap edd=on nomodeset nodmraid noeject vga=788 toram=filesystem.squashfs splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 locales=zh_TW.UTF-8 ocs_live_keymap="NONE" ocs_live_batch="no" ip= ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount 10.241.97.252:/volume1/ntpcimg /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p poweroff restoredisk ntpcU-last-img sda "
TEXT HELP
All the programs will be copied to RAM, so you can
remove boot media (CD or USB flash drive) later
ENDTEXT
http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/05_Preseed_options_to_do_job_after_booting&fullmode=1
http://wdpsestea.blogspot.tw/search?q=clonezilla
http://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/99_Misc
https://raymii.org/s/tutorials/Customize-your-clonezilla-live-CD.html#example
EFI開機選項設定檔:
/EFI/boot/grub.cfg
BIOS
syslinux/isolinux.cfg (光碟開機專用)
syslinux/syslinux.cfg
menuentry "clonezilla live with img 2015-08-18-04-imgca (Default settings, VGA 1024x768) ram nokey"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -k -p poweroff restoredisk 2015-08-18-04-imgca sda" ocs_live_extra_param="" ocs_live_batch=yes vga=791 ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=filesystem.squashfs ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t cifs //172.22.100.16/images /home/partimag" ocs_prerun4="sleep 3"
initrd /live/initrd.img
}
menuentry "clonezilla live with img 2015-08-18-04-imgca (Default settings, VGA 1024x768) ram nokey"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -k -p poweroff restoredisk 2015-08-18-04-imgca sda" ocs_live_extra_param="" ocs_live_batch=yes vga=791 ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=filesystem.squashfs ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -o user=admin -t cifs //172.22.100.16/images /home/partimag" ocs_prerun4="sleep 3"
initrd /live/initrd.img
}
參考資料
GRUB format:
menuentry "Clonezilla live (Default settings, VGA 1024x768)"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live username=user hostname=utopic config quiet union=overlayfs noswap edd=on nomodeset nodmraid noeject vga=788 toram=filesystem.squashfs splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 locales=zh_TW.UTF-8 ocs_live_keymap="NONE" ocs_live_batch="no" ip= ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount 10.241.97.252:/volume1/ntpcimg /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p poweroff restoredisk ntpcU-last-img sda "
initrd /live/initrd.img
}
label Clonezilla live
MENU DEFAULT
# MENU HIDE
MENU LABEL Clonezilla live restore ntpc img (To RAM. Boot media can be removed later)
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live username=user hostname=utopic config quiet union=overlayfs noswap edd=on nomodeset nodmraid noeject vga=788 toram=filesystem.squashfs splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 locales=zh_TW.UTF-8 ocs_live_keymap="NONE" ocs_live_batch="no" ip= ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount 10.241.97.252:/volume1/ntpcimg /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p poweroff restoredisk ntpcU-last-img sda "
TEXT HELP
All the programs will be copied to RAM, so you can
remove boot media (CD or USB flash drive) later
ENDTEXT
PXE 一鍵還原 pxelinux.cfg\default 設定
無法正確下載 Sysnology tftp filesystem.squashfs 檔案
所以另用它法 http 或 ftp
PXE\tftpboot\clonezilla-live-2.4.2-32-amd64\pxelinux.cfg\default
label clonezilla
MENU DEFAULT
# MENU HIDE
MENU LABEL pxelinux Clonezilla DEFAULT 800*600
# MENU PASSWD
kernel vmlinuz
#append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=tftp://172.22.100.16/filesystem.squashfs
append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=ftp://???:???@172.22.100.16/images/PXE/tftpboot/clonezilla-live-2.4.2-32-amd64/filesystem.squashfs
#append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=http://172.22.100.2/filesystem.squashfs
TEXT HELP
* Clonezilla version: 3.16.26-drbl1. (C) 2003-2015, NCHC, Taiwan
ENDTEXT
所以另用它法 http 或 ftp
PXE\tftpboot\clonezilla-live-2.4.2-32-amd64\pxelinux.cfg\default
label clonezilla
MENU DEFAULT
# MENU HIDE
MENU LABEL pxelinux Clonezilla DEFAULT 800*600
# MENU PASSWD
kernel vmlinuz
#append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=tftp://172.22.100.16/filesystem.squashfs
append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=ftp://???:???@172.22.100.16/images/PXE/tftpboot/clonezilla-live-2.4.2-32-amd64/filesystem.squashfs
#append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791 locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_prerun1="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" fetch=http://172.22.100.2/filesystem.squashfs
TEXT HELP
* Clonezilla version: 3.16.26-drbl1. (C) 2003-2015, NCHC, Taiwan
ENDTEXT
一鍵還原
label Clonezilla Live
MENU LABEL Clonezilla Live Computer ClassA restore 2015-08-18-04-imgca to disk sda shutdown
kernel vmlinuz
append initrd=initrd.img boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -k -p shutdown restoredisk 2015-08-18-04-imgca sda" ocs_live_extra_param="" ocs_live_batch=yes vga=791 ip= net.ifnames=0 quiet nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t cifs -o user=clone //172.22.100.16/images /home/partimag" ocs_prerun4="sleep 5" fetch=http://172.22.100.2/filesystem.squashfs
# append initrd=initrd.img boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=788 nosplash fetch=tftp://172.22.100.16/filesystem.squashfs
TEXT HELP
* Clonezilla version: 3.16.26-drbl1. (C) 2003-2015, NCHC, Taiwan
* One key restore Computer Room A Disk 1
ENDTEXT
2015年8月25日 星期二
20150825 Drupal 模組開發與偵錯
模組開發偵錯:
PHP 錯誤訊息 寫在 /var/log/message
callback 錯誤
Drupal 邏輯錯誤 寫在Dashboard > 報告 > Recent log messages
(Watchdog table)
模組相容性錯誤
JS AJAX
確認 JQuery
(獨立執行 被呼叫的PHP程式)
CSS
PHP偵錯
phpfilter
print_r (Array only)
var_dump 可以印出任何元素 印在螢幕上
var_export 印在檔案
建議安裝模組:
Translation template extractor (翻譯 模組內語系檔)
Localization update (自動更新語系)
Code review
Advanced help (可在前台直接瀏覽 模組 README)
Entity Registration
PHP 錯誤訊息 寫在 /var/log/message
callback 錯誤
Drupal 邏輯錯誤 寫在Dashboard > 報告 > Recent log messages
(Watchdog table)
模組相容性錯誤
JS AJAX
確認 JQuery
(獨立執行 被呼叫的PHP程式)
CSS
PHP偵錯
phpfilter
print_r (Array only)
var_dump 可以印出任何元素 印在螢幕上
var_export 印在檔案
建議安裝模組:
Translation template extractor (翻譯 模組內語系檔)
JQuery Update
Backup and MigrateLocalization update (自動更新語系)
IMC (檔案管理)
Advanced help (可在前台直接瀏覽 模組 README)
Entity Registration
1. 報名限制 (人數 日期)
2. 檢查衝突
Drush 可用command line mode execute script
Drush 可用command line mode execute script
20150824 Drupal研習 note
path
node
menuroute
無障礙
1.改寫Render 模組 (非常費時費力)
2.改寫最後結果 (使用版型)
中文化
http://drupaltaiwan.org/localized
http://drupaltaiwan.org/forum/20110728/5398
1.把下列程式碼 加入 template.php 讓輸出結果 符合無障礙
drupal\themes\bartik\template.php
------------------
$tab_index = 1;
function 版型名稱_for_taiwan($content) {
global $tab_index;$dom = new DOMDocument;
libxml_use_internal_errors(true);
$dom->loadHTML('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'.$content);
$images = $dom->getElementsByTagName('img');
$links = $dom->getElementsByTagName('a');
$objs = $dom->getElementsByTagName('object');
$applets = $dom->getElementsByTagName('applet');
$img_maps = $dom->getElementsByTagName('area');
$ems = $dom->getElementsByTagName('i');
$strongs = $dom->getElementsByTagName('b');
$tables = $dom->getElementsByTagName('table');
$table_headers = $dom->getElementsByTagName('th');
foreach ($images as $img) {
$myalt=$img->getAttribute('alt');
if (!$myalt) $img->setAttribute('alt','排版用裝飾圖片');}foreach ($links as $lnk) {
$mytitle=$lnk->getAttribute('title');
if (!$mytitle) $lnk->setAttribute('title', $lnk->nodeValue);
$lnk->setAttribute('tabindex', $tab_index);
$tab_index++;
}
foreach ($links as $lnk) {
$mytitle=$lnk->getAttribute('title');
if (!$mytitle) $lnk->setAttribute('title', $lnk->nodeValue);
$lnk->setAttribute('tabindex', $tab_index);
$tab_index++;
}
foreach ($objs as $obj) {
$myalt=$obj->nodeValue;
if (!$myalt) $obj->nodeValue=$obj->getAttribute('data');
}
foreach ($applets as $app) {
$myalt=$app->nodeValue;
if (!$myalt) {
$app->setAttribute('alt', '多媒體互動物件');
$app->nodeValue='多媒體互動物件';
}
else {
$app->setAttribute('alt', $myalt);
}
}
foreach ($img_maps as $area) {
$myalt=$area->getAttribute('alt');
if (!$myalt) $area->setAttribute('alt',$area->getAttribute('href'));
}
foreach ($ems as $em) {
$newem=$dom->createElement('em',$em->nodeValue);
$em->parentNode->replaceChild($newem, $em);
}
foreach ($strongs as $strong) {
$newstrong=$dom->createElement('strong',$strong->nodeValue);
$strong->parentNode->replaceChild($newstrong, $strong);
}
foreach ($tables as $table) {
$mytitle=$table->getAttribute('title');
$mysummary=$table->getAttribute('summary');
$caption=FALSE;
if ($table->hasChildNodes()) {
if ($table->firstChild->nodeName=='caption') $caption=$table->firstChild->nodeValue;
}
if (!$mytitle && $caption) $table->setAttribute('title',$caption);
if (!$mysummary && $caption) $table->setAttribute('summary',$caption);
if (!$mytitle && !$mysummary && !$caption) $table->setAttribute('summary','排版用表格');
}
foreach ($table_headers as $myth) {
$myscope=$myth->getAttribute('scope');
$myheaders=$myth->getAttribute('headers');
if (!$myscope && !$myheaders) $myth->setAttribute('scope','col');
}
$content = $dom->saveHTML();
$content = preg_replace('/<!DOCTYPE .+>/', '', preg_replace('/<meta .+?>/', '', str_replace( array('<html>', '</html>', '<head>', '</head>', '<body>', '</body>'), array('', '', '', '', '', ''), $content)));
return $content;
}
------------------
2.在相同檔案中 將版型名稱_process_html加入下列程式碼
function 版型名稱_process_html(&$vars) {
$vars['page_top'] = 版型名稱_for_taiwan($vars['page_top']);
$vars['page_bottom'] = 版型名稱_for_taiwan($vars['page_bottom']);
$vars['page'] = 版型名稱_for_taiwan($vars['page']);
node
menuroute
無障礙
1.改寫Render 模組 (非常費時費力)
2.改寫最後結果 (使用版型)
中文化
http://drupaltaiwan.org/localized
http://drupaltaiwan.org/forum/20110728/5398
1.把下列程式碼 加入 template.php 讓輸出結果 符合無障礙
drupal\themes\bartik\template.php
------------------
$tab_index = 1;
function 版型名稱_for_taiwan($content) {
global $tab_index;$dom = new DOMDocument;
libxml_use_internal_errors(true);
$dom->loadHTML('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'.$content);
$images = $dom->getElementsByTagName('img');
$links = $dom->getElementsByTagName('a');
$objs = $dom->getElementsByTagName('object');
$applets = $dom->getElementsByTagName('applet');
$img_maps = $dom->getElementsByTagName('area');
$ems = $dom->getElementsByTagName('i');
$strongs = $dom->getElementsByTagName('b');
$tables = $dom->getElementsByTagName('table');
$table_headers = $dom->getElementsByTagName('th');
foreach ($images as $img) {
$myalt=$img->getAttribute('alt');
if (!$myalt) $img->setAttribute('alt','排版用裝飾圖片');}foreach ($links as $lnk) {
$mytitle=$lnk->getAttribute('title');
if (!$mytitle) $lnk->setAttribute('title', $lnk->nodeValue);
$lnk->setAttribute('tabindex', $tab_index);
$tab_index++;
}
foreach ($links as $lnk) {
$mytitle=$lnk->getAttribute('title');
if (!$mytitle) $lnk->setAttribute('title', $lnk->nodeValue);
$lnk->setAttribute('tabindex', $tab_index);
$tab_index++;
}
foreach ($objs as $obj) {
$myalt=$obj->nodeValue;
if (!$myalt) $obj->nodeValue=$obj->getAttribute('data');
}
foreach ($applets as $app) {
$myalt=$app->nodeValue;
if (!$myalt) {
$app->setAttribute('alt', '多媒體互動物件');
$app->nodeValue='多媒體互動物件';
}
else {
$app->setAttribute('alt', $myalt);
}
}
foreach ($img_maps as $area) {
$myalt=$area->getAttribute('alt');
if (!$myalt) $area->setAttribute('alt',$area->getAttribute('href'));
}
foreach ($ems as $em) {
$newem=$dom->createElement('em',$em->nodeValue);
$em->parentNode->replaceChild($newem, $em);
}
foreach ($strongs as $strong) {
$newstrong=$dom->createElement('strong',$strong->nodeValue);
$strong->parentNode->replaceChild($newstrong, $strong);
}
foreach ($tables as $table) {
$mytitle=$table->getAttribute('title');
$mysummary=$table->getAttribute('summary');
$caption=FALSE;
if ($table->hasChildNodes()) {
if ($table->firstChild->nodeName=='caption') $caption=$table->firstChild->nodeValue;
}
if (!$mytitle && $caption) $table->setAttribute('title',$caption);
if (!$mysummary && $caption) $table->setAttribute('summary',$caption);
if (!$mytitle && !$mysummary && !$caption) $table->setAttribute('summary','排版用表格');
}
foreach ($table_headers as $myth) {
$myscope=$myth->getAttribute('scope');
$myheaders=$myth->getAttribute('headers');
if (!$myscope && !$myheaders) $myth->setAttribute('scope','col');
}
$content = $dom->saveHTML();
$content = preg_replace('/<!DOCTYPE .+>/', '', preg_replace('/<meta .+?>/', '', str_replace( array('<html>', '</html>', '<head>', '</head>', '<body>', '</body>'), array('', '', '', '', '', ''), $content)));
return $content;
}
2.在相同檔案中 將版型名稱_process_html加入下列程式碼
function 版型名稱_process_html(&$vars) {
$vars['page_top'] = 版型名稱_for_taiwan($vars['page_top']);
$vars['page_bottom'] = 版型名稱_for_taiwan($vars['page_bottom']);
$vars['page'] = 版型名稱_for_taiwan($vars['page']);
}
2015年8月19日 星期三
讓Ezgo所有使用者都可以存取arduino
sudo vi /etc/udev/rules.d/90-arduino.rules
SUBSYSTEMS=="usb",ATTRS{idVendor}=="2341",SYMLINK+="ttyUSB%n",MODE="0666"
Save, exit and replug and you should be up and running. Setting the permission to 666 allows anybody to write to the device.
http://askubuntu.com/questions/112568/how-do-i-allow-a-non-default-user-to-use-serial-device-ttyusb0
2015年7月27日 星期一
VMware ESX and vCenter setup note
1. Create RAID DISK and Fast init... it
2. Choose correct Hypervisor (Exsi) version (According to vCenter server version)
Look it up !!!!!
http://www.vmware.com/resources/compatibility/sim/interop_matrix.php
http://www.vmware.com/resources/compatibility/sim/interop_matrix.php?type=0&empty=0&solution=2&platform=VMware%20ESX/ESXi&version=0&selectedProducts=181,14,15,16,17,96,243,18,174,193,364,141,251,391,500,253,441,559,796,507,577,620,430
Install ESX and setup management nic IP
Connect to host via vClient and setup environment for vSphere
3. Network setting:
Check all vSwitch and vmkX MTU 9000
New setting:
Two iSCSI are divided into 2 vSwitches
In old environment:
Two iSCSI are bound in one vSwitch with 2 nic and then each iSCSI disable one nic
ex: iscsi1 use nic 1 disable nic 2 and iscsi2 use nic2 disable nic1
Setup iSCSI:
Bind iSCSI initiator with vmkX
Setup VLAN for vMotion (if it works with Vlan)
Configure VLAN in Cisco
enable ...
configure terminal
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swcli.html
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swvlan.html#wp1200245
vMotion and iSCSI must use different physical vmnic adapters
NIC teaming in ESXi and ESX (1004088)
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004088
Enable vSwitch and vmkX NIC teaming
Disable vMotion NIC teaming
Test vMotion function
To avoid warning message: Disable and Enable HA function in cluster level.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004700
To do: Tuning iSCSI performance
http://techhead.co/dell-equallogic-ps4000-hands-on-review-part-2/
Dell Equalogic Best Practice for ESXi
http://en.community.dell.com/support-forums/storage/f/3775/t/19426321
#IWork4Dell
Get Support on Twitter - @dellcarespro
2. Choose correct Hypervisor (Exsi) version (According to vCenter server version)
Look it up !!!!!
http://www.vmware.com/resources/compatibility/sim/interop_matrix.php
http://www.vmware.com/resources/compatibility/sim/interop_matrix.php?type=0&empty=0&solution=2&platform=VMware%20ESX/ESXi&version=0&selectedProducts=181,14,15,16,17,96,243,18,174,193,364,141,251,391,500,253,441,559,796,507,577,620,430
Install ESX and setup management nic IP
Connect to host via vClient and setup environment for vSphere
3. Network setting:
Check all vSwitch and vmkX MTU 9000
New setting:
Two iSCSI are divided into 2 vSwitches
In old environment:
Two iSCSI are bound in one vSwitch with 2 nic and then each iSCSI disable one nic
ex: iscsi1 use nic 1 disable nic 2 and iscsi2 use nic2 disable nic1
Setup iSCSI:
Bind iSCSI initiator with vmkX
Setup VLAN for vMotion (if it works with Vlan)
Configure VLAN in Cisco
enable ...
configure terminal
int gi0/19
switchport mode trunk
switchport access vlan xxx
switchport trunk native vlan xxx
end
show interfacesinterface-id switchport
show interfacesinterface-id trunk
copy running-config startup-config
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swcli.html
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swvlan.html#wp1200245
vMotion and iSCSI must use different physical vmnic adapters
NIC teaming in ESXi and ESX (1004088)
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004088
Enable vSwitch and vmkX NIC teaming
Disable vMotion NIC teaming
Test vMotion function
To avoid warning message: Disable and Enable HA function in cluster level.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004700
To do: Tuning iSCSI performance
http://techhead.co/dell-equallogic-ps4000-hands-on-review-part-2/
Dell Equalogic Best Practice for ESXi
http://en.community.dell.com/support-forums/storage/f/3775/t/19426321
Here's a document www.equallogic.com/.../DownloadAsset.aspx that covers how to configure iSCSI with EQL arrays.
It's highly unlikely that you will need 6x GbE NICs for iSCSI with your configuration.
Two for ESX iSCSI use and two more for guest iSCSI initiators is best. I.e. if you want to take advantage of ASM/ME for SQL or Exchange, directly connecting to the array from inside the Windows VM is the only way to accomplish that.
If you are going to use VMwares Round Robin you need to change the 'iops' value from 1000 to 3. Otherwise you will not get max benefit from multiple NICs.
Solution Title
HOWTO: Change IOPs value // Round Robin for MPIO in ESXi v5.x
Solution Details
Setting default policy for EQL devices to Round Robin. So new volumes discovered will be set to Round Robin
#esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_EQL
**These new volumes will still need to have the IOPs value changed.
To gather a list of devices use:
#esxcli storage nmp device list
You'll need the naa.<number> that corresponds to the EQL volumes in that list. That the "device number" that is used in the nextx command.
Existing volumes can be changed to Round Robin
#esxcli storage nmp device set -d naa.6090a098703e30ced7dcc413d201303e --psp=VMW_PSP_RR
You can set how many IOs are sent down one path before switching to the next. This is akin to rr_min_io under Linux.
NOTE: This will only work if the policy has been changed to Round Robin ahead of time.
The "naa.XXXXXXXXXXXXX" is the MPIO device name.
You can get a list of devices with:
#esxcli storage nmp device list
naa.6090a098703e5059e3e2e483c401f002
Device Display Name: EQLOGIC iSCSI Disk (naa.6090a098703e5059e3e2e483c401f002)
Storage Array Type: VMW_SATP_EQL
Storage Array Type Device Config: SATP VMW_SATP_EQL does not support device configuration.
Path Selection Policy: VMW_PSP_RR
Path Selection Policy Device Config: {policy=iops,iops=3,bytes=10485760,useANO=0;lastPathIndex=3: NumIOsPending=0,numBytesPending=0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba36:C0:T1:L0, vmhba36:C1:T1:L0, vmhba36:C2:T1:L0, vmhba36:C3:T1:L0
This also lets you confirm the path policy "VMW_PSP_RR" Which is VMware, Path Selection Policy, Round Robin" And not the IOPs value has already been set to '3'.
#esxcli storage nmp psp roundrobin deviceconfig set -d naa.6090a098703e30ced7dcc413d201303e -I 3 -t iops
#esxcli storage nmp psp roundrobin deviceconfig get -d naa.6090a098703e30ced7dcc413d201303e
Byte Limit: 10485760
Device: naa.6090a098703e30ced7dcc413d201303e
IOOperation Limit: 3
Limit Type: Iops
Use Active Unoptimized Paths: false
Lastly you need to disable 'DelayedAck' and 'LRO'
Configuring Delayed Ack in ESX 4.0 or 4.1
To implement this workaround in ESX 4.0 or 4.1, use the vSphere Client to disable delayed ACK.
Disabling Delayed Ack in ESX 4.x or 5.0
1. Log in to the vSphere Client and select the host.
2. Navigate to the Configuration tab.
3. Select Storage Adapters.
4. Select the iSCSI vmhba to be modified.
5. Click Properties.
6. Modify the delayed Ack setting using the option that best matches your site's needs, as follows:
Modify the delayed Ack setting on a discovery address (recommended).
A. On a discovery address, select the Dynamic Discovery tab.
B. Select the Server Address tab.
C. Click Settings.
D. Click Advanced.
Modify the delayed Ack setting on a specific target.
A. Select the Static Discovery tab.
B. Select the target.
C. Click Settings.
D. Click Advanced.
Modify the delayed Ack setting globally.
A. Select the General tab.
B. Click Advanced.
(Note: if setting globally you can also use vmkiscsi-tool
# vmkiscsi-tool vmhba41 -W -a delayed_ack=0)
7. In the Advanced Settings dialog box, scroll down to the delayed Ack setting.
8. Uncheck Inherit From parent. (Does not apply for Global modification of delayed Ack)
9. Uncheck DelayedAck.
10. Reboot the ESX host.
Solution Title
HOWTO: Disable LRO in ESX v4/v5
Solution Details
Within VMware, the following command will query the current LRO value.
# esxcfg-advcfg -g /Net/TcpipDefLROEnabled
To set the LRO value to zero (disabled):
# esxcfg-advcfg -s 0 /Net/TcpipDefLROEnabled
a server reboot is required.
Also make sure you Dell switches, (6224's?) have current firmware and flowcontrol is enabled, ports, spanning tree portfast is set, and you are NOT using the default VLAN. Put all the ports on another VLAN like 11 for example. Jumbo frames don't work well on default VLAN.
That should give you a great start.
Regards,
Social Media and Community ProfessionalIt's highly unlikely that you will need 6x GbE NICs for iSCSI with your configuration.
Two for ESX iSCSI use and two more for guest iSCSI initiators is best. I.e. if you want to take advantage of ASM/ME for SQL or Exchange, directly connecting to the array from inside the Windows VM is the only way to accomplish that.
If you are going to use VMwares Round Robin you need to change the 'iops' value from 1000 to 3. Otherwise you will not get max benefit from multiple NICs.
Solution Title
HOWTO: Change IOPs value // Round Robin for MPIO in ESXi v5.x
Solution Details
Setting default policy for EQL devices to Round Robin. So new volumes discovered will be set to Round Robin
#esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_EQL
**These new volumes will still need to have the IOPs value changed.
To gather a list of devices use:
#esxcli storage nmp device list
You'll need the naa.<number> that corresponds to the EQL volumes in that list. That the "device number" that is used in the nextx command.
Existing volumes can be changed to Round Robin
#esxcli storage nmp device set -d naa.6090a098703e30ced7dcc413d201303e --psp=VMW_PSP_RR
You can set how many IOs are sent down one path before switching to the next. This is akin to rr_min_io under Linux.
NOTE: This will only work if the policy has been changed to Round Robin ahead of time.
The "naa.XXXXXXXXXXXXX" is the MPIO device name.
You can get a list of devices with:
#esxcli storage nmp device list
naa.6090a098703e5059e3e2e483c401f002
Device Display Name: EQLOGIC iSCSI Disk (naa.6090a098703e5059e3e2e483c401f002)
Storage Array Type: VMW_SATP_EQL
Storage Array Type Device Config: SATP VMW_SATP_EQL does not support device configuration.
Path Selection Policy: VMW_PSP_RR
Path Selection Policy Device Config: {policy=iops,iops=3,bytes=10485760,useANO=0;lastPathIndex=3: NumIOsPending=0,numBytesPending=0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba36:C0:T1:L0, vmhba36:C1:T1:L0, vmhba36:C2:T1:L0, vmhba36:C3:T1:L0
This also lets you confirm the path policy "VMW_PSP_RR" Which is VMware, Path Selection Policy, Round Robin" And not the IOPs value has already been set to '3'.
#esxcli storage nmp psp roundrobin deviceconfig set -d naa.6090a098703e30ced7dcc413d201303e -I 3 -t iops
#esxcli storage nmp psp roundrobin deviceconfig get -d naa.6090a098703e30ced7dcc413d201303e
Byte Limit: 10485760
Device: naa.6090a098703e30ced7dcc413d201303e
IOOperation Limit: 3
Limit Type: Iops
Use Active Unoptimized Paths: false
Lastly you need to disable 'DelayedAck' and 'LRO'
Configuring Delayed Ack in ESX 4.0 or 4.1
To implement this workaround in ESX 4.0 or 4.1, use the vSphere Client to disable delayed ACK.
Disabling Delayed Ack in ESX 4.x or 5.0
1. Log in to the vSphere Client and select the host.
2. Navigate to the Configuration tab.
3. Select Storage Adapters.
4. Select the iSCSI vmhba to be modified.
5. Click Properties.
6. Modify the delayed Ack setting using the option that best matches your site's needs, as follows:
Modify the delayed Ack setting on a discovery address (recommended).
A. On a discovery address, select the Dynamic Discovery tab.
B. Select the Server Address tab.
C. Click Settings.
D. Click Advanced.
Modify the delayed Ack setting on a specific target.
A. Select the Static Discovery tab.
B. Select the target.
C. Click Settings.
D. Click Advanced.
Modify the delayed Ack setting globally.
A. Select the General tab.
B. Click Advanced.
(Note: if setting globally you can also use vmkiscsi-tool
# vmkiscsi-tool vmhba41 -W -a delayed_ack=0)
7. In the Advanced Settings dialog box, scroll down to the delayed Ack setting.
8. Uncheck Inherit From parent. (Does not apply for Global modification of delayed Ack)
9. Uncheck DelayedAck.
10. Reboot the ESX host.
Solution Title
HOWTO: Disable LRO in ESX v4/v5
Solution Details
Within VMware, the following command will query the current LRO value.
# esxcfg-advcfg -g /Net/TcpipDefLROEnabled
To set the LRO value to zero (disabled):
# esxcfg-advcfg -s 0 /Net/TcpipDefLROEnabled
a server reboot is required.
Also make sure you Dell switches, (6224's?) have current firmware and flowcontrol is enabled, ports, spanning tree portfast is set, and you are NOT using the default VLAN. Put all the ports on another VLAN like 11 for example. Jumbo frames don't work well on default VLAN.
That should give you a great start.
Regards,
#IWork4Dell
Get Support on Twitter - @dellcarespro
2015年7月23日 星期四
104暑假7月工作記錄
20150723
建立104 X磁碟目錄結構
設定 VM 連結VessR2600i
設定 MPIO
陸續搬移虛擬機 至 新儲存裝置
20150722
設定unifi AP * 6
VessR2600i 管理介面IP
連接VessR2600i 資料傳輸port * 4 整理機房線錄
20150721
研習開始
協助研習進行
20150720
設定 ezgo 使用者帳號 後 派送至電腦教室B
更新D104教室系統 遭遇 /system32/ntoskernel Error
還原時若要還原分割區 需使用專家模式 -j1 還原MBR 可避免錯誤發生
資料來源:http://sjjhwp.dcs.tn.edu.tw/wuhon/?p=6
原文:
win7異機還原+clonezilla注意事項
2.clonezilla最好以savedisk方式備份,若以savepart方式,會記住原硬碟大小的MBR,如原500G內有80G的win7,還原part時一樣要500G的硬碟大小以上才行,否則必須要用原始光碟重建MBR.
20150707
更新電腦教室B電腦
HP 400 G2
安裝win7 ezgo12
win7派送後 需重新啟用
multicast 派送速度 約 1.5G/min
單點最高可達 8G/min
F403電子白版 無法使用
重新連接 USB傳輸線後 可偵測到白板
在執行定位程式 即可使用
確認F301 B301網路電話 暫可堪用
建立104 X磁碟目錄結構
設定 VM 連結VessR2600i
設定 MPIO
陸續搬移虛擬機 至 新儲存裝置
20150722
設定unifi AP * 6
VessR2600i 管理介面IP
連接VessR2600i 資料傳輸port * 4 整理機房線錄
20150721
研習開始
協助研習進行
20150720
設定 ezgo 使用者帳號 後 派送至電腦教室B
更新D104教室系統 遭遇 /system32/ntoskernel Error
還原時若要還原分割區 需使用專家模式 -j1 還原MBR 可避免錯誤發生
資料來源:http://sjjhwp.dcs.tn.edu.tw/wuhon/?p=6
原文:
win7異機還原+clonezilla注意事項
1.win7必須先封裝,找到c:/windows/system32/Sysprep執行之,設定為"OOBE + 一般化 + 關機"
2.clonezilla最好以savedisk方式備份,若以savepart方式,會記住原硬碟大小的MBR,如原500G內有80G的win7,還原part時一樣要500G的硬碟大小以上才行,否則必須要用原始光碟重建MBR.
3.做的是(savedisk或savepart)映像檔,還原時若一定要還原到分割區,一定要選專家模式,加選-j1選項中還原原映像檔MBR
20150707
更新電腦教室B電腦
HP 400 G2
安裝win7 ezgo12
win7派送後 需重新啟用
multicast 派送速度 約 1.5G/min
單點最高可達 8G/min
F403電子白版 無法使用
重新連接 USB傳輸線後 可偵測到白板
在執行定位程式 即可使用
確認F301 B301網路電話 暫可堪用
訂閱:
文章 (Atom)


