[Dism] 查看Windows 10映像檔版本 – Check build and edition of Windows 10 iso

方法 可以直接以Windows打開ISO檔,ISO將會被自動掛載至新磁碟區 承上,掛載後即有絕對路徑如: H:\sources\install.esd 以磁碟H為範例 使用管理者權限執行dism確認檔案(cmd模式執行): Info with OS Build Version: dism /Get-WimInfo /WimFile:H:\sources\install.wim /index:1 If not found, use install.esd dism /Get-WimInfo /WimFile:H:\sources\boot.wim /index:1 Combo ISO: dism /Get-WimInfo /WimFile:H:\x86\sources\install.esd /index:1 dism /Get-WimInfo /WimFile:H:\x64\sources\install.esd /index:1 dism /Get-WimInfo /WimFile:H:\x86\sources\boot.wim /index:1 dism /Get-WimInfo […]

[Iptables] 防火牆設定指南 – iptables for CentOS & Ubuntu

Introduction CentOS & Ubuntu iptables guide. 其中CentOS我認為較方便設定。 指令與參數 快速阻擋一組IP(1.2.3.4/32)的所有連線: $ iptables -A INPUT -s 1.2.3.4/32 -j DROP 常用參數: –append -A :新增至Chain (預設`INPUT`, `FORWARD`, `OUTPUT`) –source -s :IP soruce –protocol -p :protocal –dport :目的Port,指服務Port (`–destination-port`) –jump -j :目標規則 (`ACCEPT`, `DROP`) 設定檔 […]

[MySQL] Master / Slave – MySQL Replica 指南

引言 MySQL Replica 相關指令及指南 安裝 MySQL官方文件:Chapter 16 Replication 安裝筆記可以參考:https://blog.longwin.com.tw/2008/03/mysql_replication_master_slave_set_2008/ Slave 狀態檢查 狀態查詢SQL SHOW slave STATUS; 建議使用command直式較好查看:SHOW slave STATUS \G; 忽略錯誤 SET GLOBAL SQL_SLAVE_SKIP_COUNTER =1; 可一次略過大量SQL數,建議逐筆Error Skip才不會漏 重新跟Master (錯誤後會停止) START SLAVE; 狀態識別 Key Description Master_Log_File IO Thread正在讀取Master的binlog Slave_IO_Running 是否在同步,正常為Yes Slave_SQL_Running 是否在同步,正常為Yes […]

[Linux] 快速查詢Linux發行版本與名稱(release & lsb_release)

引言 快速查詢各Linux發行版本與名稱,忘記時的好幫手… 查詢 快速指令lsb_release lsb_release -a 一般適用於Debian系列,Centos可能沒有。查詢結果範例: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial 通用查詢/etc/*-release ls -l /etc/*-release 不同的版本會有不同的*前綴,且最好查看內容別直接以前綴名稱當成版本。Centeos查詢結果範例: -rw-r–r–. 1 root root 27 2017-03-28 18:25 /etc/centos-release lrwxrwxrwx. 1 root root […]