<?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-6040816050020259145</id><updated>2025-02-02T08:10:34.637+08:00</updated><category term="Research"/><category term="Linux"/><category term="Others"/><category term="Application"/><category term="Code"/><category term="Windows"/><category term="WEB"/><category term="VOIP"/><category term="CentOS"/><category term="Ubuntu"/><category term="MIS"/><category term="MySQL"/><category term="ASP.NET"/><category term="LogAnalyer"/><category term="PHP"/><category term="Security"/><category term="AJAX"/><category term="C/C++"/><category term="MSSQL"/><category term="Rsyslog"/><category term="Billing"/><category term="DDNS"/><category term="DNS"/><category term="Fortinet"/><category term="Fotigate"/><category term="Game"/><category term="Juniper"/><category term="Netscreen"/><category term="Open Source"/><category term="PET"/><category term="SQL"/><category term="WII"/><category term="Wireshark"/><category term="Yum Repo"/><category term="easyrent"/><category term="iRent"/><category term="和運"/><category term="APT"/><category term="Anime"/><category term="Book"/><category term="CACTI"/><category term="Driver"/><category term="Eat"/><category term="Expect Shell"/><category term="Fedora"/><category term="Graphite"/><category term="IVR"/><category term="Intel"/><category term="Javascript"/><category term="MRTG"/><category term="Movie"/><category term="Nagios Plungin"/><category term="Naigos"/><category term="Nginx"/><category term="Office"/><category term="Personal"/><category term="Project Manager"/><category term="Proxmox VE"/><category term="QoS"/><category term="SEO"/><category term="SSL"/><category term="Shopping Cart"/><category term="Snort"/><category term="Telecom"/><category term="Tshark"/><category term="Visual Studio"/><category term="rpcap"/><category term="uWSGI"/><category term="實體主機 主機代管 主機託管 服務器租用 服務器託管 主機租用 DDOS DDOS防護"/><title type='text'>Streitleak的隨筆空間</title><subtitle type='html'>探討我個人生活、工作或興趣上的地方。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.streitleak.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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>90</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6040816050020259145.post-3369171309980136346</id><published>2024-06-06T10:51:00.001+08:00</published><updated>2024-06-06T10:51:21.199+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="APT"/><category scheme="http://www.blogger.com/atom/ns#" term="Graphite"/><category scheme="http://www.blogger.com/atom/ns#" term="Nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="Proxmox VE"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="uWSGI"/><title type='text'>Graphite APT安裝心得</title><content type='html'>&lt;p&gt;最近嘗試監控Proxmox VE Node所以花了一點時間去弄Graphite的安裝方式，結果Graphite官方文件的安裝說明簡略到不行。最終總算成功了。&lt;/p&gt;&lt;p&gt;安裝流程可以參考&amp;nbsp;&lt;a href=&quot;https://luppeng.wordpress.com/2023/04/15/install-and-setup-graphite-on-ubuntu-server-22-04-via-apt-repository/&quot; target=&quot;_blank&quot;&gt;https://luppeng.wordpress.com/2023/04/15/install-and-setup-graphite-on-ubuntu-server-22-04-via-apt-repository/&lt;/a&gt;&amp;nbsp;的說明。&lt;/p&gt;&lt;p&gt;安裝環境&lt;/p&gt;&lt;p&gt;OS: Ubuntu 22.04&lt;/p&gt;&lt;p&gt;Web Server: Nginx&lt;/p&gt;&lt;p&gt;Python: 3.10&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1. 系統更新到最新&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;apt update -y &amp;amp;&amp;amp; apt upgrade -y&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. 安裝相關套件&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;apt install nano wget curl unzip -y&lt;/blockquote&gt;&lt;p&gt;3. Graphite , Nginx, uWSGI安裝&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;apt install graphite-web graphite-carbon graphite-api nginx-full uwsgi uwsgi-plugins-all -y&amp;nbsp;&lt;/blockquote&gt;&lt;p&gt;4. 設定Carbon-Cache&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;這部份參照上方&lt;a href=&quot;https://luppeng.wordpress.com/2023/04/15/install-and-setup-graphite-on-ubuntu-server-22-04-via-apt-repository/&quot; target=&quot;_blank&quot;&gt;說明網站&lt;/a&gt;的Step 3即可&lt;/p&gt;&lt;p&gt;5. 建立Graphite Web的database&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;這部份同樣參照&lt;a href=&quot;https://luppeng.wordpress.com/2023/04/15/install-and-setup-graphite-on-ubuntu-server-22-04-via-apt-repository/&quot; target=&quot;_blank&quot;&gt;說明網站&lt;/a&gt;的Step 5即可&amp;nbsp;&lt;/p&gt;&lt;p&gt;6. Graphite Web的設定檔&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; 這邊是參造說明網站的Step 6，可以用下面的指令產生SECRET_KEY&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;python3 -c &#39;from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())&#39;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; 免得啟用後會一直跳WARNING洗LOG，所以還是把KEY加上比較好。&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; 接著是依據Step 7做一個symbol link放到Graphie Web Python Application的實際位置&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;ln -s /etc/graphite/local_settings.py /usr/lib/python3/dist-packages/graphite/local_settings.py&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; 7. nginx的設定&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 這邊直接參考 &lt;a href=&quot;https://graphite.readthedocs.io/en/latest/config-webapp.html#nginx-uwsgi&quot; target=&quot;_blank&quot;&gt;graphite官方的即可&lt;/a&gt;。&lt;/p&gt;&lt;blockquote style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;server {&lt;br /&gt;&amp;nbsp; &amp;nbsp; listen 80;&lt;br /&gt;&amp;nbsp; &amp;nbsp; access_log /var/log/nginx/graphite_access_log;&lt;br /&gt;&amp;nbsp; &amp;nbsp; error_log /var/log/nginx/graphite_error_log;&amp;nbsp;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; location /static/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alias /usr/share/graphite-web/static/;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; location / {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; include uwsgi_params;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uwsgi_pass localhost:8080;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/div&gt;&lt;/blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 官方的沒有把log檔獨立開來，這邊把他獨立出來了。 然後static對應的目錄也有異動。&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;8. uWSGI的設定&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; 這邊是Graphite官方完全沒講到的部份，給的範例也不適用於APT的安裝方式。&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; APT安裝的uwsgi的設定檔都會放在 /etc/uwsgi目錄下。&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; 目錄結構同nginx會有一個apps-available跟apps-enabled。設定檔要放在apps-available下，然後到apps-enabled做symbol link&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; # /etc/uwsgi/apps-available/graphite.ini&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;[uwsgi]&lt;br /&gt;processes = 4&lt;br /&gt;master = true&lt;br /&gt;socket = localhost:8080&lt;br /&gt;gid = _graphite&lt;br /&gt;uid = _graphite&lt;br /&gt;wsgi-file = /usr/share/graphite-web/graphite.wsgi&lt;br /&gt;plugins-dir = /usr/lib/uwsgi&lt;br /&gt;plugins = python310&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 這邊要注意，設定檔的副檔名INI不可以省略，不然會被直接略過無視，&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;9. Graphite Web 後續&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 一樣參考說明網站的 Step 8以後的步驟。Step 11.2會把Django的admin界面做symbol link到/usr/share/graphite-web/static/admin&lt;/div&gt;&lt;div&gt;10. 大功告成&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 成功的話就會有下面的畫面&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgXQik7cahKOwCvPfeREsbFJMfBCyNxrUHPl4C9WhC5iZotch1zFtA8mgE7h4jH13cj-JleMhqq3JpvPYpLmbVjfZSfF7nQerouRdug_gHs1kXrtof707YjscaySETgYxJ4mvn6lAKgqdqTZsYb8dntH4yo8wmNKgk8Mq6m5Tu5VZQ4Ab8nJgCybjk1-Tpz&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;733&quot; data-original-width=&quot;1433&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgXQik7cahKOwCvPfeREsbFJMfBCyNxrUHPl4C9WhC5iZotch1zFtA8mgE7h4jH13cj-JleMhqq3JpvPYpLmbVjfZSfF7nQerouRdug_gHs1kXrtof707YjscaySETgYxJ4mvn6lAKgqdqTZsYb8dntH4yo8wmNKgk8Mq6m5Tu5VZQ4Ab8nJgCybjk1-Tpz&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &amp;nbsp; 如果出現502 Bad Gateway，就是uWSGI沒設定好。&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/3369171309980136346/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/3369171309980136346' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3369171309980136346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3369171309980136346'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2024/06/graphite-apt.html' title='Graphite APT安裝心得'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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/a/AVvXsEgXQik7cahKOwCvPfeREsbFJMfBCyNxrUHPl4C9WhC5iZotch1zFtA8mgE7h4jH13cj-JleMhqq3JpvPYpLmbVjfZSfF7nQerouRdug_gHs1kXrtof707YjscaySETgYxJ4mvn6lAKgqdqTZsYb8dntH4yo8wmNKgk8Mq6m5Tu5VZQ4Ab8nJgCybjk1-Tpz=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040816050020259145.post-1233496337775249594</id><published>2016-05-18T14:17:00.001+08:00</published><updated>2016-05-18T14:17:22.860+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="rpcap"/><category scheme="http://www.blogger.com/atom/ns#" term="Wireshark"/><title type='text'>CentOS 安裝 rpcapd </title><content type='html'>在CentOS上安裝rpcapd順序&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. 下載winpacp source (&lt;a href=&quot;http://www.winpcap.org/devel.htm&quot; target=&quot;_blank&quot;&gt;官方載點&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
2. 解開壓縮檔 並參考 https://www.winpcap.org/pipermail/winpcap-users/2011-November/004540.html&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; 修正daemon.c檔案的錯誤&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. 依據http://www.winpcap.org/docs/docs_40_2/html/group__remote.html 的說明編譯並啟用&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
參考來源：&lt;/div&gt;
&lt;div&gt;
http://www.winpcap.org/docs/docs_40_2/html/group__remote.html&lt;/div&gt;
&lt;div&gt;
https://www.winpcap.org/pipermail/winpcap-users/2011-November/004540.html&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/1233496337775249594/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/1233496337775249594' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/1233496337775249594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/1233496337775249594'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2016/05/centos-rpcapd.html' title='CentOS 安裝 rpcapd '/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-5830802847797305695</id><published>2016-05-14T14:42:00.000+08:00</published><updated>2016-05-14T14:44:51.998+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CACTI"/><category scheme="http://www.blogger.com/atom/ns#" term="MIS"/><category scheme="http://www.blogger.com/atom/ns#" term="MRTG"/><title type='text'>Cacti Plugin Realtime 安裝方法</title><content type='html'>個人筆記:Cacti 0.8.7e插件成功安裝之:realtime&lt;br /&gt;
源自:楊志剛博客 (&lt;br /&gt;
http://yangzhigang.cublog.cn&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
前言：&lt;br /&gt;
繼《個人筆記:Cacti 0.8.7e插件成功安裝之:monitor、thold、settings》&lt;br /&gt;
http://blog.chinaunix.net/u2/71257/showart_2093517.html&lt;br /&gt;
一文之後，本文來記錄我成功安裝基本的插件(realtime)的步驟步驟.&lt;br /&gt;
&lt;br /&gt;
小介紹：&lt;br /&gt;
Realtime,provides a method to view cacti graphs with a resolution of upto 5 seconds.&lt;br /&gt;
&lt;br /&gt;
//下載、解壓realtime插件包&lt;br /&gt;
(在&lt;br /&gt;
http://docs.cacti.net/plugins&lt;br /&gt;
中下載最新的插件包)&lt;br /&gt;
[root@centos53 ~]# cd /usr/local/src&lt;br /&gt;
[root@centos53 src]# wget&lt;br /&gt;
http://docs.cacti.net/_media/plugin:realtime-0.4.0-1.tar.gz&lt;br /&gt;
[/url]&lt;br /&gt;
[root@centos53 src]# tar zxvf realtime-0.4.0-1.tar.gz&lt;br /&gt;
&lt;br /&gt;
[url=http://docs.cacti.net/_media/plugin:settings-latest.tgz]&lt;br /&gt;
&lt;br /&gt;
//MV 插件包到 cacti/plugins/下&lt;br /&gt;
[root@centos53 src]# mv realtime /var/www/cacti/plugins/&lt;br /&gt;
&lt;br /&gt;
//install、enable plugins:realtime&lt;br /&gt;
登錄Cacti，進入[Console]-[configuration]-[Plugin Management]，對plugin:realtime進行Install 和 Enable。&lt;br /&gt;
&lt;br /&gt;
//給admin用戶授權&lt;br /&gt;
登錄Cacti，進行[Console]-[Utilities]-[User Management]，點admin用戶，在[Realm Permissions]中我，勾選“Plugin-&amp;gt;Realtime”。&lt;br /&gt;
&lt;br /&gt;
//第一次驗證&lt;br /&gt;
此時，到[Graphs]中，找一個圖，可以發現在其右側已經出現“Realtime”的一個小Logo，但當點此logo進行realtime查看時，會發現彈出的窗口中顯示“The Image Cache Directory directory does not exist. Please first create it and set permissions and then attempt to open another realtime graph.”，提示出沒有Cache目錄以及權限等。&lt;br /&gt;
&lt;br /&gt;
//設置Cache目錄及權限&lt;br /&gt;
在realtime插件包中的README中寫到：Create a folder somewhere on your system that is accessible to the apache user for writing.&lt;br /&gt;
在官網的文檔中對於Installation中也寫到：You need to also create a folder somewhere on you system that is accessible to the apache user for writing.This folder should bo different than other transient folders used by plugins as it will b periodically pruned by this plugin.&lt;br /&gt;
所以，還要做如下操作。&lt;br /&gt;
-----------原文修正後------------------&lt;br /&gt;
# mkdir /var/www/cacti/cache&lt;br /&gt;
# chmod 755 -R /var/www/cacti/cache/&lt;br /&gt;
# chcon -u system_u -t usr_t /var/www/cacti/cache&lt;br /&gt;
# chown apache:apache /var/www/cacti/cache&lt;br /&gt;
&lt;br /&gt;
PS:權限控管要注意&lt;br /&gt;
---------------------------------------------&lt;br /&gt;
&lt;br /&gt;
之後，還要login cacti，進入[console]-[configuration]-[settings]-[Misc]，設置“Cache Diredtiory”為“​​/var/www/cacti/cache/”&lt;br /&gt;
&lt;br /&gt;
//最終驗證&lt;br /&gt;
按上面“第一次驗證”的方法，驗證一下，我成功了，你呢？&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
資料來源：&lt;a href=&quot;http://bbs.chinaunix.net/thread-1949270-1-1.html&quot; target=&quot;_blank&quot;&gt;http://bbs.chinaunix.net/thread-1949270-1-1.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/5830802847797305695/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/5830802847797305695' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/5830802847797305695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/5830802847797305695'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2016/05/cacti-plugin-realtime.html' title='Cacti Plugin Realtime 安裝方法'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040816050020259145.post-4513892425550359263</id><published>2015-11-28T15:08:00.001+08:00</published><updated>2015-11-28T15:28:38.792+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Expect Shell"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux Expect 語法</title><content type='html'>參考來源：&lt;a href=&quot;https://devcentral.f5.com/articles/example-expect-script&quot;&gt;https://devcentral.f5.com/articles/example-expect-script&lt;/a&gt;&lt;br /&gt;
參考來源：&lt;a href=&quot;http://inguza.com/document/expect-and-tcl-mini-reference-manual&quot; target=&quot;_blank&quot;&gt;http://inguza.com/document/expect-and-tcl-mini-reference-manual&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
先裝好epxect後 就可以用下列語法透過ssh去控制遠端主機或設備&lt;br /&gt;
--------------&lt;br /&gt;
#!/usr/bin/expect -f&lt;br /&gt;
set HOST &quot;目標IP&quot;&lt;br /&gt;
set USER &quot;帳號&quot;&lt;br /&gt;
set PASS &quot;密碼&quot;&lt;br /&gt;
set SERVER [lindex $argv 0] &amp;nbsp; &amp;nbsp;// 參數一 &amp;nbsp;字串&lt;br /&gt;
set TARGET [lindex $argv 1] &amp;nbsp;// 參數二 以空格分隔得字串&lt;br /&gt;
append SERVER &quot;_WHITE_LIST&quot; &amp;nbsp;// 在參數一後面加字串&lt;br /&gt;
&lt;br /&gt;
spawn ssh -o StrictHostKeyChecking=no $USER@$HOST &amp;nbsp; &amp;nbsp;// ssh連線到目標主機&lt;br /&gt;
expect &amp;nbsp;&quot;password:&quot; { send &quot;$PASS\r&quot;;} &amp;nbsp; // &amp;nbsp;密碼&lt;br /&gt;
expect &amp;nbsp;&quot; #&quot; { send &quot;config firewall addrgrp \r&quot;; } &amp;nbsp;// 指令&lt;br /&gt;
expect &amp;nbsp;&quot;(addrgrp) #&quot; { send &quot;edit $SERVER \r&quot;; } &amp;nbsp;// 指令&lt;br /&gt;
expect &amp;nbsp;&quot;($SERVER) #&quot; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach target [split $TARGET &quot; &quot;] { &amp;nbsp; &amp;nbsp; &amp;nbsp; // foreach 迴圈 &amp;nbsp; &amp;nbsp;變數來源是用以空格分隔得字串&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; send &quot;unselect member [lindex $target 0] \r&quot;; &amp;nbsp; // 指令&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
}&lt;br /&gt;
expect &amp;nbsp;&quot;($SERVER) #&quot; { send &quot;end \r&quot;; } &amp;nbsp; // 指令&lt;br /&gt;
expect &amp;nbsp;&quot; #&quot; &amp;nbsp;{ &amp;nbsp;send &quot;config firewall address \r&quot;; }&lt;br /&gt;
expect &amp;nbsp;&quot;(address) #&quot; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach target [split $TARGET &quot; &quot;] {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; send &quot;delete [lindex $target 0] \r&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
}&lt;br /&gt;
expect &amp;nbsp;&quot;(address) #&quot; { send &quot;end \r&quot;; }&lt;br /&gt;
expect &amp;nbsp;&quot; #&quot; { send &quot;exit \r&quot;; } &amp;nbsp; // 登出主機&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
----------------&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/4513892425550359263/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/4513892425550359263' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/4513892425550359263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/4513892425550359263'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/11/linux-expect.html' title='Linux Expect 語法'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-3691397727282169204</id><published>2015-10-26T17:52:00.001+08:00</published><updated>2015-10-26T17:53:11.808+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="QoS"/><title type='text'>CentOS 7 Bridge跟Traffic Control</title><content type='html'>Bridge 設定&amp;nbsp;&lt;a href=&quot;http://www.ichiayi.com/wiki/tech/linux_bridge&quot; target=&quot;_blank&quot;&gt; http://www.ichiayi.com/wiki/tech/linux_bridge&lt;/a&gt;&lt;br /&gt;
Traffic Control 設定&amp;nbsp;&lt;a href=&quot;http://chunchaichang.blogspot.tw/2010/08/qos.html&quot;&gt;http://chunchaichang.blogspot.tw/2010/08/qos.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
這裡有一個重點Bridge預設是不會受iptables的控制，找了一下有下列文章&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/653812/why-doesnt-my-iptables-entries-block-pinging-a-xen-virtual-machine&quot; target=&quot;_blank&quot;&gt;http://stackoverflow.com/questions/653812/why-doesnt-my-iptables-entries-block-pinging-a-xen-virtual-machine&lt;/a&gt;&lt;br /&gt;
重點就是要把Bridge的nf功能打開&lt;a href=&quot;http://ebtables.netfilter.org/documentation/bridge-nf.html&quot; target=&quot;_blank&quot;&gt;http://ebtables.netfilter.org/documentation/bridge-nf.html&lt;/a&gt;&lt;br /&gt;
nf功能可以在sysctl.conf裡面設定。&lt;br /&gt;
&lt;br /&gt;
開機要自動做好TC的話，請記得把rc.local改成可執行。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/3691397727282169204/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/3691397727282169204' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3691397727282169204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3691397727282169204'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/10/centos-7-bridgetraffic-control.html' title='CentOS 7 Bridge跟Traffic Control'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-8234933998529193279</id><published>2015-10-06T11:01:00.001+08:00</published><updated>2015-10-06T11:47:39.635+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Application"/><category scheme="http://www.blogger.com/atom/ns#" term="C/C++"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Visual Studio 2013 如何建立C++ windows form</title><content type='html'>&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;參考來源：&lt;/span&gt;&lt;a href=&quot;http://stackoverflow.com/questions/21411926/how-to-create-a-new-windows-forms-application-project-in-visual-c-2013-ultimat&quot; target=&quot;_blank&quot;&gt;http://stackoverflow.com/questions/21411926/how-to-create-a-new-windows-forms-application-project-in-visual-c-2013-ultimat&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
The following are the steps to make such a project:&lt;/div&gt;
&lt;ol style=&quot;border: 0px; margin: 0px 0px 1em 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Go in the menu bar: File =&amp;gt; New =&amp;gt; Project, to get a list of project templates.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Select in the tree to the left go: Templates =&amp;gt; Visual C++. Select on the right of the of the window of the templates list : Empty Project (Visual C++) .&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;There will be in the &quot;Solution Explorer&quot; a new tree of files which belong to your new project. Expand it. Let&#39;s say you got a new project named &quot;Project1&quot;. You&#39;ll get on the top of the tree &quot;Solution Project1 (1 project)&quot; . After expanding the tree, You should get on the top of the expansion something called &quot;Project1&quot; right under &quot;Solution Project1 (1 project)&quot; . Right-click &quot;Project1&quot;. Select &quot;Add New Item&quot; from the right-click menu.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;In &quot;Add New Item&quot; from, in the tree to the left , go : Visual C++ =&amp;gt; UI =&amp;gt; Windows Forms. click save. You&#39;ll get the question &quot;You are adding a CLR component to a native project. The project will be converted to have Common Language Runtime support. Do you want to continue?&quot; . Click &quot;Yes&quot; . Again, one more time, right-click &quot;Project1&quot; and go &quot;Properties&quot;.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;On the tree to left, go : Configuration Properties =&amp;gt; Linker =&amp;gt; System. And to the right of the properties window set &quot;SubSystem&quot; as &quot;Windows (/SUBSYSTEM:WINDOWS)&quot; .&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Also go: Configuration Properties =&amp;gt; Linker =&amp;gt; Advanced . And to the right of the properties window, set &quot;Entry Point&quot; to &quot;main&quot;. If you cannot not see &quot;Entry Point&quot;, just re-open the properties window again. This is the function &quot;main&quot; given below. this is where you&#39;re application will start running from.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
Finally, Double-click the form designer and move the cursor to the bottom of the code just right before the closing brace of &quot;namespace Project1&quot;. Paste the following code. Please remember to rename the variables of this code according to your project needs to get it working with the empty form.&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;[STAThread]
void main(array&amp;lt;String^&amp;gt;^ arg) {
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);

    MyForm form;
    Application::Run(%form);
}&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp; &amp;nbsp; PS：7的部份是指要放在namespace的{}裡面喔。放外面會爆炸的。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
怎麼搞的這麼難用，阿明明就在為啥不直接秀出來就好XD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/8234933998529193279/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/8234933998529193279' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8234933998529193279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8234933998529193279'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/10/visual-studio-2013-c-windows-form.html' title='Visual Studio 2013 如何建立C++ windows form'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-7404503304607430386</id><published>2015-05-05T13:29:00.000+08:00</published><updated>2015-05-05T13:29:45.057+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="Intel"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>windows 2008 r2 安裝 Inter I218-V 驅動方式</title><content type='html'>到Intel官網抓最新的CD包&amp;nbsp;https://downloadcenter.intel.com/download/22283/Intel-Ethernet-Connections-CD&lt;br /&gt;
&lt;br /&gt;
抓完後解壓縮檔案後，到pro1000\Winx64\NDIS62\e1d64x64.inf修改&lt;br /&gt;
把[Intel NTamd64.6.1.1]裡面有關DEV_15A1的兩行增加到[Intel NTamd64.6.1]裡面 重新安裝即可&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
[Intel.NTamd64.6.1.1]&lt;br /&gt;
;DisplayName                   Section              DeviceID&lt;br /&gt;
; -----------                   -------              --------&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153A&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153A&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153A&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E153BNC.DeviceDesc%            = E153B.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153B&lt;br /&gt;
%E153BNC.DeviceDesc%            = E153B.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153B&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E153BNC.DeviceDesc%            = E153B.6.1.1,       PCI\VEN_8086&amp;amp;DEV_153B&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_155A&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_155A&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A.6.1.1,       PCI\VEN_8086&amp;amp;DEV_155A&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E1559NC.DeviceDesc%            = E1559.6.1.1,       PCI\VEN_8086&amp;amp;DEV_1559&lt;br /&gt;
%E1559NC.DeviceDesc%            = E1559.6.1.1,       PCI\VEN_8086&amp;amp;DEV_1559&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E1559NC.DeviceDesc%            = E1559.6.1.1,       PCI\VEN_8086&amp;amp;DEV_1559&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E15A0NC.DeviceDesc%            = E15A0.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A0&lt;br /&gt;
%E15A0NC.DeviceDesc%            = E15A0.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A0&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E15A1NC.DeviceDesc%            = E15A1.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A1&lt;br /&gt;
%E15A1NC.DeviceDesc%            = E15A1.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A1&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A2&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A2&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A2&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E15A3NC.DeviceDesc%            = E15A3.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A3&lt;br /&gt;
%E15A3NC.DeviceDesc%            = E15A3.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A3&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E15A3NC.DeviceDesc%            = E15A3.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A3&amp;amp;SUBSYS_00011179&lt;br /&gt;
&lt;br /&gt;
[Intel.NTamd64.6.1]&lt;br /&gt;
; DisplayName                   Section        DeviceID&lt;br /&gt;
; -----------                   -------        --------&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A,       PCI\VEN_8086&amp;amp;DEV_153A&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A,       PCI\VEN_8086&amp;amp;DEV_153A&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E153ANC.DeviceDesc%            = E153A,       PCI\VEN_8086&amp;amp;DEV_153A&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A,       PCI\VEN_8086&amp;amp;DEV_155A&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A,       PCI\VEN_8086&amp;amp;DEV_155A&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E155ANC.DeviceDesc%            = E155A,       PCI\VEN_8086&amp;amp;DEV_155A&amp;amp;SUBSYS_00011179&lt;br /&gt;
%E15A0NC.DeviceDesc%            = E15A0,       PCI\VEN_8086&amp;amp;DEV_15A0&lt;br /&gt;
%E15A0NC.DeviceDesc%            = E15A0,       PCI\VEN_8086&amp;amp;DEV_15A0&amp;amp;SUBSYS_00008086&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;%E15A1NC.DeviceDesc%            = E15A1.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;%E15A1NC.DeviceDesc%            = E15A1.6.1.1,       PCI\VEN_8086&amp;amp;DEV_15A1&amp;amp;SUBSYS_00008086&lt;/span&gt;&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2,       PCI\VEN_8086&amp;amp;DEV_15A2&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2,       PCI\VEN_8086&amp;amp;DEV_15A2&amp;amp;SUBSYS_00008086&lt;br /&gt;
%E15A2NC.DeviceDesc%            = E15A2,       PCI\VEN_8086&amp;amp;DEV_15A2&amp;amp;SUBSYS_00011179&lt;/blockquote&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/7404503304607430386/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/7404503304607430386' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7404503304607430386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7404503304607430386'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/05/windows-2008-r2-inter-i218-v.html' title='windows 2008 r2 安裝 Inter I218-V 驅動方式'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040816050020259145.post-3831812422865844425</id><published>2015-01-05T11:56:00.000+08:00</published><updated>2015-10-06T11:48:25.069+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="easyrent"/><category scheme="http://www.blogger.com/atom/ns#" term="iRent"/><category scheme="http://www.blogger.com/atom/ns#" term="和運"/><title type='text'>和運 IRent 有夠爛 part2</title><content type='html'>話說，1/1號跟客服反應後，客服也拿了我的卡號說會去跟銀行講來處理。結果 1/2號中午去問客服，結果還是沒處理，而且根本狀況外，似乎客服系統根本沒有任何紀錄一樣，等我講完了才說有留言，阿是留言在客服系統裡面，還是留個小紙條給接班的人？&lt;br /&gt;
&lt;br /&gt;
1/3號更誇張，早上9:42分發個簡訊來說，帳戶需要1680+1938元金額才能過卡，請把錢存夠後通知客服協助處理。那我前兩天是在聯繫個心酸的嗎？這表示IRENT的客服系統、租用系統有很大的問題。&lt;br /&gt;
&lt;br /&gt;
1. 租用系統無法把帳務跟租車部份完全切割。也就是說如果發生像我這樣的狀況，該車完全會被卡住，都無法出租，所以才會需要我去完成還車的動作後才能繼續出租給別人。這根本是天大的笑話，你要全自動也要留備案阿。這樣搞到客戶跟自己不是很好笑？&lt;br /&gt;
&lt;br /&gt;
2. 客服人員素質跟系統問題，1/3號的客服講了很多他不該透漏的東西。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 2-1. 很多VISA簽帳卡的客戶都有發生過&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 這表示你們知道有這個問題，卻沒有處理這個問題的流程，也可能其他客戶就很單純的把錢存入就解決了。但我個人基本上錢是算好的，你這樣等於卡了我一週的生活費，那沒拿到薪水前，誰要幫我解決生活費問題？&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 2-2. 銀行不會對個案做處理&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 或許不會對個案做處理，但基本上人工處理絕對辦得到，只是你們要不要去做而已。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 我為何可以講得這麼多，因為我也寫過跟信用卡使用的相關程序，我知道信用卡在網路交易上的流程，各家銀行或多或少都有不一樣的地方，但總流程是不變得。還有我相信和運的系統絕對是外包給廠商，而跟銀行介接這段是和運自己跟銀行接洽後轉給廠商，還是直接用廠商的系統去借接銀行，這就不得而之。但不論是哪一種，都一定會有可以取消的機制在。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 再來是客服系統，客服系統到底有沒有詳細的紀錄客戶問題？1/1號就反應了，1/2號的客服好像完全不清楚狀況，當然如果不是從0800進線，客服系統就無法抓到單號？這表示電話流程上跟電信實體介接方式有問題。不然為何1/3號打去，也是一問三不知，而且還轉到第二個客服人員才有比較好得應對。問題是我早就被你們搞毛了，而且三天講得處理方式都不一樣，阿我之前都是講心酸的嗎？&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 最後是租用系統，為何無法手動處理訂單？不能強制還車？第二次還車，app還一定要拍照，為何不能用第一次拍得？有爭議訂單為何不能轉入爭議狀態，解除車輛被系統鎖定問題？&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 反正不論如何，這次本以為依據和運以往的服務狀況，應該會是每好得經驗，但完全被這次的狀況整個洗白了，真心對想租車的朋友說，沒事還是請找據點租用會比較保險。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; </content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/3831812422865844425/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/3831812422865844425' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3831812422865844425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3831812422865844425'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/01/irent-part2.html' title='和運 IRent 有夠爛 part2'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-8510652376954253556</id><published>2015-01-01T23:58:00.000+08:00</published><updated>2015-10-06T11:48:18.127+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="easyrent"/><category scheme="http://www.blogger.com/atom/ns#" term="iRent"/><category scheme="http://www.blogger.com/atom/ns#" term="和運"/><title type='text'>和運 IRent 有夠爛</title><content type='html'>今天租用和運的IRent感覺非常爛。&lt;br /&gt;
1.車子沒整理過 有前任租用戶留下的垃圾&lt;br /&gt;
&amp;nbsp; &amp;nbsp;這個還可以接受，因為本來就據點的每次還車後都會送去整理，IRENT本來就全自助的，會有這種問題是很正常的。&lt;br /&gt;
2.車子的行照跟車號不符&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 這算是最誇張的部份，詢問和運還說可能是前任車主租用兩台把兩台資料搞混的關係。這啥鳥答案，這表示和運根本沒有每天去檢查車輛的資料是否正確。&lt;br /&gt;
&lt;br /&gt;
3.信用卡要扣兩次款項（取車時會預扣額度，該預扣額度會被佔用，所以如果用VISA簽帳卡，你帳戶要預留兩次費用+油費）&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
外加跟和運人員通電話，一整個爛到爆，啥都要我們自己處理。搞的我們不能用加油卡加油（要自己用現金付），然後加完了才說要打統編跟車號，希望我們回去加油站更正。還車還因為取車時已經預扣款項，導致無法扣款完成還車手續，所以完全無法還車。&lt;br /&gt;
&lt;br /&gt;
客服還沒有主管可以授權處理。

本來想說以往和運據點的經驗來看，應該會是很方便且愉快的服務。結果壓根就不是這麼回事，啥都爛到炸。其中最誇張的是行照資料不正確，理由盡然是跟我說可能是前任客戶租兩台所以搞錯兩台的資料，這是不是表示你們在給下一位用戶使用前沒有檢查？？就算沒辦法每次都檢查，好歹一天檢查一次吧？看來是以前美好的經驗，搞成了今天超級不愉快的經驗。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 最後還要去問我的發卡行，發卡行說取車的預扣款，要由和運的網來銀行收單單位跟我的發卡行的商店服務科聯繫，才能去把預扣款佔用的額度扣除。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;換句話說，除非你像我這樣錢都卡的死死的人，否則你根本不會碰到這種問題。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;還有，還車一定要上傳照片，第二次還車還必須要重照，不能用地一次還車時照的照片。所以一整個完全不方便。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;現在就要看和運跟銀行那邊誰可以處理好。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/8510652376954253556/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/8510652376954253556' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8510652376954253556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8510652376954253556'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2015/01/irent.html' title='和運 IRent 有夠爛'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-8137051795900418475</id><published>2014-04-09T18:28:00.001+08:00</published><updated>2014-04-09T18:28:33.503+08:00</updated><title type='text'>Taiwan Philharmonic (NSO) - &quot;The Power of Sheng&quot;  w. Super Mario  超級瑪莉</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;//www.youtube.com/embed/qM9hH3suOpo&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
非常厲害阿XD</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/8137051795900418475/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/8137051795900418475' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8137051795900418475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8137051795900418475'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2014/04/taiwan-philharmonic-nso-power-of-sheng.html' title='Taiwan Philharmonic (NSO) - &quot;The Power of Sheng&quot;  w. Super Mario  超級瑪莉'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040816050020259145.post-2842724587391113864</id><published>2012-09-20T13:41:00.001+08:00</published><updated>2012-09-20T13:41:59.098+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="實體主機 主機代管 主機託管 服務器租用 服務器託管 主機租用 DDOS DDOS防護"/><title type='text'>架站是否需要租用虛擬主機、vps或實體主機等</title><content type='html'>    其實很多人玩網站或是論壇玩到後面，都會考慮到租用各類主機的需求。 通常會考慮到租用各類主機的最大原因就是，用戶已經成長到超過免費資源能承受的程度。但租用主機前其實也要考慮到，自己是否有能力管理這些主機，同時是否有足夠的技術能力，能解決相關技術問題。
    其實不論是虛擬主機、vps或實體主機等，最大的差異在於，虛擬主機是跟所有人共用所有的設定檔，如iis或apache的設定檔，ftp，資料庫（mysql或mssql）等。而vps則是大家共用cpu、ram跟hdd的資源，但設定檔全都是自己的。實體主機則是全部都是你個人獨享。這樣看起來vps跟實體主機的差異好像只有共用cpu、ram跟hdd的資源部份。
     但不論哪一類的主機，最怕的就是被ddos攻擊，而ddos攻擊分為1.流量型2.資源消耗型。碰到流量型的話，不論哪類的主機統統都會出事，因為影響的是服務提供商的整條線路，通常會採用把你的網站停用或是把流向給你使用的ip在路由上導向null，藉以避免影響到其他用戶。 而資源消耗型對虛擬及vps主機來說，通常就會設定一個上限，避免影響到其他用戶，雖說不似流量型會影響到全部客戶，但仍然會造成一定影響。而實體主機的話，因為沒有任何人跟你共用，所以就只能靠自己利用防火牆或服務提供商所提供的防火牆來進行一些阻擋。
     因此是否要租用各類主機，就要看自己願意花費多少（這裡不單指金錢、還包括時間）來穩定自己的服務。有興趣的人，可以來信跟我討論，信中請註明大名及聯絡方式。
    </content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2842724587391113864/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2842724587391113864' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2842724587391113864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2842724587391113864'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2012/09/vps.html' title='架站是否需要租用虛擬主機、vps或實體主機等'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-2702145195619503376</id><published>2012-06-13T14:50:00.000+08:00</published><updated>2012-06-13T14:51:01.823+08:00</updated><title type='text'>賺一塊錢不是賺，省一塊錢才是賺一塊錢</title><content type='html'>標題的用法應該要改成，「賺一塊錢不是賺，不浪費一塊錢才是賺一塊錢」。&lt;br /&gt;
&lt;br /&gt;
省要省對地方，省錯地方，出事才知道已經來不及了。&lt;br /&gt;
&lt;br /&gt;
網路上看到，應該是王永慶說過的話。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2702145195619503376/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2702145195619503376' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2702145195619503376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2702145195619503376'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2012/06/blog-post.html' title='賺一塊錢不是賺，省一塊錢才是賺一塊錢'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-3724724416638060622</id><published>2012-06-13T13:57:00.002+08:00</published><updated>2012-06-13T13:57:58.767+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>MySQL 的安全漏洞</title><content type='html'>&lt;a href=&quot;http://thehackernews.com/2012/06/cve-2012-2122-serious-mysql.html&quot;&gt;http://thehackernews.com/2012/06/cve-2012-2122-serious-mysql.html&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
看起來是 5.1.61, 5.2.11, 5.3.5, 5.5.22 以前的版本都有漏洞&lt;br /&gt;
&lt;br /&gt;
輸入網頁中的那個指令 有一定的機率能拿到root&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/3724724416638060622/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/3724724416638060622' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3724724416638060622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3724724416638060622'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2012/06/mysql.html' title='MySQL 的安全漏洞'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-8631430356928477863</id><published>2012-05-30T15:43:00.001+08:00</published><updated>2012-05-30T15:43:26.468+08:00</updated><title type='text'>Windows Media Player Toolbar on Chrome</title><content type='html'>如果用chrome開啟頁面發現，chrome說缺少Windows Media Player外掛程式的話。&lt;br /&gt;
&lt;br /&gt;
安裝這個chrome用的外掛即可&lt;br /&gt;
&lt;a href=&quot;https://support.google.com/chrome/bin/answer.py?hl=zh-Hant&amp;amp;answer=95697&amp;amp;p=plugin_wmp&quot;&gt;https://support.google.com/chrome/bin/answer.py?hl=zh-Hant&amp;amp;answer=95697&amp;amp;p=plugin_wmp&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
不要直接點 chrome給的連結，那個裝了沒效果。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/8631430356928477863/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/8631430356928477863' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8631430356928477863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8631430356928477863'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2012/05/windows-media-player-toolbar-on-chrome.html' title='Windows Media Player Toolbar on Chrome'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-2617659039440674308</id><published>2012-02-06T22:06:00.000+08:00</published><updated>2012-02-06T22:06:50.750+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="MIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Open Source"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Yum Repo"/><title type='text'>webmin及openwebmail安裝</title><content type='html'>以下都是透過yum方式安裝，rpm及tarball方式請自行google。&lt;br /&gt;
一、安裝webmin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 參考:&lt;a href=&quot;http://webmin.com/rpm.html&quot;&gt;http://webmin.com/rpm.html&lt;/a&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: url(http://webmin.com/images/square-green.png); background-origin: initial; background-position: 3px 50%; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(239, 240, 241); border-bottom-style: solid; border-bottom-width: 1px; color: #88ac0b; font-family: Tahoma, Verdana, &#39;Trebuchet MS&#39;, sans-serif; font-size: 14px; font: normal normal bold 125%/normal Verdana, &#39;Trebuchet MS&#39;, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 25px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;

Using the Webmin YUM repository&lt;/h1&gt;
&lt;div style=&quot;background-color: #cccccc; color: #333333; font-family: Verdana, Tahoma, arial, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;
If you like to install and update Webmin via RPM, create the&lt;tt style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;/etc/yum.repos.d/webmin.repo&lt;/tt&gt;&amp;nbsp;file containing :&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: #fafafa; background-image: initial; background-origin: initial; border-bottom-color: rgb(242, 242, 242); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(242, 242, 242); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(242, 242, 242); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(242, 242, 242); border-top-style: solid; border-top-width: 1px; display: block; font: normal normal 500 1em/1.5em &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;[Webmin]&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;name=Webmin Distribution Neutral&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;#baseurl=http://download.webmin.com/download/yum&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;mirrorlist=http://download.webmin.com/download/yum/mirrorlist&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;enabled=1&lt;/code&gt;You should also fetch and install my GPG key with which the packages are signed, with the commands :&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: #fafafa; background-image: initial; background-origin: initial; border-bottom-color: rgb(242, 242, 242); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(242, 242, 242); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(242, 242, 242); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(242, 242, 242); border-top-style: solid; border-top-width: 1px; display: block; font: normal normal 500 1em/1.5em &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;wget http://www.webmin.com/jcameron-key.asc&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;rpm --import jcameron-key.asc&lt;/code&gt;You will now be able to install with the command :&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: #fafafa; background-image: initial; background-origin: initial; border-bottom-color: rgb(242, 242, 242); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(242, 242, 242); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(242, 242, 242); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(242, 242, 242); border-top-style: solid; border-top-width: 1px; display: block; font: normal normal 500 1em/1.5em &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;yum install webmin&lt;/code&gt;All dependencies should be resolved automatically.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
二、安裝openwebmail&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
How to install openwebmail from yum repository&lt;br /&gt;
==============================================&lt;br /&gt;
Thomas Chung &amp;lt;tchung@openwebmail.org&amp;gt;&lt;br /&gt;
2008.05.29&lt;br /&gt;
UPDATE 2010.05.24&lt;br /&gt;
Install perl-Text-Iconv from rpmforge for your arch if you&#39;re running RHEL or CentOS:&lt;br /&gt;
http://dag.wieers.com/rpm/packages/perl-Text-Iconv/&lt;br /&gt;
$ su -&lt;br /&gt;
# cd /etc/yum.repos.d&lt;br /&gt;
# lftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo&lt;br /&gt;
# yum install openwebmail&lt;br /&gt;
fedora                    100% |=========================| 2.1 kB    00:00&lt;br /&gt;
openwebmail               100% |=========================|  951 B    00:00&lt;br /&gt;
updates                   100% |=========================| 2.3 kB    00:00&lt;br /&gt;
Setting up Install Process&lt;br /&gt;
Parsing package install arguments&lt;br /&gt;
Resolving Dependencies&lt;br /&gt;
--&amp;gt; Running transaction check&lt;br /&gt;
---&amp;gt; Package openwebmail.i386 0:2.53-1 set to be updated&lt;br /&gt;
--&amp;gt; Processing Dependency: openwebmail-data = 2.53-1 for package: openwebmail&lt;br /&gt;
--&amp;gt; Processing Dependency: perl-suidperl for package: openwebmail&lt;br /&gt;
--&amp;gt; Processing Dependency: perl-Text-Iconv for package: openwebmail&lt;br /&gt;
--&amp;gt; Running transaction check&lt;br /&gt;
---&amp;gt; Package openwebmail-data.i386 0:2.53-1 set to be updated&lt;br /&gt;
---&amp;gt; Package perl-suidperl.i386 4:5.8.8-32.fc8 set to be updated&lt;br /&gt;
---&amp;gt; Package perl-Text-Iconv.i386 0:1.5-1.fc8 set to be updated&lt;br /&gt;
--&amp;gt; Finished Dependency Resolution&lt;br /&gt;
Dependencies Resolved&lt;br /&gt;
=============================================================================&lt;br /&gt;
Package                 Arch       Version          Repository        Size&lt;br /&gt;
=============================================================================&lt;br /&gt;
Installing for dependencies:&lt;br /&gt;
openwebmail             i386       2.53-1           openwebmail       2.3 M&lt;br /&gt;
openwebmail-data        i386       2.53-1           openwebmail       7.0 M&lt;br /&gt;
perl-Text-Iconv         i386       1.5-1.fc8        fedora             20 k&lt;br /&gt;
perl-suidperl           i386       4:5.8.8-32.fc8   updates            60 k&lt;br /&gt;
Transaction Summary&lt;br /&gt;
=============================================================================&lt;br /&gt;
Install      4 Package(s)&lt;br /&gt;
Update       0 Package(s)&lt;br /&gt;
Remove       0 Package(s)&lt;br /&gt;
Total download size: 9.4 M&lt;br /&gt;
Is this ok [y/N]: y&lt;br /&gt;
Downloading Packages:&lt;br /&gt;
(1/4): perl-Text-Iconv-1. 100% |=========================|  20 kB    00:00&lt;br /&gt;
(2/4): openwebmail-2.53-1 100% |=========================| 2.3 MB    00:03&lt;br /&gt;
(3/4): perl-suidperl-5.8. 100% |=========================|  60 kB    00:00&lt;br /&gt;
(4/4): openwebmail-data-2 100% |=========================| 7.0 MB    00:10     &lt;br /&gt;
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID cfb164d8&lt;br /&gt;
Importing GPG key 0xCFB164D8 &quot;Thomas Chung &amp;lt;tchung@openwebmail.org&amp;gt;&quot; from http://openwebmail.org/.../RPM-GPG-KEY-openwebmail&lt;br /&gt;
Is this ok [y/N]: y&lt;br /&gt;
Running rpm_check_debug&lt;br /&gt;
Running Transaction Test&lt;br /&gt;
Finished Transaction Test&lt;br /&gt;
Transaction Test Succeeded&lt;br /&gt;
Running Transaction&lt;br /&gt;
Installing: perl-Text-Iconv              ######################### [1/4]&lt;br /&gt;
Installing: perl-suidperl                ######################### [2/4]&lt;br /&gt;
Installing: openwebmail                  ######################### [3/4]&lt;br /&gt;
Permission and Ownership for openwebmail files have been fixed!&lt;br /&gt;
Please execute following tool first as a root:&lt;br /&gt;
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init&lt;br /&gt;
After restarting httpd service, login with non-root account from&lt;br /&gt;
http://localhost.localdomain/cgi-bin/openwebmail/openwebmail.pl&lt;br /&gt;
or http://localhost.localdomain/webmail&lt;br /&gt;
If SELinux enabled, you may need to set it &#39;permissive&#39; in&lt;br /&gt;
/etc/sysconfig/selinux or system-config-selinux&lt;br /&gt;
Installing: openwebmail-data             ######################### [4/4]&lt;br /&gt;
Dependency Installed: openwebmail.i386 0:2.53-1 openwebmail-data.i386 0:2.53-1 perl-Text-Iconv.i386 0:1.5-1.fc8 perl-suidperl.i386 4:5.8.8-32.fc8&lt;br /&gt;
Complete!&lt;/blockquote&gt;
三、 openwebmail安裝好後的設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 修改/var/log/openwebmail.log的 selinux設定&lt;br /&gt;
參考：&lt;a href=&quot;http://j796160836.pixnet.net/blog/post/21882397-%5B%E7%AD%86%E8%A8%98%5D%5B%E6%A5%B5%E9%87%8D%E8%A6%81%5Dopenwebmail%E7%9A%84%E9%97%9C%E9%8D%B5%E8%A8%AD%E5%AE%9A%EF%BC%8C%E8%A8%AD%E5%AE%9Aselinu&quot;&gt;http://j796160836.pixnet.net/blog/post/21882397-%5B%E7%AD%86%E8%A8%98%5D%5B%E6%A5%B5%E9%87%8D%E8%A6%81%5Dopenwebmail%E7%9A%84%E9%97%9C%E9%8D%B5%E8%A8%AD%E5%AE%9A%EF%BC%8C%E8%A8%AD%E5%AE%9Aselinu&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2617659039440674308/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2617659039440674308' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2617659039440674308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2617659039440674308'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2012/02/webminopenwebmail.html' title='webmin及openwebmail安裝'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-6445308459136552086</id><published>2011-10-31T13:35:00.000+08:00</published><updated>2011-10-31T13:35:09.788+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C/C++"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><title type='text'>取得檔案的版本資訊 file version information</title><content type='html'>&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int &amp;nbsp; iVerInfoSize;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char &amp;nbsp; *pBuf;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnsiString &amp;nbsp; asVer;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;VS_FIXEDFILEINFO &amp;nbsp; *pVsInfo;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;unsigned &amp;nbsp; int &amp;nbsp; iFileInfoSize &amp;nbsp; = &amp;nbsp; sizeof( &amp;nbsp; VS_FIXEDFILEINFO &amp;nbsp; );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;iVerInfoSize &amp;nbsp; = &amp;nbsp; GetFileVersionInfoSize(Application-&amp;gt;ExeName.c_str(), NULL);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(iVerInfoSize!= &amp;nbsp; 0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;pBuf &amp;nbsp; = &amp;nbsp; new &amp;nbsp; char[iVerInfoSize];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(GetFileVersionInfo(Application-&amp;gt;ExeName.c_str(),0, iVerInfoSize, pBuf &amp;nbsp; ) &amp;nbsp; )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(VerQueryValue(pBuf, L&quot;\\&quot;,(void **)&amp;amp;pVsInfo,&amp;amp;iFileInfoSize))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;asVer = IntToStr( HIWORD(pVsInfo-&amp;gt; dwFileVersionMS) ) + &quot;.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;asVer+= IntToStr( LOWORD(pVsInfo-&amp;gt; dwFileVersionMS) ) + &quot;.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;asVer+= IntToStr( HIWORD(pVsInfo-&amp;gt; dwFileVersionLS) ) + &quot;.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;asVer+= IntToStr( LOWORD(pVsInfo-&amp;gt; dwFileVersionLS) );&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;delete &amp;nbsp; []pBuf;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/6445308459136552086/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/6445308459136552086' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/6445308459136552086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/6445308459136552086'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/10/file-version-information.html' title='取得檔案的版本資訊 file version information'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-6574984461257822123</id><published>2011-10-28T18:59:00.001+08:00</published><updated>2011-10-28T18:59:49.775+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C/C++"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>TMemo AutoScroll</title><content type='html'>參考來源：&lt;br /&gt;
&lt;a href=&quot;http://www.programmer-club.com.tw/showSameTitleN/cb/7076.html&quot;&gt;http://www.programmer-club.com.tw/showSameTitleN/cb/7076.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
MSDN:&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/desktop/bb787577(v=vs.85).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/bb787577(v=vs.85).aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Memo1-&amp;gt;Perform(WM_VSCROLL,SB_BOTTOM ,0);&lt;br /&gt;
直接用SB_BOTTOM就好。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/6574984461257822123/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/6574984461257822123' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/6574984461257822123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/6574984461257822123'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/10/tmemo-autoscroll.html' title='TMemo AutoScroll'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-8945809174220737458</id><published>2011-10-06T21:26:00.003+08:00</published><updated>2011-10-06T21:26:56.667+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>Fedora 讓gnome可以用root登入</title><content type='html'>參考來源：&lt;a href=&quot;http://fedoraproject.org/wiki/Enabling_Root_User_For_GNOME_Display_Manager&quot;&gt;http://fedoraproject.org/wiki/Enabling_Root_User_For_GNOME_Display_Manager&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
要先有root權限或是用sudo方式處理。&lt;br /&gt;
&lt;br /&gt;
1. 修改 /etc/pam.d/gdm&lt;br /&gt;
&amp;nbsp; &amp;nbsp;將&lt;br /&gt;
&amp;nbsp; &amp;nbsp;auth required pam_succeed_if.so user != root quiet&lt;br /&gt;
&amp;nbsp; &amp;nbsp;這行改成&lt;br /&gt;
&amp;nbsp; &amp;nbsp;#auth required pam_succeed_if.so user != root quiet&lt;br /&gt;
2. 修改 /etc/pam.d/gdm-password&lt;br /&gt;
&amp;nbsp; 同1的方式修改&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 不過一般不建議這樣作，畢竟安全至上。除非你自己有相當的管理經驗。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/8945809174220737458/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/8945809174220737458' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8945809174220737458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/8945809174220737458'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/10/fedora-gnomeroot.html' title='Fedora 讓gnome可以用root登入'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-2627849468226435295</id><published>2011-09-05T23:52:00.000+08:00</published><updated>2011-09-05T23:55:55.844+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open Source"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Manager"/><title type='text'>專案管理工具</title><content type='html'>最近在找專案管理工具，找到這個open source的 &lt;a href=&quot;http://www.phprojekt.com/&quot;&gt;phprojekt&lt;/a&gt;。&lt;br /&gt;
預設只有英文、德文及西班牙文，現在正在努力得翻譯中，到時候拿來做專案管理就會比較方便了。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2627849468226435295/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2627849468226435295' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2627849468226435295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2627849468226435295'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/09/blog-post.html' title='專案管理工具'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-1149324515228408919</id><published>2011-08-10T15:32:00.005+08:00</published><updated>2011-08-10T15:34:22.395+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Windows XP 更新 會跑到這一個網頁 http://support.microsoft.com/kb/2497281/</title><content type='html'>今天在灌XP的時候發生了問題，查了老半天後才知道有東西要更新。&lt;br /&gt;
發生的原因是這個 &lt;a href=&quot;http://lissam.pixnet.net/blog/post/34930721-windows-xp-%E6%9B%B4%E6%96%B0-%E6%9C%83%E8%B7%91%E5%88%B0%E9%80%99%E4%B8%80%E5%80%8B%E7%B6%B2%E9%A0%81-http%3A--support.mi&quot;&gt;Windows XP 更新 會跑到這一個網頁 http://support.microsoft.com/kb/2497281/&lt;/a&gt;&lt;br /&gt;
解決方式就如連結內所敘述，直接找一台正常的XP的wuweb.dll，然後複製到新主機上覆蓋過去就好。 </content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/1149324515228408919/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/1149324515228408919' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/1149324515228408919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/1149324515228408919'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/08/wuwebdll.html' title='Windows XP 更新 會跑到這一個網頁 http://support.microsoft.com/kb/2497281/'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-7375362872266353263</id><published>2011-08-04T20:45:00.005+08:00</published><updated>2011-08-05T00:57:14.384+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><category scheme="http://www.blogger.com/atom/ns#" term="Snort"/><title type='text'>Install snort 2.9.0.5 on CentOS 5.5</title><content type='html'>今天裝Snort 2.9.0.5到CentOS 5.5上，遭遇很多問題。&lt;br /&gt;
所以寫這篇紀錄如何安裝。這篇完全用tarball方式安裝，RPM部份請參考(http://forum.icst.org.tw/phpbb/viewtopic.php?f=11&amp;amp;t=20365)。&lt;br /&gt;
這邊是安裝好CentOS 5.5並且將全部套件更新到最新版後的安裝方式。&lt;br /&gt;
&lt;br /&gt;
1.事前準備&lt;br /&gt;
&amp;nbsp; 1.1 從snort官網下載&lt;a href=&quot;http://www.snort.org/downloads/867&quot;&gt;snort-2.9.0.5.tar.gz&lt;/a&gt;, &lt;a href=&quot;http://www.snort.org/downloads/860&quot;&gt;dag-0.5.tar.gz&lt;/a&gt;。&lt;br /&gt;
&amp;nbsp; 1.2 下載snort的rule,免費的即可，前提是你要先註冊一個帳號。將來有想要升級的話也可以升級上去。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.snort.org/downloads/1030&quot;&gt;snortrules-snapshot-2904.tar.gz&lt;/a&gt;, &lt;a href=&quot;http://www.snort.org/downloads/1031&quot;&gt;snortrules-snapshot-2905.tar.gz&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; 1.3 到http://www.tcpdump.org 下載&lt;a href=&quot;http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz&quot;&gt;libpcap-1.1.1.tar.gz&lt;/a&gt;。&lt;br /&gt;
&amp;nbsp; 1.4 到http://libdnet.sourceforge.net 下載&lt;a href=&quot;http://prdownloads.sourceforge.net/libdnet/libdnet-1.11.tar.gz?download&quot;&gt;libdnet-1.11.tar.gz&lt;/a&gt;。&lt;br /&gt;
&amp;nbsp; 1.5 將snort,dag,libdnet及libpcap解開(請自行到&lt;a href=&quot;http://linux.vbird.org/&quot;&gt;鳥哥&lt;/a&gt;那瞭解如何解壓縮)，到各自目錄夾。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 通常解開的目錄就是檔案去掉tar.gz的部份。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 例：snort-2.9.0.5.tar.gz解開後目錄名稱為snort-2.9.0.5。&lt;br /&gt;
2.開始安裝&lt;br /&gt;
&amp;nbsp; 2.1 用瀏覽器打開 &lt;a href=&quot;http://www.snort.org/assets/145/Install_Snort_2.8.6_on_CentOS_5.5.pdf&quot;&gt;Install_Snort_2.8.6_on_CentOS_5.5.pdf&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;請依照裡面的 Snort Installation and Setup章節安裝。裡面會要你用yum安裝很多套件。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;安裝完後會到 Making directories and building/installing Snort: 章節。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;接下來的請依順序安裝，不然會有錯誤訊息。&lt;br /&gt;
&amp;nbsp; 2.2 安裝libdnet&lt;br /&gt;
&lt;code&gt;cd libdnet-1.11&lt;br /&gt;
./configure --prefix=/usr&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&amp;nbsp; 2.3 安裝libpcap&lt;br /&gt;
&lt;code&gt;cd libpcap-1.1.1&lt;br /&gt;
./configure --prefix=/usr&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&amp;nbsp; 2.4 安裝dag&lt;br /&gt;
&lt;code&gt;cd dag-0.5&lt;br /&gt;
./configure --prefix=/usr&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&amp;nbsp; 2.5 安裝snort&lt;br /&gt;
&lt;code&gt;cd snort-2.9.0.5&lt;br /&gt;
./configure --with-mysql --enable-dynamicplugin --enable-ipv6 --enable-gre --enable-mpls --enable-targetbased --enable-decoder-preprocessor-rules --enable-ppm --enable-perfprofiling --enable-zlib --enable-active-response --enable-normalizer --enable-reload --enable-react --enable-flexresp3&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&amp;nbsp; 2.6 接著就接續Making directories and building/installing Snort:後面章節的部份繼續安裝下去。&lt;br /&gt;
&lt;br /&gt;
3. PHP Pear部份&lt;br /&gt;
&amp;nbsp; &amp;nbsp;3.1 安裝php pear&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
yum -y install php-pear&lt;br /&gt;
pear upgrade --force http://download.pear.php.net/package/PEAR-1.9.1.tgz&lt;br /&gt;
pear install Numbers_Roman&lt;br /&gt;
pear install channel://pear.php.net/Numbers_Words-0.16.2&lt;br /&gt;
pear install Image_Color&lt;br /&gt;
pear install channel://pear.php.net/Image_Canvas-0.3.2&lt;br /&gt;
pear install channel://pear.php.net/Image_Graph-0.7.2&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
4. adodb&lt;br /&gt;
&lt;code&gt;wget http://sourceforge.net/projects/adodb/files/adodb-php5-only/adodb-511-for-php5/adodb511.tgz/download&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
5. secureideas&lt;br /&gt;
&lt;code&gt;wget http://sourceforge.net/projects/secureideas/files/BASE/base-1.4.5/base-1.4.5.tar.gz/download&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
6. Barnyard2&lt;br /&gt;
安裝裡面的網站已經不存在了，現在換到這個https://nodeload.github.com/firnsy/barnyard2/tarball/master。&lt;br /&gt;
&amp;nbsp; 6.1 請參閱doc裡面的INSTALL文件&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 如果發生 AM_PATH_LIBPRELUDE 錯誤的話，依下面方式處理。&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
cp snort-2.9.0.5/m4/libprelude.m4 /usr/share/aclocal &lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
snort-2.9.0.5可以改成你實際解開的目錄。&lt;br /&gt;
&amp;nbsp; 6.2 之後就./configure --with-mysql --prefix=/usr沒問題的話就可以安裝了&lt;br /&gt;
&lt;br /&gt;
7. 修改snort.conf&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;把ipvar部份全部改成var。&lt;br /&gt;
&lt;br /&gt;
全部做完後就可以開始使用Snort了。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/7375362872266353263/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/7375362872266353263' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7375362872266353263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7375362872266353263'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/08/install-snort-2905-on-centos-55.html' title='Install snort 2.9.0.5 on CentOS 5.5'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-2207411415551037766</id><published>2011-06-07T22:56:00.001+08:00</published><updated>2011-06-07T22:57:00.119+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Application"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>VS2005,VS2008,VS2010 出現automation伺服程式無法產生物件 解決方式</title><content type='html'>解決方式：&lt;br /&gt;
請執行 Regsvr32  scrrun.dll</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2207411415551037766/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2207411415551037766' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2207411415551037766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2207411415551037766'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/06/vs2005vs2008vs2010-automation.html' title='VS2005,VS2008,VS2010 出現automation伺服程式無法產生物件 解決方式'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-3975542240146461361</id><published>2011-03-23T23:07:00.000+08:00</published><updated>2011-03-23T23:07:25.051+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="Application"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB"/><title type='text'>用 RadioButtonList 當 UpdatePanel Trigger 時無法正常觸發非同步更新之解法</title><content type='html'>ASP.NET的RadioButtonList，預設不會作PostBack，但是如果用上AutoPostBack又會跟Page_Load中的IsPostBack有相衝的地方。&lt;br /&gt;
所以可以採用下列的方式，就可以讓RadioButtonList作PostBack了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
用 RadioButtonList 當 UpdatePanel Trigger 時無法正常觸發非同步更新之解法&lt;br /&gt;
原始問題出處。這問題印象中我好像也碰過幾次，但一直沒有去深究原因，因為要解決並不困難 (容後說明)，但今天再度看到有人提問，索性好好了解一下始末。 &lt;br /&gt;
&lt;br /&gt;
首先依照原發問者提供的頁面配置及程式碼重現案發現場： &lt;br /&gt;
&lt;br /&gt;
aspx部份&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;ajaxToolkit:ToolkitScriptManager ID=&quot;ToolkitScriptManager1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/ajaxToolkit:ToolkitScriptManager&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;asp:RadioButtonList ID=&quot;rblType&quot; runat=&quot;server&quot; OnSelectedIndexChanged=&quot;rblType_SelectedIndexChanged&quot;&lt;br /&gt;
&lt;br /&gt;
        RepeatDirection=&quot;Horizontal&quot; AutoPostBack=&quot;true&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;asp:ListItem Value=&quot;I&quot; Selected=&quot;True&quot;&amp;gt;新增新案&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;asp:ListItem Value=&quot;U&quot;&amp;gt;修改新案&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;asp:ListItem Value=&quot;O&quot;&amp;gt;舊案續約&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/asp:RadioButtonList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;asp:UpdatePanel ID=&quot;upl&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot; ChildrenAsTriggers=&quot;False&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:Panel ID=&quot;pnl&quot; runat=&quot;server&quot; Visible=&quot;false&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;asp:DropDownList ID=&quot;ddlAmtYear&quot; runat=&quot;server&quot; Width=&quot;320&quot; Height=&quot;23&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;Triggers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:AsyncPostBackTrigger ControlID=&quot;rblType&quot; EventName=&quot;SelectedIndexChanged&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/Triggers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
CS部份&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
protected void rblType_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    if (rblType.SelectedValue == &quot;I&quot;)&lt;br /&gt;
&lt;br /&gt;
        pnl.Visible = false;&lt;br /&gt;
&lt;br /&gt;
    else&lt;br /&gt;
&lt;br /&gt;
        pnl.Visible = true;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
程式很單純，判斷 RadioButtonList 的選取值以非同步更新的方式切換 Panel 隱藏 / 顯示，但執行起來果真如發問者所說，RadioButtonList.SelectedIndexChanged 初次引發時，會觸發 UpdatePanel 更新，但接下來再點回去預設選項則不會觸發非同步更新…。 &lt;br /&gt;
&lt;br /&gt;
身為一個網頁開發人員，遇到網頁執行結果不如預期時，把網頁開起來檢視原始碼是常用的除錯技巧，不一會兒工夫，看到一個不尋常的地方： &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://files.dotblogs.com.tw/hunterpo/0911/RadioButtonListUpdatePanelTrigger_12816/radiobuttonlist_html_2.png&quot; rel=&quot;lightbox&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;radiobuttonlist_html&quot; border=&quot;0&quot; alt=&quot;radiobuttonlist_html&quot; src=&quot;http://files.dotblogs.com.tw/hunterpo/0911/RadioButtonListUpdatePanelTrigger_12816/radiobuttonlist_html_thumb.png&quot; width=&quot;804&quot; height=&quot;454&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
如上圖所示，RadioButtonList 預設選取的選項，在 Render 成 HTML 後少了 &quot;onclick=javascript:setTimeout(&#39;__doPostBack(\&#39;rblType$0\&#39;,\&#39;\&#39;)&quot; 這一段，這是設定 RadioButtonList.AutoPostBack 屬性為 true 時，會自動幫每一個選項加上去的，目的是在點選任一選項之後送回 Server 端處理，要命的是預設選取的那一個選項不會加...。 &lt;br /&gt;
&lt;br /&gt;
知道原因之後，可以來想怎麼解決了。開頭說過我曾遇過同樣的問題，沒有深究的原因是這問題沒有耽擱到太多時間，所以一直不以為意，其實只要把 RadioButtonList 放到 UpdatePanel 裡面就不會有這樣的問題了，這是比較建議的做法。但真的不想把 RadioButtonList 丟到 UpdatePanel 裡的話也是有解，但要動點手腳，既然預設選取的選項會少指令碼，那我們就手動補上去，比較恰當的時機點是在 RadioButtonList.PreRender 事件處理： &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;protected void rblType_PreRender(object sender, EventArgs e)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    RadioButtonList radioButtonList = ((RadioButtonList)sender);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    foreach (ListItem li in radioButtonList.Items)&lt;br /&gt;
&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
        // 預設選取的選項加上 onclick 事件指令碼&lt;br /&gt;
&lt;br /&gt;
        if (li.Selected)&lt;br /&gt;
&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
            li.Attributes.Add(&quot;onclick&quot;,&lt;br /&gt;
&lt;br /&gt;
                String.Format(&quot;javascript:setTimeout(&#39;__doPostBack(\\&#39;{0}${1}\\&#39;,\\&#39;\\&#39;)&#39;, 0)&quot;,&lt;br /&gt;
&lt;br /&gt;
                radioButtonList.UniqueID,&lt;br /&gt;
&lt;br /&gt;
                radioButtonList.Items.IndexOf(li)));&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/3975542240146461361/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/3975542240146461361' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3975542240146461361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/3975542240146461361'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/03/radiobuttonlist-updatepanel-trigger.html' title='用 RadioButtonList 當 UpdatePanel Trigger 時無法正常觸發非同步更新之解法'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-7962021285065448331</id><published>2011-03-23T20:11:00.010+08:00</published><updated>2011-03-24T20:34:32.634+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Research"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB"/><title type='text'>在開始上傳前檢查檔案大小(IE僅能檢查圖片)</title><content type='html'>這篇其實不是單純只能檢查圖片而已，連一般檔案都可以檢查。目前還沒在Safari瀏覽器上實驗過就是了。&lt;br /&gt;
2011/3/24 04:18 剛確認了IE如果是圖片以外的檔案，確實要用額外的方式處理。&lt;br /&gt;
&lt;br /&gt;
[JavaScript] 在開始上傳前檢查圖片檔案大小&lt;br /&gt;
最近有此功能需求，因此查了些相關的資料，最後在不使用 Flash 及 ActiveX 等技術的情況下，只用JavaScript完成了多瀏覽器的功能實作，在此分享。&lt;br /&gt;
&lt;br /&gt;
目前已測試過的瀏覽器：IE 6 , IE 7 , IE 8 , Firefox , Chrome；另外 Firefox 與 Chrome 的版本須為支援 Html 5 的版本。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下為 HTML (此部分與 Bryan(不來ㄣ)大大的版本相同 )：&lt;br /&gt;
&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=big5&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;title&amp;gt;上傳&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;form action=&quot;upload.asp&quot; method=&quot;POST&quot; name=&quot;FileForm&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;圖片:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;input type=&quot;file&quot; name=&quot;file1&quot; size=&quot;20&quot; id=&quot;file1&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;input type=&quot;button&quot; value=&quot;確定上傳&quot; onclick=&quot;checkFile()&quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
以下為 JavaScript：&lt;br /&gt;
&lt;code&gt;&amp;lt;script src=&quot;http://code.jquery.com/jquery-1.4.2.min.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fileSize = 0; //檔案大小&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var SizeLimit = 1024;  //上傳上限，單位:byte&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function checkFile() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var f = document.getElementById(&quot;file1&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//FOR IE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ($.browser.msie) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var img = new Image();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;img.onload = checkSize;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;img.src = f.value;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//FOR Firefox,Chrome&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileSize = f.files.item(0).size;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;checkSize();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//檢查檔案大小&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function checkSize() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//FOR IE FIX&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ($.browser.msie) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileSize = this.fileSize;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (fileSize &amp;gt; SizeLimit) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Message((fileSize / 1024).toPrecision(4), (SizeLimit / 1024).toPrecision(2));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.FileForm.submit();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function Message(file, limit) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var msg = &quot;您所選擇的檔案大小為 &quot; + file + &quot; kB\n已超過上傳上限 &quot; + limit + &quot; kB\n不允許上傳！&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert(msg);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;br /&gt;
參考資料：&lt;br /&gt;
topcat 姍舞之間的極度凝聚 -  [轉貼]上傳檔案前，JavaScript檢查檔案格式、大小：&lt;a href=&quot;http://www.dotblogs.com.tw/topcat/archive/2009/02/20/7250.aspx&quot;&gt;http://www.dotblogs.com.tw/topcat/archive/2009/02/20/7250.aspx&lt;/a&gt; (Bryan(不來ㄣ)大大的版本 – For IE)&lt;br /&gt;
簡單過生活 - Check 上傳檔案大小：&lt;a href=&quot;http://iammic.pixnet.net/blog/post/11866034&quot;&gt;http://iammic.pixnet.net/blog/post/11866034&lt;/a&gt; (iammic大大的版本 – For IE[ActiveX] &amp;amp; Firefox , Chrome)&lt;br /&gt;
&lt;br /&gt;
2010/09/22 更新：&lt;br /&gt;
在 o 大大的指正後，將標題略為修改為針對圖片檔案的上傳之檔案大小的檢查，以避免因標題誤導了想找資料的訪客。&lt;br /&gt;
另外，在支援 HTML 5 的 Firefox 與 Chrome 的瀏覽器版本上，是可正確抓到各類型檔案大小的；而 IE 瀏覽器仍須透過 Flash 或 ActiveX 等技術才能取得圖片類型以外的檔案大小，在此作以上更正。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/7962021285065448331/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/7962021285065448331' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7962021285065448331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/7962021285065448331'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/03/blog-post.html' title='在開始上傳前檢查檔案大小(IE僅能檢查圖片)'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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-6040816050020259145.post-2790874894278947561</id><published>2011-02-22T21:27:00.003+08:00</published><updated>2011-02-22T21:36:20.942+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Nagios Plungin"/><category scheme="http://www.blogger.com/atom/ns#" term="Naigos"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Nagios Plugin Check_SNMP</title><content type='html'>OS: CentOS 5.5&lt;br /&gt;Nagios: nagios-3.2.3-3.el5.rf.i386&lt;br /&gt;這篇是關於Nagios Plugin Check_SNMP中關於--rate指令的使用方式。&lt;br /&gt;如果你是用YUM或是apt等方式安裝的Nagios，可能在使用check_snmp的--rate選項的時候會發生錯誤。&lt;br /&gt;原因是因為check_snmp在儲存rate的狀態的時候，會除存在/var/check_snmp裡面，而extinfo.cgi確無法在開啟檔案，原因是目錄建立的時候，使用者及群組不是nagios(或你自訂的群組)，權限也只有700。&lt;br /&gt;所以將使用者及群組改成nagios(或你自訂的群組)，權限也修改成755(或你覺得安全權限)。&lt;br /&gt;裡面如果原本就有檔案的話，也請將使用者及群組改成nagios(或你自訂的群組)，權限640即可。想省事一點可以把檔案全砍了，反正重新建立也不會有啥影響。之後重新啟動nagios就會正常。</content><link rel='replies' type='application/atom+xml' href='http://blog.streitleak.net/feeds/2790874894278947561/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6040816050020259145/2790874894278947561' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2790874894278947561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040816050020259145/posts/default/2790874894278947561'/><link rel='alternate' type='text/html' href='http://blog.streitleak.net/2011/02/nagios-plugin-checksnmp.html' title='Nagios Plugin Check_SNMP'/><author><name>streitleak</name><uri>http://www.blogger.com/profile/18338253321798771284</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></feed>