<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2108747430750349024</id><updated>2024-09-08T20:53:26.106+08:00</updated><category term="linux"/><category term="CentOS"/><category term="windows"/><category term="Perl"/><category term="PHP"/><category term="ftp"/><category term="apache"/><category term="mysql"/><category term="硬體"/><category term="bash shell"/><category term="DNS"/><category term="DRBD"/><category term="RHEL"/><category term="openldap"/><category term="postfix"/><category term="solaris"/><category term="虛擬化"/><category term="google"/><category term="mssql"/><category term="vim"/><category term="GCP"/><category term="GNU"/><category term="Openwebmail"/><category term="SSH"/><category term="autofs"/><category term="batch"/><category term="clamav"/><category term="debian"/><category term="hardware"/><category term="lvm"/><category term="openoffice"/><category term="openssl"/><category term="samba"/><category term="sendmail"/><category term="tomcat"/><title type='text'>Beakdoosan&#39;s Weblog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>179</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-3086801731552379989</id><published>2020-01-05T23:27:00.001+08:00</published><updated>2020-01-05T23:27:32.188+08:00</updated><title type='text'>Ubuntu 上更換 DBeaver 語系問題</title><summary type="text">DBeaver 啟動時會判斷電腦的語系並自動切換為中文，不過實在是看不慣
簡體中文，透過界面上調整語系後卻出現存取錯誤的訊息：

Can&#39;t save startup configuration - access denied. You could try to change national locale manually in &#39;/usr/share/dbeaver/dbeaver.ini&#39;. Refer to readme.txt file for details. /usr/share/dbeaver/dbeaver.ini /usr/share/dbeaver/dbeaver.ini

在讀了 readme.txt 後依照說明在 dbeaver.ini 新增 -nl en 但重啟軟體還是無效，最後在網路上找到在 --add-modules 下方，新增 </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/3086801731552379989/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2020/01/ubuntu-dbeaver.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3086801731552379989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3086801731552379989'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2020/01/ubuntu-dbeaver.html' title='Ubuntu 上更換 DBeaver 語系問題'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-1709151718756216574</id><published>2020-01-03T00:21:00.000+08:00</published><updated>2020-01-03T01:06:40.377+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="postfix"/><title type='text'>Postfix阻擋垃圾郵件的方式</title><summary type="text">
從郵件標頭進行判斷過濾

#在 main.cf 啟用標頭檢查
shell&amp;gt;# vim /etc/postfix/main.cf
header_checks = pcre:/etc/postfix/header_check

#在 header_check 新增過濾條件
#建議過濾條件的訊息給予特定的代號，你才會知道郵件被哪一條規則阻擋，方便除錯
shell&amp;gt;# vim /etc/postfix/header_check

#過多的收件者或CC通常是垃圾信，以下表示過濾掉15個以上的收件者
/^To: (?:[^@]*@){15,}.*/&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DISCARD Discard by rule H01
/^</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/1709151718756216574/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2020/01/postfix.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1709151718756216574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1709151718756216574'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2020/01/postfix.html' title='Postfix阻擋垃圾郵件的方式'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8411347267270603472</id><published>2017-10-22T00:18:00.002+08:00</published><updated>2017-10-26T16:03:11.149+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GCP"/><category scheme="http://www.blogger.com/atom/ns#" term="SSH"/><title type='text'>用 SSH 金鑰登入 GCP</title><summary type="text">
#於伺服器建立新使用者帳號
shell&amp;gt;# useradd username -C &quot;新使用者&quot;

#建立金鑰，執行過程會要求輸入密碼，建議還是要有密碼，若金鑰掉了還有道密碼卡著
shell&amp;gt;# su username
shell&amp;gt;$ mkdir .ssh
shell&amp;gt;$ ssh-genkey -t rsa -f .ssh/username-key -C &quot;username&quot;

#可以看到公鑰及私鑰
shell&amp;gt;$ ls .ssh
username-key
username-key.pub

#調整私鑰權限
shell&amp;gt;$ chmod 400 .ssh/username-key

#複製公鑰的內容，將內容新增到GCP的【中繼資料】 &amp;gt; 【ssh金鑰】中
shell&amp;gt;$ cat .ssh/username-key.pub









</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8411347267270603472/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2017/10/ssh-gcp.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8411347267270603472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8411347267270603472'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2017/10/ssh-gcp.html' title='用 SSH 金鑰登入 GCP'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFdGTEYb0AD45zOIoJz0v2i0soSlH5AZ1_o_4PGvX4xQXxS3UcnK0q8ulIVXoCL8RtIazd1yLl_N6OIHI7ihakCHEebCR0lDEbl4esB0ArVgCjAcZ-5IJEMZ693QthjZvJSsJF_VzqaEY/s72-c/Image+1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-5248216303478869984</id><published>2017-04-16T00:05:00.002+08:00</published><updated>2017-04-16T00:05:45.624+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash shell"/><title type='text'>bash 的 history-search-backward 功能</title><summary type="text">在 bash 按下鍵盤的上或下來可顯示先前輸入的指令，若加上 history-search-backward 和 history-search-forward 會更好用，可惜預設並沒有啟用，有了這個你可以輸入 vim 然後按上或下來搜尋先前輸入 vim 開頭的指令，設定方式如下

首先利用showkey找出鍵盤的代碼
shell&amp;gt;$ showkey -a

Press any keys - Ctrl-D will terminate this program
出現上述提示訊息後，請按下鍵盤的上
^[[A&amp;nbsp;&amp;nbsp; 27 0033 0x1b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 91 0133 0x5b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65 0101</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/5248216303478869984/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2017/04/bash-history-search-backward.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5248216303478869984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5248216303478869984'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2017/04/bash-history-search-backward.html' title='bash 的 history-search-backward 功能'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-1807838827205409366</id><published>2016-12-17T20:54:00.000+08:00</published><updated>2016-12-17T23:17:41.903+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="autofs"/><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><title type='text'>autofs 內建的 -host map 用法</title><summary type="text">/etc/auto.master 有個預設設定&quot;/net &amp;nbsp; &amp;nbsp;-hosts&quot;，啟用時系統會將 key (主機名稱)拋給 /etc/auto.net 來掛載 NFS 磁碟，詳細運作方式可以看一下 /etc/auto.net 這個腳本程式

假設我們有個 NFS 磁碟，利用 showmount 可查出以下資訊
shell&amp;gt;# showmount -e 192.168.1.100
Export list for 192.168.1.100
/volume1/project 192.168.1.1

假設這個 NFS 主機名稱為 mike，在 /etc/hosts 新增以下設定
shell&amp;gt;# echo &quot;192.168.1.100 &amp;nbsp;mike&quot; &amp;gt;&amp;gt; /etc/hosts

在 /net 下建立 mike 目錄，若無法建立目錄時，請確認</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/1807838827205409366/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2016/12/autofs-host-map.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1807838827205409366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1807838827205409366'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2016/12/autofs-host-map.html' title='autofs 內建的 -host map 用法'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-2846656471690175122</id><published>2016-12-11T19:10:00.000+08:00</published><updated>2016-12-11T19:10:05.241+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash shell"/><title type='text'>base64 加解密</title><summary type="text">加密
shell&amp;gt;# echo &#39;要加密的字串&#39; | base64
6KaB5Yqg5a+G55qE5a2X5LiyCg==
shell&amp;gt;#

解密
shell&amp;gt;# echo &#39;6KaB5Yqg5a+G55qE5a2X5LiyCg==&#39; | base64 -d -i
要加密的字串
shell&amp;gt;#</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/2846656471690175122/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2016/12/base64.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/2846656471690175122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/2846656471690175122'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2016/12/base64.html' title='base64 加解密'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-5654174367283193423</id><published>2016-10-09T12:48:00.003+08:00</published><updated>2016-10-09T12:48:51.618+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><title type='text'>CentOS7 修改時區(time zone)</title><summary type="text">CentOS7有個好用指令方便調整時區：timedatectl (systemd-219-19.el7_2.11.x86_64)

列出所有時區
shell&amp;gt; timedatectl list-timezones

設定時區
shell&amp;gt; timedatectl set-timezone Asia/Taipei</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/5654174367283193423/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2016/10/centos7-time-zone.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5654174367283193423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5654174367283193423'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2016/10/centos7-time-zone.html' title='CentOS7 修改時區(time zone)'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8743679442073316933</id><published>2016-02-05T15:30:00.002+08:00</published><updated>2016-02-16T17:52:11.901+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DRBD"/><title type='text'>離線延伸DRBD磁碟 - internal meta data &amp; without LVM</title><summary type="text">由於internal meta data必須存放於磁區的最後面，按照官方的手冊說明需要手動處理metadata的延伸，但我照著做之後一啟動DRBD就會造成系統當機，後來參考 http://www.ogris.de/drbd/ 的流程才成功，若按照官網手冊有遇到問題的人， 不妨試試以下的方法。建議先在測試環境試過，別貿然在正式環境處理。

注意：以下的步驟是有一定風險的，請務必做好資料備份

實做環境
CentOS 6 x86_64
ESXi 6.0 U1
DRBD-8.3 (elrepo)
heartbeat
檔案系統格式: ext4
----------------------------------------------------------------------------

預設狀態
node1的DRBD狀態為primary
node2的DRBD狀態為secondary

</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8743679442073316933/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2016/02/drbd-internal-meta-data.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8743679442073316933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8743679442073316933'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2016/02/drbd-internal-meta-data.html' title='離線延伸DRBD磁碟 - internal meta data &amp; without LVM'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-4749558098324594391</id><published>2016-01-07T12:54:00.001+08:00</published><updated>2016-01-07T13:05:59.023+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><title type='text'>蒐集系統資訊工具 sosreport</title><summary type="text">在 RedHat / CentOS 下有個蒐集系統資訊的指令：sosreport
&amp;nbsp;sosreport 是模組設計，可以根據你想要的模組進行資料的蒐集

安裝
shell&amp;gt;# yum install sos 

列出支援的模組:
shell&amp;gt;# sosreport -l

蒐集指定的模組資訊
shell&amp;gt;# sosreport -o postfix 

蒐集所有的模組資訊
shell&amp;gt;# sosreport -a

執行後會將蒐集到的資訊打包成壓縮檔及一個md5檢核檔
解壓縮後請找 sos_reports 目錄內有個 sosreport.html 可以方便讀取


</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/4749558098324594391/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2016/01/sosreport.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4749558098324594391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4749558098324594391'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2016/01/sosreport.html' title='蒐集系統資訊工具 sosreport'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8169026033301880588</id><published>2015-12-07T17:57:00.001+08:00</published><updated>2017-02-04T18:28:56.882+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><title type='text'>Apache mod_rewrite 自動 HTTP 轉 HTTPS</title><summary type="text">請確認已載入 mod_rewrite 模組後，在 httpd.conf 加入下方設定，重啟 apache 即可 

方法一
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*)?$ https://%{SERVER_NAME}/$1 [L,R] 

方法二
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8169026033301880588/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/12/apache-modrewrite-http-https.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8169026033301880588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8169026033301880588'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/12/apache-modrewrite-http-https.html' title='Apache mod_rewrite 自動 HTTP 轉 HTTPS'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8657275148047961993</id><published>2015-11-12T12:49:00.001+08:00</published><updated>2015-11-12T12:49:34.310+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sendmail"/><title type='text'>sendmail 修改主機名稱</title><summary type="text">sendmail 預設會抓系統 hostname，若要強制修改主機名稱
可在 sendmail.mc 加上以下設定

define(`confDOMAIN_NAME&#39;, `mail.yourdomain.com&#39;)dnl

或直接改 sendmail.cf
Djmail.yourdomain.com

完成後重啟 sendmail 服務即可完成 

&amp;nbsp;</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8657275148047961993/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/11/sendmail.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8657275148047961993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8657275148047961993'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/11/sendmail.html' title='sendmail 修改主機名稱'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8649310225396914429</id><published>2015-11-02T23:55:00.005+08:00</published><updated>2015-11-02T23:55:50.591+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>利用 taskkill 大量刪除程序</title><summary type="text">我發現系統下有大量的 php-cgi.exe 程序已經失控了，想把所有程序都 kill
但數量實在太多了，用工作管理員清除會花上不少時間，這時可以用 taskkill 指令處理 

指令：taskkill /IM php-cgi.exe /F 

參考文獻 
https://technet.microsoft.com/en-us/library/bb491009.aspx</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8649310225396914429/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/11/taskkill.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8649310225396914429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8649310225396914429'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/11/taskkill.html' title='利用 taskkill 大量刪除程序'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-5546878376103742251</id><published>2015-07-06T23:02:00.001+08:00</published><updated>2015-07-06T23:10:56.901+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>windows上等同 cat 及 grep 的指令</title><summary type="text">linux 的 cat 及 grep 指令在查找紀錄檔時相當好用，windows系統上也有類似的指令，分別是 type、find 及 findstr，指令的詳細用法可以用 help command&amp;nbsp;取得說明

顯示檔案內容
cmd&amp;gt; type _vimrc
&amp;nbsp;set nocompatible
&amp;nbsp;behave mswin
&amp;nbsp;set nobackup
&amp;nbsp;set tabstop=4
&amp;nbsp;colorscheme koehler

搜尋輸出的資訊，例如查找系統在監聽的通訊埠
cmd&amp;gt; netstat -an | find &quot;LISTEN&quot;
&amp;nbsp; TCP &amp;nbsp; &amp;nbsp;0.0.0.0:135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.0.0.0:0 &amp;nbsp; &amp;</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/5546878376103742251/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/07/windows-cat-grep.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5546878376103742251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5546878376103742251'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/07/windows-cat-grep.html' title='windows上等同 cat 及 grep 的指令'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-4484353346859423993</id><published>2015-07-01T13:10:00.000+08:00</published><updated>2015-07-01T13:27:18.646+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Windows 服務狀態在啟動或停止時卡住的解決辦法</title><summary type="text">有時候在重啟 tomcat 服務時，因服務無回應導致服務狀態卡死，用 net stop / start 指令回應「服務正在啟動或停止中，請稍候片刻後再試一次」，這個時候就要確認該服務的 PID 號碼 kill 掉就能解決，方法如下：

1. 首先先到「服務」找到卡住的「服務名稱」，例如Tomcat6

2. 利用指令確認該服務名稱的PID，如下方紅字
CMD&amp;gt;sc queryex Tomcat6

SERVICE_NAME: Tomcat6
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 10 &amp;nbsp;WIN32_OWN_PROCESS
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; STATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/4484353346859423993/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/07/windows.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4484353346859423993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4484353346859423993'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/07/windows.html' title='Windows 服務狀態在啟動或停止時卡住的解決辦法'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-3101543400133700718</id><published>2015-02-03T16:41:00.002+08:00</published><updated>2015-07-24T12:55:01.446+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><title type='text'>CentOS 5/6 編譯安裝 ffmpeg</title><summary type="text">由於我需要 ffmpeg&amp;nbsp;+faststart 的參數，讓 flash player 播放 mp4 時能馬上播放影片，但該參數只有在新版上才支援，看了一下 FFMpeg 官網的編譯手冊，決定自己編譯一套來用

※以下筆記是編譯 h264 、Theora 的影像編碼及 mp3、aac、ogg、libvorbis 聲音編碼格式，若有其他編碼需求的話就需要額外編譯套件


必要套件
shell&amp;gt;# yum install autoconf automake gcc gcc-c++ git &amp;nbsp;libtool make nasm pkgconfig zlib-devel
shell&amp;gt;# mkdir ~/ffmpeg_source
shell&amp;gt;# cd ~/ffmpeg_source


編譯 yasm
shell&amp;gt;# git clone --depth </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/3101543400133700718/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/02/centos6-ffmpeg.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3101543400133700718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3101543400133700718'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/02/centos6-ffmpeg.html' title='CentOS 5/6 編譯安裝 ffmpeg'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-8993140139171487480</id><published>2015-01-13T19:25:00.001+08:00</published><updated>2015-01-13T23:09:20.671+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><title type='text'>query rpm package name only</title><summary type="text">列出系統安裝的rpm套件名稱，但不要版本資訊

shell&amp;gt;#rpm -qa --qf &quot;%{NAME}\n&quot;
openldap
curl
gzip
db4-utils
e2fsprogs-libs
libselinux-utils
libgcrypt
ethtool
openssl
python-libs


稍微變化一下可排程將套件列表備份起來，之後系統災難復原的時候可以一行指令裝好套件

新增一筆排程到 crontab
shell&amp;gt;# crontab -e
@monthly /bin/rpm -qa --qf &quot;%{NAME} &quot; &amp;gt; /root/rpmList.txt

若系統要重安裝時把列表拿出來用
shell&amp;gt;# cat /root/rpmList.txt | xargs yum install -y
</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/8993140139171487480/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2015/01/query-rpm-package-name-only.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8993140139171487480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/8993140139171487480'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2015/01/query-rpm-package-name-only.html' title='query rpm package name only'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-6741279882474556625</id><published>2014-11-24T12:22:00.000+08:00</published><updated>2014-11-27T13:46:09.043+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><title type='text'>Apache mod_h264 影片串流模組</title><summary type="text">Apache2 加上 H264 streaming module 後，就能支援影片串流的功能，安裝方式也相當容易。但特別注意到授權部份，非商業使用是採 Creative Commons 授權可免費使用，而商業用途則是要付費的，費用我覺得還滿便宜的，一台伺服器才39歐元，詳細資訊請參閱官方網站說明&amp;nbsp;



安裝程序&amp;nbsp;
首先到首頁下載tarball安裝檔並解壓縮
shell&amp;gt;# wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz

shell&amp;gt;# tar xzvf apache_mod_h264_streaming-2.2.7.tar.gz

確認系統是否有安裝apxs套件，沒有的話自行用yum安裝
shell&amp;gt;# rpm -q </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/6741279882474556625/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/11/apache-modh264.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/6741279882474556625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/6741279882474556625'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/11/apache-modh264.html' title='Apache mod_h264 影片串流模組'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-3600918375343935766</id><published>2014-10-15T14:21:00.000+08:00</published><updated>2014-10-15T14:21:58.814+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ftp"/><title type='text'>ProFTPD SSL/TLS 安裝筆記</title><summary type="text">#環境 
-CentO5 
-proftpd-1.3.5
-crypto-utils

#解壓縮tarball 
shell&amp;gt;# tar xzvf proftpd-1.3.5.tar.gz

#編譯安裝
shell&amp;gt;# cd proftpd-1.3.5
shell&amp;gt;# ./configure --prefix=/usr/local/proftpd --enable-ctrls --enable-dso --with-shared=mod_tls

shell&amp;gt;# make &amp;amp;&amp;amp; make install

#建立自我發行憑証(若沒有genkey工具表示沒安裝crypto-utils套件)
shell&amp;gt;# genkey --days 3650 test.ftp.biz
接下來按照該工具指示建立自我發行憑證，加密建議用2048bit，建好的憑證</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/3600918375343935766/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/10/proftpd-ssltls.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3600918375343935766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/3600918375343935766'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/10/proftpd-ssltls.html' title='ProFTPD SSL/TLS 安裝筆記'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-4662680904211788773</id><published>2014-08-27T14:54:00.004+08:00</published><updated>2014-08-27T14:54:42.022+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><title type='text'>Apache mod_log_forensic</title><summary type="text">要瞭解 client request 資訊, mod_log_forensic 是非常好用的模組
它會在每個 request 前後安插一組紀錄

參考資料：http://httpd.apache.org/docs/2.2/en/mod/mod_log_forensic.html</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/4662680904211788773/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/08/apache-modlogforensic.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4662680904211788773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/4662680904211788773'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/08/apache-modlogforensic.html' title='Apache mod_log_forensic'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-1801248598134903588</id><published>2014-07-14T22:56:00.001+08:00</published><updated>2014-07-14T22:56:25.484+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Windows 建立符號連結指令</title><summary type="text">#建立檔案符號連結C:\&amp;gt; mklink C:\fileLink.txt D:\sourceFile.txt

#建立目錄符號連結, 來源目錄後方的反斜線不能少
C:\&amp;gt; mklink /d C:\link &amp;nbsp;D:\sourceDir\

#刪除目錄符號連結
C:\&amp;gt; rmdir C:\link

#刪除檔案符號連結C:\&amp;gt; del C:\fileLink</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/1801248598134903588/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/07/windows.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1801248598134903588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/1801248598134903588'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/07/windows.html' title='Windows 建立符號連結指令'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-6262376735960747394</id><published>2014-06-24T12:34:00.000+08:00</published><updated>2014-06-24T12:34:18.888+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="samba"/><title type='text'>samba as wins server</title><summary type="text">
設定SAMBA為WINS伺服器

注意


SAMBA官方手冊上提到, 因為WINS Replication沒有實做完成, 所以不建議同時啟動兩台SAMBA 作為 WINS server
不建議同時與MS伺服器同時作為WINS伺服器

設定方法


編輯 /etc/samba/smb.conf, &amp;nbsp;取消 wins support = yes 的註解, 特別注意到 wins support 與 wins server 這兩個參數不得同時存在, 否則會無法啟動 nmb
若有 static wins 的需求, 請編輯 /var/lib/samba/wins.dat加上&amp;nbsp;&quot;NETBIOS_NAME#03&quot; 0 192.168.xxx.xxx 66R※注意編輯wins.dat時要先停止nmb服務
啟動 nmb&amp;nbsp;





參考文獻



samba howto
</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/6262376735960747394/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/06/samba-as-wins-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/6262376735960747394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/6262376735960747394'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/06/samba-as-wins-server.html' title='samba as wins server'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-5188773133601893937</id><published>2014-05-23T18:18:00.000+08:00</published><updated>2014-05-25T01:04:20.296+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DRBD"/><title type='text'>DRBD administration note</title><summary type="text">DRBD版本: 8.3.x

確認 DRBD 運作狀況

可用以下兩種方式取得 DRBD 運作狀況
1. shell&amp;gt;# cat /proc/drbd
2. shell&amp;gt;# /usr/sbin/drbd-overview


shell&amp;gt;# cat /proc/drbd
version: 8.3.15 (api:88/proto:86-97)
GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by mockbuild@builder10. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;centos.org, 2013-03-27 16:01:26
&amp;nbsp;1: cs:Connected ro:Primary/</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/5188773133601893937/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/05/drbd-administration-note.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5188773133601893937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5188773133601893937'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/05/drbd-administration-note.html' title='DRBD administration note'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-493877311096167878</id><published>2014-05-22T23:57:00.000+08:00</published><updated>2014-05-23T00:00:59.388+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DRBD"/><title type='text'>DRBD meta data 筆記</title><summary type="text">
DRBD meta data
用來儲存以下資訊

1. DRBD device size
2. Generation Identifier (GI)
&amp;nbsp; &amp;nbsp; ※判斷連線中的node是否為同一叢集
&amp;nbsp; &amp;nbsp; ※判斷背景同步的方向
&amp;nbsp; &amp;nbsp; ※判斷是否需要全部重新同步
&amp;nbsp; &amp;nbsp; ※判斷裂腦
3. Activity Log(AL) &amp;nbsp;- Info
&amp;nbsp; &amp;nbsp;※用來紀錄近期更新的block, 以避免 fail over 的過程中資料出現&amp;nbsp; &amp;nbsp; &quot;one write ahead&quot;的狀況
4. Quick-sync bitmap
&amp;nbsp; &amp;nbsp;※DRBD內部資料結構, 用來追蹤兩端點間資料的同步狀況


Internal meta data


將 Meta data</summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/493877311096167878/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/05/drbd-meta-data.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/493877311096167878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/493877311096167878'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/05/drbd-meta-data.html' title='DRBD meta data 筆記'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-5956449379973132328</id><published>2014-03-04T00:48:00.001+08:00</published><updated>2016-04-25T00:06:36.641+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clamav"/><title type='text'>ClamAV 防毒筆記</title><summary type="text">安裝

CentOS 可透過 rpmforge 套件庫安裝, 但想要持續更新主程式的話, 用 tarball 編譯安裝會比較好處理, 所以我決定採用編譯安裝的方式進行。

下載最新穩定版 http://www.clamav.net/lang/en/download/sources/
編譯需求: pcre-devel, bzip2-devel, zlib-devel, openssl-devel, libxml2-devel, libcurl-devel, make, gcc

建立 clamav 帳號及群組
shell&amp;gt;#groupadd clamav
shell&amp;gt;#useradd -g clamav -M -s /sbin/nologin -c &quot;ClamAV anti virus&quot; clamav

解壓縮然後編譯
shell&amp;gt;# tar xzvf </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/5956449379973132328/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/03/clamav.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5956449379973132328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/5956449379973132328'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/03/clamav.html' title='ClamAV 防毒筆記'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2108747430750349024.post-45670813937663430</id><published>2014-02-12T01:30:00.001+08:00</published><updated>2014-03-02T23:34:48.183+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="硬體"/><title type='text'>允許 PPTP 連入採用 NAT 模式的 SSG 設備且只有一組 Public IP</title><summary type="text">環境：ScreenOS 5.0以上
問題：SSG設定為NAT模式，且只有一組 Public IP 作為 PPTP Service VIP

設定方式(CLI)
註: PPTP server private IP is 192.168.1.12 and in zone TRUST.
#啟用 vip multi-port，此步驟需要重新啟動設備(這個步驟很重要, 沒處理的話 PPTP 會無法撥通)
set vip multi-port [Enter]
save [Enter]
reset [Enter]

#新增一組自訂服務，CLI指令會設定出如下圖的服務
set service PPTPService group &quot;other&quot; 47 src 2048-2048 dst 2048-2048 [Enter]
set service&amp;nbsp;PPTPService&amp;nbsp;+ tcp </summary><link rel='replies' type='application/atom+xml' href='http://beakdoosan.blogspot.com/feeds/45670813937663430/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://beakdoosan.blogspot.com/2014/02/pptp-nat-ssg-ip.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/45670813937663430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2108747430750349024/posts/default/45670813937663430'/><link rel='alternate' type='text/html' href='http://beakdoosan.blogspot.com/2014/02/pptp-nat-ssg-ip.html' title='允許 PPTP 連入採用 NAT 模式的 SSG 設備且只有一組 Public IP'/><author><name>Beakdoosan&#39;s Weblog</name><uri>http://www.blogger.com/profile/09814345579838805686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc5nJuoVxb5zI2kTeJ2xZH5FfyPkzAhkl_iTymeJBCkGhVOm3jmrHLz7veEooG6rqHqoixk_9LntNppfQ0mw58d4L05zD-lZbha0Ei6T-7RWCtWKu5jznYjdXI2QI_JFhHnpqBrBm8Jnc/s72-c/pptp_fw.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>