MS SQL Server Management Studio Download page
https://msdn.microsoft.com/en-us//library/mt238290.aspx
2017年1月28日 星期六
2016年7月2日 星期六
AWS Certified Solutions Architect - Associate Level 考試心得
會去考AWS CSAA 是公司幫我安排考試日期,那時候是選兩個月後,不過那陣子工作真的很忙
一直忙到考前兩個星期,突然驚覺在不看書真的會陪考,
因此考前兩個星期每天下班都留在公司看AWS文件一~兩小時
當然這是我的心得,不見得每個人都有用,搞不好依照我的方法你會變成陪考。
大方向
Compute / Storage / Networking
這也是帳單裡面的主要組成,一般AWS使用者的帳單組成會由這三大項組成
這三大塊的產品都必須要有一定熟悉度
當然其他的產品服務也要看只是比重上我是以這三大塊為主。
官方網站的FAQ
請將所有的FAQ熟讀,個人認為熟讀FAQ+三個大方向應該就可以拿到60分了
白皮書
有幾類白皮書我因為火燒屁股了所以只好快速看過(其實我平常都有看,但是都是迅速帶過)
1. Security類
2. Architecture類
3. Backup/DR類
實際考試的時候,我認為一個很嚴重的問題是,英文考題對於英文程度不佳的我是很吃力的,
會花上很多時間在確認問題,因此我在沒辦法三十秒內了解題意的題目都會快速標記,先跳往下一題
最後大概有7~9題來不及Review
不過最後還是以 87%通過就是了。
下面是抱怨
一張只有兩年效期的證書,對我來說比起我碰過的專案經驗來說,這張證照沒啥價值,侷限性太大了
前前公司就聘請過一位滿身證照的考試高手, 在職場上只能說扎實的實務經驗,會比證照來的有話語權。
--------
更新一下,趕在CSAA過期前把PRO考過了,CSAP GET!,不過考前只有兩天時間準備看書,所以沒考得很好也就70%過而已。
感覺上Pro版的考試有一點虛,有一種為了要填滿證照架構硬搞出來的感覺,好吧也許Mater就會是真的真材實料,但會不會搞成像CCIE還得出國啊....
2016年5月16日 星期一
Samsung 手機安裝 Xposed Framework
三爽的手機都會自己把一些東西做修改,卻又沒有放出原始碼,因次常常很多功能到了三爽的手機就會不能用
最明顯的就是ART 因為三爽有做修改因此Xposed Framework在三爽的手機有一段很長的時間是不能裝Xposed Framework
本篇介紹的方法是給原廠韌體(Stock Firmware) 有Root過且有第三方Recovery的設備
在執行安裝前請先將手機進行完整備份 Nandroid Backup
首先要安裝
Xposed Installer 3.0 Alpha 4
將修改過的 Xposed Framework 下載回來
請到 XDA 下載
版本要根據手機的硬體去挑選
CPU/系統類型 支援32/64bit 的請選ARM64 不知道的話就查手機的CPU型號
Android 版本 5.1.x 選SDK22 / 6.x選SDK23 (台灣的NoteEdge N915G 6.x 要選alt + sdk23 )
以NoteEdge android 5.1.1來說 就是 ARM + SDK22
xposed-v84.0-sdk22-arm-custom-build-by-wanam
另外可以下載uninstaller 也一併放在手機的SD卡方便未來可以反安裝或升版
接著請重開手機到Recovery Mode / CWM或TWRP都可以
將Xposed Framework 安裝到系統 (這一步驟安裝應該很快)
重開機(這一步驟會需要比較多的時間)
最後進入Xposed Installer檢查 Framework是否正確啟用
建議安裝 Xprivacy
Reference: XDA
最明顯的就是ART 因為三爽有做修改因此Xposed Framework在三爽的手機有一段很長的時間是不能裝Xposed Framework
本篇介紹的方法是給原廠韌體(Stock Firmware) 有Root過且有第三方Recovery的設備
在執行安裝前請先將手機進行完整備份 Nandroid Backup
首先要安裝
Xposed Installer 3.0 Alpha 4
將修改過的 Xposed Framework 下載回來
請到 XDA 下載
版本要根據手機的硬體去挑選
CPU/系統類型 支援32/64bit 的請選ARM64 不知道的話就查手機的CPU型號
Android 版本 5.1.x 選SDK22 / 6.x選SDK23 (台灣的NoteEdge N915G 6.x 要選alt + sdk23 )
以NoteEdge android 5.1.1來說 就是 ARM + SDK22
xposed-v84.0-sdk22-arm-custom-build-by-wanam
另外可以下載uninstaller 也一併放在手機的SD卡方便未來可以反安裝或升版
接著請重開手機到Recovery Mode / CWM或TWRP都可以
將Xposed Framework 安裝到系統 (這一步驟安裝應該很快)
重開機(這一步驟會需要比較多的時間)
最後進入Xposed Installer檢查 Framework是否正確啟用
建議安裝 Xprivacy
Reference: XDA
2016年5月13日 星期五
在 Apache/IIS/Tomcat/Nginx 設定HSTS(HTTP Strict Transport Security)
google chrome 本身有檢測的功能
chrome://net-internals/#hsts
Apache 啟用HSTS
1.編輯 httpd.conf
將Header Module 註解拿掉(uncomment)
LoadModule headers_module modules/mod_headers.so
方法一:
在網站根目錄新增 .htaccess檔案
<IfModule mod_headers.c>
Header set Strict-Transport-Security: max-age=10886400
</IfModule>
方法二:
在VirtualHost區域增加Header設定
<VirtualHost www.example.com:80>
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
</VirtualHost>
2.重啟Apache
IIS 啟用 HSTS
方法一:
1.打開IIS管理工具,選擇要設定的站點
2.HTTP回應標頭點兩下,並在右邊功能列選新增
3.新增回應標頭內容
名稱:Strict-Transport-Security
值:max-age=10886400
方法二:
1.在Web.Config設定
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=31536000"/>
</customHeaders>
</httpProtocol>
</system.webServer>
Tomcat 啟用HSTS
Tomcat 7,8 or above enable "HTTP Header Security Filter"
1.編輯tomcat/conf/web.xml
2.找到httpheadersecurity這個filter,並把前後的註解拿掉
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<async-supported>true</async-supported>
</filter>
3.在步驟2的filter class後面新增
<init-param>
<param-name>hstsMaxAgeSeconds</param-name>
<param-value>31536000</param-value>
</init-param>
4.找到filter mapping 並將前後的註解拿掉
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
NGINX 啟用HSTS
1.編輯設定檔,在Server區塊下新增設定
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
2.重啟服務
chrome://net-internals/#hsts
Apache 啟用HSTS
1.編輯 httpd.conf
將Header Module 註解拿掉(uncomment)
LoadModule headers_module modules/mod_headers.so
方法一:
在網站根目錄新增 .htaccess檔案
<IfModule mod_headers.c>
Header set Strict-Transport-Security: max-age=10886400
</IfModule>
方法二:
在VirtualHost區域增加Header設定
<VirtualHost www.example.com:80>
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
</VirtualHost>
2.重啟Apache
IIS 啟用 HSTS
方法一:
1.打開IIS管理工具,選擇要設定的站點
2.HTTP回應標頭點兩下,並在右邊功能列選新增
3.新增回應標頭內容
名稱:Strict-Transport-Security
值:max-age=10886400
方法二:
1.在Web.Config設定
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=31536000"/>
</customHeaders>
</httpProtocol>
</system.webServer>
Tomcat 啟用HSTS
Tomcat 7,8 or above enable "HTTP Header Security Filter"
1.編輯tomcat/conf/web.xml
2.找到httpheadersecurity這個filter,並把前後的註解拿掉
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<async-supported>true</async-supported>
</filter>
3.在步驟2的filter class後面新增
<init-param>
<param-name>hstsMaxAgeSeconds</param-name>
<param-value>31536000</param-value>
</init-param>
4.找到filter mapping 並將前後的註解拿掉
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
NGINX 啟用HSTS
1.編輯設定檔,在Server區塊下新增設定
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
2.重啟服務
2015年12月23日 星期三
Huawei WS880 Merlin firmware /華為WS880第三方韌體刷機紀錄
Huawei WS880 AC1750 路由器 最近價格跳水 註:2015/12
在MOMO購物上以NT$2350取得/其他AC1750 價格落在NT$4000左右
遽聞P家有過1999的價格可惜當下不知道
不過我對官方韌體不是很有愛,因此確認有第三方韌體之後就給他買入
INFO: 回復模式
1.拔掉電源
2.按住reset , 插入電源 20秒後放開reset
3. http://192.168.1.1 進入回復模式 網頁標題可能是 Huawei – Emergent Upgrade Page
*救援模式進不去的話要多試幾次。
由於原始bootloader有鎖定因此要先用回復模式刷入修改過的bootloader
刷機之前要修改Bootloader也就是會喪失保固請注意
刷機步驟
1. 下載CFEEdit 修改工具 CFEEdit V1.1
2. 下載WS880 CFE WS880_Trans.rar
3. 使用CFEEdit 編輯 解開的WS880_Trans.Bin
et0macaddr = 11:22:33:44:55:66這邊替換成機背後面的MAC
secret_code = 網路上說這是要跟無線網路的密碼一致,不過這個應該是WPS的pin code
4.進入回復模式[http://192.168.1.1]刷入修改好的WS880_Trans.Bin
5.等待一兩分鐘後重新進入回復模式[http://192.168.1.1]這時候網頁標題應該會是 CFE miniWeb Server
6.刷入第三方韌體,刷機完成後大概會需要3~5分鐘重開機
2020/12/31 更新
可使用的第三方韌體
1.XWRT-Vortex(ASUSWRT-Merlin) 推薦!!!
2.AdvancedTomato
3.DD-WRT
4.Tomao by shibby
註1:很多人會有進不去緊急模式的困擾
我的作法很簡單首先 先將IP設定為手動設定 192.168.0.123
然後手動增加另一組固定IP 192.168.1.123

然後開啟兩個命令列視窗 一個ping -t 192.168.0.1 一個 ping -t 192.168.1.1
將WS880 重開進 緊急模式,
如果ping 192.168.0.1有回應就代表沒有成功開進緊急模式
如果ping 192.168.1.1有回應就代表有成功開進緊急模式
參考來源
https://nap6.com/question/612
在MOMO購物上以NT$2350取得/其他AC1750 價格落在NT$4000左右
遽聞P家有過1999的價格可惜當下不知道
不過我對官方韌體不是很有愛,因此確認有第三方韌體之後就給他買入
INFO: 回復模式
1.拔掉電源
2.按住reset , 插入電源 20秒後放開reset
3. http://192.168.1.1 進入回復模式 網頁標題可能是 Huawei – Emergent Upgrade Page
*救援模式進不去的話要多試幾次。
由於原始bootloader有鎖定因此要先用回復模式刷入修改過的bootloader
刷機之前要修改Bootloader也就是會喪失保固請注意
刷機步驟
1. 下載CFEEdit 修改工具 CFEEdit V1.1
2. 下載WS880 CFE WS880_Trans.rar
3. 使用CFEEdit 編輯 解開的WS880_Trans.Bin
et0macaddr = 11:22:33:44:55:66這邊替換成機背後面的MAC
secret_code = 網路上說這是要跟無線網路的密碼一致,不過這個應該是WPS的pin code
4.進入回復模式[http://192.168.1.1]刷入修改好的WS880_Trans.Bin
5.等待一兩分鐘後重新進入回復模式[http://192.168.1.1]這時候網頁標題應該會是 CFE miniWeb Server
6.刷入第三方韌體,刷機完成後大概會需要3~5分鐘重開機
2020/12/31 更新
目前大部分的韌體都已經停止更新了
剩下FreshTomato 在2020/12/20還有更新
可使用的第三方韌體
1.XWRT-Vortex(ASUSWRT-Merlin) 推薦!!!
2.AdvancedTomato
3.DD-WRT
4.Tomao by shibby
註1:很多人會有進不去緊急模式的困擾
我的作法很簡單首先 先將IP設定為手動設定 192.168.0.123
然後手動增加另一組固定IP 192.168.1.123
然後開啟兩個命令列視窗 一個ping -t 192.168.0.1 一個 ping -t 192.168.1.1
將WS880 重開進 緊急模式,
如果ping 192.168.0.1有回應就代表沒有成功開進緊急模式
如果ping 192.168.1.1有回應就代表有成功開進緊急模式
參考來源
https://nap6.com/question/612
標籤:
刷機,
Networking,
WS880
2015年8月8日 星期六
Samsung Note Edge Root / Recovery / Info / 刷機 / Firmware
SM-N915G 不同型號不適用會有變磚的可能
INFO
1. 進入 Downloading Mode
關機
按住Home +音量鍵下 +電源
2.進入Recovery Mode
關機
按住Home +音量鍵上 +電源
3.刷機軟體Odin
下載
刷Recovery
下載CWM 或 TWRP
檔案下載檔名包含N915G
進入Download mode
執行 Odin / 點 AP選剛剛 下載的recovery tar檔
刷完可以進入Recovery Mode確認
刷root
下載SuperSU
檔案放進手機
進Recovery Mode
Install Zip from sdcard...收工
刷回原廠韌體
下載 原廠韌體
進入Download Mode
選AP選解壓縮出來的韌體
刷第三方韌體
XDA
型號要符合 還有前置需求需要確認 有的要Wipe有的要特定版韌體
2015年3月12日 星期四
AWS T1.Micro 轉 T2.Micro 流程
T1.Micro 轉 T2.Micro 流程
前置準備(此步驟為AWS Console作業)
0.T1.Micro 要預先裝好GRUB 沒裝後面也不用做了
1.主機 開啟一台作業用EC2 命名EC2-Working
2.T1.Micro 建立Snapshot -->建立 Volume (T1.Micro.Source)
3.建立目的地Volume (T2.Micro.Dest)
4.將T1.Micro.Source 掛載到EC2-Working的 /dev/sdm
5.將T2.Micro.Dest 掛載到EC2-Working的 /dev/sdo
T2.Micro.Dest 處理作業(以下作業皆使用root權限)
1.建立Partition
#parted /dev/xvdo --script 'mklabel msdos mkpart primary 1M -1s print quit'
2.Partion偵測
#partprobe /dev/xvdo
3.udev偵測
#udevadm settle
T1.Micro.Source 處理作業
1.檔案系統檢查
#e2fsck -f /dev/xvdm
2.Resize檔案系統
#resize2fs -M /dev/xvdm
3.記下輸出的數值
- Output from resize command:
Resizing the filesystem on /dev/xvdm to 1391485 (4k) blocks.
The filesystem on /dev/xvdm is now 1391485 blocks long.
將T1.Micro.Source複製到T2.Micro.Dest
1.Disk Dump
#dd if=/dev/xvdm of=/dev/xvdo1 bs=4K count=1391485 輸入剛剛查出的數值
2.完成後Resize
#resize2fs /dev/xvdo1
Grub 安裝前置準備
# mount /dev/xvdo1 /mnt
# cp -a /dev/xvdo /dev/xvdo1 /mnt/dev/
# rm -f /mnt/boot/grub/*stage*
# cp /mnt/usr/*/grub/*/*stage* /mnt/boot/grub/
# rm -f /mnt/boot/grub/device.map
Grub 安裝
# cat <> device (hd0) /dev/xvdo
> root (hd0,0)
> setup (hd0)
> EOF
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> device (hd0) /dev/xvdo
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 31 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+31 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
刪除Temp Device
# rm -f /mnt/dev/xvdo /mnt/dev/xvdo1
Grub設定更新
#vi /mnt/boot/grub/menu.lst
下列內容要修改
root (hd0) 改成 root (hd0,0)
console=* 改成 console=ttyS0
在kernel 參數後面追加 xen_pv_hvm=enable
example:
# created by imagebuilder
default=0
timeout=1
hiddenmenu
title Amazon Linux 2014.03 (3.10.42-52.145.amzn1.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-3.10.42-52.145.amzn1.x86_64 root=LABEL=/ console=ttyS0 LANG=ja_JP.UTF-8 KEYTABLE=us xen_pv_hvm=enable
initrd /boot/initramfs-3.10.42-52.145.amzn1.x86_64.img
更新檔案系統表
#vi /mnt/etc/fstab
若沒有其他設定要追加可以不做修改
修改檔案系統標簽
# e2label /dev/xvdo1 /
# sync
# umount /mnt
檔案系統掛載
1.新增一T2.Micro Instance
2.待開機完成後,關機並且將原來的 Root EBS detach(可順便把該volume刪除)
3.將T2.Micro.Dest 掛載到 /dev/xvda
4.開機,登入驗證
reference:
1.https://forums.aws.amazon.com/thread.jspa?messageID=553638
2.http://www.agilegroup.co.jp/technote/t1micro-to-t2micro-migration.html
前置準備(此步驟為AWS Console作業)
0.T1.Micro 要預先裝好GRUB 沒裝後面也不用做了
1.主機 開啟一台作業用EC2 命名EC2-Working
2.T1.Micro 建立Snapshot -->建立 Volume (T1.Micro.Source)
3.建立目的地Volume (T2.Micro.Dest)
4.將T1.Micro.Source 掛載到EC2-Working的 /dev/sdm
5.將T2.Micro.Dest 掛載到EC2-Working的 /dev/sdo
T2.Micro.Dest 處理作業(以下作業皆使用root權限)
1.建立Partition
#parted /dev/xvdo --script 'mklabel msdos mkpart primary 1M -1s print quit'
2.Partion偵測
#partprobe /dev/xvdo
3.udev偵測
#udevadm settle
T1.Micro.Source 處理作業
1.檔案系統檢查
#e2fsck -f /dev/xvdm
2.Resize檔案系統
#resize2fs -M /dev/xvdm
3.記下輸出的數值
- Output from resize command:
Resizing the filesystem on /dev/xvdm to 1391485 (4k) blocks.
The filesystem on /dev/xvdm is now 1391485 blocks long.
將T1.Micro.Source複製到T2.Micro.Dest
1.Disk Dump
#dd if=/dev/xvdm of=/dev/xvdo1 bs=4K count=1391485 輸入剛剛查出的數值
2.完成後Resize
#resize2fs /dev/xvdo1
Grub 安裝前置準備
# mount /dev/xvdo1 /mnt
# cp -a /dev/xvdo /dev/xvdo1 /mnt/dev/
# rm -f /mnt/boot/grub/*stage*
# cp /mnt/usr/*/grub/*/*stage* /mnt/boot/grub/
# rm -f /mnt/boot/grub/device.map
Grub 安裝
# cat <
> root (hd0,0)
> setup (hd0)
> EOF
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> device (hd0) /dev/xvdo
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 31 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+31 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
刪除Temp Device
# rm -f /mnt/dev/xvdo /mnt/dev/xvdo1
Grub設定更新
#vi /mnt/boot/grub/menu.lst
下列內容要修改
root (hd0) 改成 root (hd0,0)
console=* 改成 console=ttyS0
在kernel 參數後面追加 xen_pv_hvm=enable
example:
# created by imagebuilder
default=0
timeout=1
hiddenmenu
title Amazon Linux 2014.03 (3.10.42-52.145.amzn1.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-3.10.42-52.145.amzn1.x86_64 root=LABEL=/ console=ttyS0 LANG=ja_JP.UTF-8 KEYTABLE=us xen_pv_hvm=enable
initrd /boot/initramfs-3.10.42-52.145.amzn1.x86_64.img
更新檔案系統表
#vi /mnt/etc/fstab
若沒有其他設定要追加可以不做修改
修改檔案系統標簽
# e2label /dev/xvdo1 /
# sync
# umount /mnt
檔案系統掛載
1.新增一T2.Micro Instance
2.待開機完成後,關機並且將原來的 Root EBS detach(可順便把該volume刪除)
3.將T2.Micro.Dest 掛載到 /dev/xvda
4.開機,登入驗證
reference:
1.https://forums.aws.amazon.com/thread.jspa?messageID=553638
2.http://www.agilegroup.co.jp/technote/t1micro-to-t2micro-migration.html
計算機容量單位
1 bit = 0 or 1
1 Byte = 8 bit
1 KB = 1024 Bytes(KiloBytes) 10^3
1 MB = 1024 KB(MegaBytes) 10^6
1 GB = 1024 MB(GigaBytes) 10^9
1 TB = 1024 GB(TeraBytes) 10^12
1 PB = 1024 TB(PetaBytes) 10^15
1 EB = 1024 PB(ExaBytes) 10^18
1 ZB = 1024 EB(ZettaBytes) 10^21
1 YB = 1024 ZB(YottaBytes) 10^24
1 BB = 1024 YB(BrontoBytes) 10^27
1 Byte = 8 bit
1 KB = 1024 Bytes(KiloBytes) 10^3
1 MB = 1024 KB(MegaBytes) 10^6
1 GB = 1024 MB(GigaBytes) 10^9
1 TB = 1024 GB(TeraBytes) 10^12
1 PB = 1024 TB(PetaBytes) 10^15
1 EB = 1024 PB(ExaBytes) 10^18
1 ZB = 1024 EB(ZettaBytes) 10^21
1 YB = 1024 ZB(YottaBytes) 10^24
1 BB = 1024 YB(BrontoBytes) 10^27
2015年1月16日 星期五
ubuntu 常用資訊
[network]
檢查抓到哪些網路裝置
ls /sys/class/net
啟用
ifconfig eth0 up
promisc mode
ifconfig eth0 promisc on
寫入設定檔
/etc/network/interface
auto eth0
iface eth0 inet dhcp
---
iface eth0 inet manual
up ip link set $IFACE promisc on
---
iface eth0 inet static
address 1.1.1.1
gateway 1.1.1.254
netmask 255.255.255.0
network 1.1.1.0
broadcast 1.1.1.255
---
DNS
dns-nameservers 8.8.8.8
[更新]
apt update
apt upgrade
[安裝軟體]
apt install xxxxx
待整理.......
檢查抓到哪些網路裝置
ls /sys/class/net
啟用
ifconfig eth0 up
promisc mode
ifconfig eth0 promisc on
寫入設定檔
/etc/network/interface
auto eth0
iface eth0 inet dhcp
---
iface eth0 inet manual
up ip link set $IFACE promisc on
---
iface eth0 inet static
address 1.1.1.1
gateway 1.1.1.254
netmask 255.255.255.0
network 1.1.1.0
broadcast 1.1.1.255
---
DNS
dns-nameservers 8.8.8.8
[更新]
apt update
apt upgrade
[安裝軟體]
apt install xxxxx
待整理.......
2014年10月27日 星期一
EC2 使用多個EIP
使用在AWS公有雲環境下要使用EC2有時候會有多Public IP需求
不過AWS在使用上會有一些限制
1. 預設EIP 只能使用五個,超過要申請
2. 每一種Instance Type 所能接的網卡跟每一張網卡能使用的IP又不一樣
以Free Tier包含的T2.Micro來說 最高可以接兩張網卡,每一張網卡可以配置兩個IP(Private) 也就是說
一台T2.Micro最多可以配置4個IP(Private)
而EIP(Public)的使用上是一對一對應,有幾個Private IP就可以對應幾個EIP
*注意AWS 沒辦法多個EIP對應到單一IP
ref:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html
EC2 Using Multiple EIP Limit
不過AWS在使用上會有一些限制
1. 預設EIP 只能使用五個,超過要申請
2. 每一種Instance Type 所能接的網卡跟每一張網卡能使用的IP又不一樣
以Free Tier包含的T2.Micro來說 最高可以接兩張網卡,每一張網卡可以配置兩個IP(Private) 也就是說
一台T2.Micro最多可以配置4個IP(Private)
而EIP(Public)的使用上是一對一對應,有幾個Private IP就可以對應幾個EIP
*注意AWS 沒辦法多個EIP對應到單一IP
ref:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html
EC2 Using Multiple EIP Limit
2014年7月1日 星期二
手動安裝apache+php
在2014的年中,因為客戶的需求需要很舊版的Apache+PHP+Mysql Client
使用yum 安裝只裝的到新版本因此必須手動安裝
OS: CentOS
首先要先把基本的工具跟Library裝好
部分Library 會有太新的問題<就必須抓舊版的回來裝
gcc
autoconf
freetype-devel.x86_64
zlib-devel.x86_64
libxml2-devel
gd-devel.x86_64
libjpeg-turbo-devel.x86_64
libpng-devel.x86_64
libmcrypt-devel.x86_64
libtool-ltdl-devel
mysql mysql-devel mysql-lib
#新作業系統都是64 library需要指定一下
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib
#太舊的PHP不支援openssl 1.x.x 要手動裝
openssl 0.9.8
./config --prefix=/usr/local/openssl
make install_sw # 不安裝說明文件
apache2
/configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/openssl
php5
./configure --prefix=/usr/local/php5 --with-mysql=/opt --with-gd=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --with-libxml-dir=/usr/local/libxml2/ --with-zlib-dir=/opt --with-mcrypt=/opt --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli
使用yum 安裝只裝的到新版本因此必須手動安裝
OS: CentOS
首先要先把基本的工具跟Library裝好
部分Library 會有太新的問題<就必須抓舊版的回來裝
gcc
autoconf
freetype-devel.x86_64
zlib-devel.x86_64
libxml2-devel
gd-devel.x86_64
libjpeg-turbo-devel.x86_64
libpng-devel.x86_64
libmcrypt-devel.x86_64
libtool-ltdl-devel
mysql mysql-devel mysql-lib
#新作業系統都是64 library需要指定一下
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib
#太舊的PHP不支援openssl 1.x.x 要手動裝
openssl 0.9.8
./config --prefix=/usr/local/openssl
make install_sw # 不安裝說明文件
apache2
/configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/openssl
php5
./configure --prefix=/usr/local/php5 --with-mysql=/opt --with-gd=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --with-libxml-dir=/usr/local/libxml2/ --with-zlib-dir=/opt --with-mcrypt=/opt --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli
#修改啟動稿
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
vi /etc/rc.d/init.d/httpd
在 #!/bin/sh 下面加入以下兩行
# chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Server
設定啟動狀態
chkconfig --add httpd
chkconfig httpd on
2013年9月2日 星期一
Win7 試用延期
Win7 試用延期
第一次 安裝完 30天後 slmgr -rearm (可以三次90天)
接下來改機碼 八次+rearm (240天)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform
SkipRearm 設定成1
重開機後就可以再次slmgr -rearm (可以操作八次)
累加可以試用360天
第一次 安裝完 30天後 slmgr -rearm (可以三次90天)
接下來改機碼 八次+rearm (240天)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform
SkipRearm 設定成1
重開機後就可以再次slmgr -rearm (可以操作八次)
累加可以試用360天
2013年8月16日 星期五
AD 故障排除筆記
當要打開群組原則卻發現跳出下面的訊息
無法開啟 [群組原則] 物件。您可能沒有足夠的權限。
系統找不到指定的路徑。
常見於AD的SYSVOL中群組原則的目錄損毀或遺失
解決方法:
從備份還原或是手動把目錄建回來
目錄
%SystemRoot%\Sysvol\Sysvol\DomainName
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies
%Systemroot%\sysvol\sysvol\domainname\policies\{guid}
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies\{GUID}\Machine
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies\{GUID}\User
\\AD server\SYSVOL\DomainName\Policies <--- p="">
目錄名稱必須符合GUID格式前後加上大括號也就是 {GUID}
GUID可以在AD 使用者與電腦 管理工具中 打開進階檢視
在System下的Policies目錄下獲得--->
另一種解法
Windows 2000 : Windows 2000 Default Group Policy Restore Tool
Windows 2003/2008: 內建的 DCGPOFix
Tools:
Ultrasound - Monitoring and Troubleshooting Tool for File Replication Service (FRS)
reference:
http://www.microsoft.com/taiwan/technet/columns/profwin/38-winserver.mspx
http://blogs.technet.com/b/grouppolicy/archive/2008/10/16/restoring-default-domain-policies-to-their-defaults.aspx
2013年7月3日 星期三
2013年6月10日 星期一
網域時間同步設定
先查詢PDC 位於哪台Server
netdom query fsmo
1.登入PDC角色所在的網域控制站
2.輸入下列命令 (使用國家時間與頻率標準實驗室時間伺服器)
W32tm /config /manualpeerlist:time.stdtime.gov.tw /syncfromflags:manual
3.更新windows 時間服務設定
W32tm /config /update
或 Net stop w32time Net start w32time
dcdiag 查看是否有其他錯誤訊息
netdom query fsmo
1.登入PDC角色所在的網域控制站
2.輸入下列命令 (使用國家時間與頻率標準實驗室時間伺服器)
W32tm /config /manualpeerlist:time.stdtime.gov.tw /syncfromflags:manual
3.更新windows 時間服務設定
W32tm /config /update
或 Net stop w32time Net start w32time
dcdiag 查看是否有其他錯誤訊息
標籤:
Active Directory,
NTP
2013年5月8日 星期三
如何透過群組原則設定校時伺服器
Instructions
- 1Click the Windows "Start" button and select "Programs." Click "Administrative Tools" and then click "Group Policy Editor." This opens your GPO object console editor.
- 2Click "Computer Configuration" on the left panel to expand a list of options. Click "Administrative Templates," "System," then "Windows Time Service."
- 3Click the "Time Providers" key in the central pane. This is where you set the NTP group policy for your network users.
- 4Double-click "Windows NTP Server." Enter your central server name you want to use as the NTP server. This is typically the domain controller for the network. Click "OK" to save the changes.
- 5Close the GPO editor. It may take several minutes for the group policy to propagate on the network and your users' computers to synchronize with the central server clock.
- 1
Reference: How to Set a NTP Server Group Policy | eHow.com http://www.ehow.com/how_6764132_set-ntp-server-group-policy.html#ixzz2SgjDyIkV
oracle trace file [.trm] [.trc]
oracle version:11g
TRM Trace Files Getting Generated in 11g Database (Doc ID 750982.1)
Excessive Number Of Arc Trace Files Generated In 11g (Doc ID 754289.1)
Trace file in 11g belongs to ADR (Automatic Diagnostic Repository) you can manage it by using its Command Interpreter ADRCI:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#SUTIL700
It's possible to set the Purging Policy with the SET CONTROL statement:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#BGBEGAEB
You can purge Trace Files by using the PURGE statement:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#SUTIL1509
In addition, to remove Traces Files in the "CDMP_" directories, you may use the Type UTSCDMP as follow. For instance, to remove Trace files older than 1 hour in "CDMP_" directories:
adrci> purge -age 60 -type UTSCDMP
reference: https://forums.oracle.com/forums/thread.jspa?threadID=943615
TRM Trace Files Getting Generated in 11g Database (Doc ID 750982.1)
Excessive Number Of Arc Trace Files Generated In 11g (Doc ID 754289.1)
Trace file in 11g belongs to ADR (Automatic Diagnostic Repository) you can manage it by using its Command Interpreter ADRCI:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#SUTIL700
It's possible to set the Purging Policy with the SET CONTROL statement:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#BGBEGAEB
You can purge Trace Files by using the PURGE statement:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/adrci.htm#SUTIL1509
In addition, to remove Traces Files in the "CDMP_
adrci> purge -age 60 -type UTSCDMP
reference: https://forums.oracle.com/forums/thread.jspa?threadID=943615
2012年10月29日 星期一
How to fix exchange outlook connection issues over ipsec vpn
Juniper Firewall
show configuration security flow tcp-mss { ipsec-vpn { mss 1350; }
show configuration security zones security-zone trust tcp-rst;
set security alg msrpc disable
reference:
1: http://www.itsyourip.com/Windows/how-to-fix-exchange-outlook-connection-issues-over-ipsec-vpn/
2: http://forums.juniper.net/t5/SRX-Services-Gateway/Outlook-2003-Email-Issue/td-p/39690
show configuration security flow tcp-mss { ipsec-vpn { mss 1350; }
show configuration security zones security-zone trust tcp-rst;
set security alg msrpc disable
reference:
1: http://www.itsyourip.com/Windows/how-to-fix-exchange-outlook-connection-issues-over-ipsec-vpn/
2: http://forums.juniper.net/t5/SRX-Services-Gateway/Outlook-2003-Email-Issue/td-p/39690
標籤:
Juniper,
Networking
2012年10月24日 星期三
Windows MaxUserPort and TcpTimedWaitDelay adjust parameter
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
dword
MaxUserPort = 65000
TcpTimedWaitDelay =30s
dword
MaxUserPort = 65000
TcpTimedWaitDelay =30s
標籤:
Tuning,
Web Service,
Windows Server
How to delete windows services
sc delete ServiceName
if ServiceName have space than
sc delete “Service Name”
if ServiceName have space than
sc delete “Service Name”
訂閱:
文章 (Atom)


