<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ROOTLAU.COM &#187; Linux</title>
	<atom:link href="http://blog.rootlau.com/wp/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rootlau.com/wp</link>
	<description>Root Lau Offical Blog</description>
	<lastBuildDate>Sat, 29 Nov 2014 05:45:31 +0000</lastBuildDate>
	<language>zh-TW</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>OpenLDAP-Postfix With SASL2 SMTP Auth 設定</title>
		<link>http://blog.rootlau.com/wp/openldap-postfix-with-sasl2-smtp-auth-%e8%a8%ad%e5%ae%9a/</link>
		<comments>http://blog.rootlau.com/wp/openldap-postfix-with-sasl2-smtp-auth-%e8%a8%ad%e5%ae%9a/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 10:02:50 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[I.T.]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/wp/?p=244</guid>
		<description><![CDATA[前言 談到 [E-Mail] 就不得不提一下這三個名詞 [MTA]、[MDA]、[MUA]，關於 [E-Mail] 從使用者發信到收信如何運作可參考 [ twbsd.org - Wang, Chun-Pin 第十六章 郵件伺服器圖解] 了解。 MTA，Mail Transfer Agent：郵件轉送代理人，負責傳送、轉送郵件 (Relay)，如：[Sendmail]、[Postfix]、[Qmail] MDA，Mail Delivery Agent：郵件遞送代理人，負責把進來的郵件遞送、過濾到使用者信箱內，如：[Procmail]、[MailDrop] MUA，Mail User Agent：郵件使用者代理人，使用者用來發信、收信的程式，如：[Outlook Express]、[SquirrelMail] E-Mail 相關服務聆聽埠號 (Listen Port) [SMTP]：25 SMTPs (SMTP Over SSL)：465 [POP3]：110 POP3s (POP3 Over SSL)：995 [IMAP]：143 IMAPs (IMAP Over SSL)：993 實作環境 FreeBSD 6.1-STABLE postfix-2.3.1,1 cyrus-sasl-saslauthd-2.1.22 安裝及設定 步驟1.安裝 Postfix 套件 切換至 Ports Tree 路徑安裝 postfix 套件 #cd /usr/ports/mail/postfix //切換至套件路徑 #make install clean //安裝 postfix [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2 id="Heading1">前言</h2>
<p>談到 <a href="http://zh.wikipedia.org/w/index.php?title=%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6&amp;variant=zh-tw" target="_blank">[E-Mail]</a> 就不得不提一下這三個名詞 <a href="http://en.wikipedia.org/wiki/Mail_transfer_agent" target="_blank">[MTA]</a>、<a href="http://en.wikipedia.org/wiki/Mail_delivery_agent" target="_blank">[MDA]</a>、<a href="http://en.wikipedia.org/wiki/Mail_user_agent" target="_blank">[MUA]</a>，關於 <a href="http://zh.wikipedia.org/w/index.php?title=%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6&amp;variant=zh-tw" target="_blank">[E-Mail]</a> 從使用者發信到收信如何運作可參考 <a href="http://www.twbsd.org/cht/book/images/ch16_02.png" target="_blank">[ twbsd.org - Wang, Chun-Pin 第十六章 郵件伺服器圖解]</a> 了解。</p>
<ul>
<li><strong>MTA</strong>，<strong>M</strong>ail <strong>T</strong>ransfer <strong>A</strong>gent：郵件轉送代理人，負責傳送、轉送郵件 (Relay)，如：<a href="http://en.wikipedia.org/wiki/Sendmail" target="_blank">[Sendmail]</a>、<a href="http://zh.wikipedia.org/w/index.php?title=Postfix&amp;variant=zh-tw" target="_blank">[Postfix]</a>、<a href="http://zh.wikipedia.org/w/index.php?title=Qmail&amp;variant=zh-tw" target="_blank">[Qmail]</a></li>
<li><strong>MDA</strong>，<strong>M</strong>ail <strong>D</strong>elivery <strong>A</strong>gent：郵件遞送代理人，負責把進來的郵件遞送、過濾到使用者信箱內，如：<a href="http://en.wikipedia.org/wiki/Procmail" target="_blank">[Procmail]</a>、<a href="http://en.wikipedia.org/wiki/Maildrop" target="_blank">[MailDrop]</a></li>
<li><strong>MUA</strong>，<strong>M</strong>ail <strong>U</strong>ser <strong>A</strong>gent：郵件使用者代理人，使用者用來發信、收信的程式，如：<a href="http://zh.wikipedia.org/w/index.php?title=Outlook_Express&amp;variant=zh-tw" target="_blank">[Outlook Express]</a>、<a href="http://en.wikipedia.org/wiki/SquirrelMail" target="_blank">[SquirrelMail]</a></li>
</ul>
<p><strong>E-Mail 相關服務聆聽埠號 (Listen Port)</strong></p>
<ul>
<li><a href="http://zh.wikipedia.org/w/index.php?title=%E7%AE%80%E5%8D%95%E9%82%AE%E4%BB%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE&amp;variant=zh-tw" target="_blank">[SMTP]</a>：25
<ul>
<li>SMTPs (SMTP Over SSL)：465</li>
</ul>
</li>
<li><a href="http://zh.wikipedia.org/w/index.php?title=POP3&amp;variant=zh-tw" target="_blank">[POP3]</a>：110
<ul>
<li>POP3s (POP3 Over SSL)：995</li>
</ul>
</li>
<li><a href="http://zh.wikipedia.org/w/index.php?title=IMAP&amp;variant=zh-tw" target="_blank">[IMAP]</a>：143
<ul>
<li>IMAPs (IMAP Over SSL)：993</li>
</ul>
</li>
</ul>
<h2 id="Heading2">實作環境</h2>
<ul>
<li>FreeBSD 6.1-STABLE</li>
<li>postfix-2.3.1,1</li>
<li>cyrus-sasl-saslauthd-2.1.22</li>
</ul>
<h2 id="Heading3">安裝及設定</h2>
<h3 id="Heading4">步驟1.安裝 Postfix 套件</h3>
<p>切換至 Ports Tree 路徑安裝 postfix 套件</p>
<pre> #cd /usr/ports/mail/postfix      //切換至套件路徑
 #make install clean              //安裝 postfix 並勾選下列項目
 [X] PCRE      Perl Compatible Regular Expressions   
 [X] SASL2     Cyrus SASLv2 (Simple Auth. and Sec. Layer)   
 [X] TLS       Enable SSL and TLS support                    
 [X] BDB       Berkeley DB (choose version with WITH_BDB_VER)   
 [X] OPENLDAP  OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)</pre>
<p>安裝途中將會尋問二個問題</p>
<pre> 1.You need user "postfix" added to group "mail".Would you like me to add it [y]? y   //是否將 postfix 加入 mail 群組，此例回答 y
 2.Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y                 //是否在 /etc/mail/mailer.conf 中啟動 Postfix，此例回答 y</pre>
<p>安裝完後系統還會貼心的提醒說 <strong>如果使用 SASL 認證的方式，必須確定 postfix 這個代理使用者有權力讀取 sasldb 的檔案</strong></p>
<pre> If you are using SASL, you need to make sure that postfix has access to read the sasldb file.
 This is accomplished by adding postfix to group mail and making the /usr/local/etc/sasldb* file(s) readable by group mail (this shouldbe the default for new installs).</pre>
<h3 id="Heading5">步驟2.設定 Postfix 能讀取 SASL 設定檔</h3>
<p>查看 SASL 設定檔知道其擁有人 (owner) 及群組 (groups) 為 cyrus 因此我們將 postfix 加入此群組 (cyrus) 內，以便屆時 postifx 服務能順利讀取 SASL 設定檔。</p>
<pre> #ls -l /usr/local/etc/sasldb*                    //查看 sasldb 權限
 -rw-r-----  1 cyrus  mail  16384  7 27 11:36 /usr/local/etc/sasldb2.db</pre>
<p>修改群組 (group) 檔案將 postfix 加入 cyrus 群組</p>
<pre> #vi /etc/group                                   //修改群組檔案
 cyrus:*:60:postfix                               //將 postfix 加入 cyurs 群組內</pre>
<h3 id="Heading6">步驟3.安裝 Cyrus-Sasl2-Saslauthd 套件</h3>
<p>切換至 Ports Tree 路徑安裝 Cyrus-Sasl2-Saslauthd 套件</p>
<pre> #cd /usr/ports/security/cyrus-sasl2-saslauthd    //切換至套件路徑
 #make install clean                              //安裝 SASL2 套件</pre>
<p>安裝完後系統仍貼心提醒你要使用 SASL 功能記得在 rc.conf 內加上 saslauthd_enable=&#8221;YES&#8221;</p>
<pre> To run saslauthd from startup, add saslauthd_enable="YES" in your /etc/rc.conf.</pre>
<h3 id="Heading7">步驟4.檢查 /etc/master.passwd 及 /etc/group</h3>
<p>由於安裝 postfix 時系統會新增 postfix 這個使用者及群組，但這樣的動作將會我們破壞我們在 <a href="http://www.weithenn.org/cgi-bin/wiki.pl?OpenLDAP-PAM_NSS_%e8%a8%ad%e5%ae%9a">OpenLDAP-PAM NSS 設定</a> 這篇的設定，因此記得修改回來吧!! (否則將造成登入失敗)</p>
<p>修改系統使用者密碼及群組檔案，將認證部份導至 LDAP</p>
<pre> #vipw
 postfix:*:125:125::0:0:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin
 +:*::::::::                //確保此行在最後一行
 #vim /etc/group
 postfix:*:125:
 +:*:0:                     //確保此行在最後一行</pre>
<h3 id="Heading8">步驟5.修改 /etc/rc.conf</h3>
<p>修改 /etc/rc.conf 加入啟動相關服務設定，以便系統重新開機時能自動帶起 Postfix、SASL 服務，由於我們 <a href="http://en.wikipedia.org/wiki/Mail_transfer_agent" target="_blank">[MTA]</a> 採用 Postfix 所以記得將 Sendmail 服務關閉。</p>
<pre> #vi /etc/rc.conf
 sendmail_enable="NO"       //關閉 Sendmail
 postfix_enable="YES"       //啟動 Postfix 服務
 saslauthd_enable="YES"     //啟動 SASL 服務</pre>
<p>關於 Sendmail 於 rc.conf 內設定 None、No、Yes 意義？</p>
<ol>
<li>None：將 Sendmail 完全關閉</li>
<li>NO：Sendmail 只監聽 Localhost (127.0.0.1:25)</li>
<li>YES：啟用 Sendmail</li>
</ol>
<h3 id="Heading9">步驟6.建立 smtpd.conf</h3>
<p>修改 SMTP 設定檔</p>
<pre> #vi /usr/local/lib/sasl2/smtpd.conf                        //修改 SMTP 設定檔
 pwcheck_method: saslauthd                                  //修改認證方法
 mech_list: plain login cram-md5 digest-md5                 //修改認證方式</pre>
<h3 id="Heading10">步驟7.修改 postfix 設定檔 main.cf</h3>
<p>修改 Postfix 設定檔 main.cf，以下僅列出基本設定 (即僅列出修改項目)</p>
<pre> myhostname = mail.weithenn.org
 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
 mynetworks_style = subnet
 mynetworks = 192.168.1.0/24, 127.0.0.0/8, 61.60.59.58/32   //指定 LAN 網段及 Public IP
 alias_maps = hash:/usr/local/etc/postfix/aliases           //預設使用 /etc/aliases
 home_mailbox = Maildir/                                    //採用 MailDir 方式收取 E-Mail</pre>
<p>啟動 Authenticated Relay 功能</p>
<pre> broken_sasl_auth_clients = yes
 smtpd_sasl_auth_enable = yes
 smtpd_sasl_security_options = noanonymous
 smtpd_sasl_local_domain = $myhostname
 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_relay_domains,
 smtpd_client_restrictions = permit_sasl_authenticated</pre>
<h3 id="Heading11">步驟8.建立別名 (Aliases) 資料庫</h3>
<p>建立 E-Mail 別名 (Aliases) 資料庫也就是產生 /usr/local/etc/postfix/aliases.db 檔案鍵入如下指令即可，或執行 newaliases 指令。</p>
<pre> #postalias /usr/local/etc/postfix/aliases</pre>
<h3 id="Heading12">步驟9.停止/啟動相關服務</h3>
<p>由於我們 <a href="http://en.wikipedia.org/wiki/Mail_transfer_agent" target="_blank">[MTA]</a> 採用 Postfix 所以在啟動 Postfix 服務以前記得先將 Sendmail 服務關閉。</p>
<pre> #/etc/rc.d/sendmail stop                     //停止 Sendmail 服務 
 Stopping sendmail_submit.
 #/usr/local/etc/rc.d/postfix start           //啟動 Postfix 服務
 postfix/postfix-script: starting the Postfix mail system
 #/usr/local/etc/rc.d/saslauthd start         //啟動 SASL 服務
 Starting saslauthd.</pre>
<h3 id="Heading13">步驟10.測試 SMTP Auth 功能</h3>
<p>Postfix 及 SASL 服務成功啟動後可依如下方式來測試 SMTP Authentication 機制是否作用了</p>
<pre> #telnet localhost 25                         //連結至本機 SMTP
 Trying ::1...
 Trying 127.0.0.1...
 Connected to localhost.weithenn.org.      
 Escape character is '^]'.
 220 mail.weithenn.org ESMTP Postfix          //若前述步驟未執行 postalias 將不會出現此行也就是 postfix 啟動但卻找不到 DB
 ehlo localhost                               //測試 SASL 機制 (此行為自行輸入)
 250-mail.weithenn.org
 250-PIPELINING
 250-SIZE 10240000
 250-VRFY
 250-ETRN
 250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5     //主機回應 SMTP AUTH LOGIN 成功
 250-AUTH=LOGIN PLAIN DIGEST-MD5 CRAM-MD5     
 250-ENHANCEDSTATUSCODES
 250-8BITMIME
 250 DSN
 quit                                         //離開 (此行為自行輸入)
 221 2.0.0 Bye
 Connection closed by foreign host.</pre>
<p>若使用的 <a href="http://en.wikipedia.org/wiki/Mail_user_agent" target="_blank">[MUA]</a> 為 Outlook Express 則請勾選 <strong>我的伺服器需要驗證</strong> 項目才能順利使用 Outlook Express 發送信件，如下圖所示</p>
<p><a href="http://picasaweb.google.com/weithenn/FreeBSD#5344864511426734930" target="_blank"><img title="Outlook Express - 我的伺服器需要驗證" src="http://lh3.ggpht.com/_GTuTuBNvS8s/SizF9HAuq1I/AAAAAAAAY2g/69Fw0nvau6M/s220/openldap_postfix_sasl.jpg" alt="Outlook Express - 我的伺服器需要驗證" /></a></p>
<p>當 <a href="http://en.wikipedia.org/wiki/Mail_user_agent" target="_blank">[MUA]</a> 通過 SASL 驗證機制寄信成功 Maillog 訊息，類似如下</p>
<pre> Aug 26 13:57:42 ldap postfix/smtpd[51569]: 8722B5C3A: client=weithenn.lan.home[192.168.1.11], sasl_method=LOGIN, sasl_username=weithenn@weithenn.org



轉載自：<a href="http://www.weithenn.org/cgi-bin/wiki.pl?OpenLDAP-Postfix_With_SASL2_SMTP_Auth_%E8%A8%AD%E5%AE%9A#Heading15">http://www.weithenn.org/cgi-bin/wiki.pl?OpenLDAP-Postfix_With_SASL2_SMTP_Auth_%E8%A8%AD%E5%AE%9A#Heading15</a>

</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/openldap-postfix-with-sasl2-smtp-auth-%e8%a8%ad%e5%ae%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5.1 安裝 OpenWebMail</title>
		<link>http://blog.rootlau.com/wp/centos5-1-%e5%ae%89%e8%a3%9d-openwebmail/</link>
		<comments>http://blog.rootlau.com/wp/centos5-1-%e5%ae%89%e8%a3%9d-openwebmail/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 05:31:16 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/wp/?p=56</guid>
		<description><![CDATA[新安裝了CentOS 5.1版，（64位元版），仍舊使用Sendmail作為郵件伺服器，現要安裝Openwebmail，使用yum(已使用管理員權限）： * cd /etc/yum.repos.d * get ftp://openwebmail.org/pub/yum/openwebmail.repo * yum install openwebmail 接下來只要按下「y」，讓程式自動執行就可以了，比以前要安裝許多的相關附屬套件，真是輕鬆多了！ 參考網頁：http://openwebmail.org/openwebmail/download/redhat/yum/readme.txt]]></description>
				<content:encoded><![CDATA[<p>新安裝了CentOS 5.1版，（64位元版），仍舊使用Sendmail作為郵件伺服器，現要安裝Openwebmail，使用yum(已使用管理員權限）：</p>
<p>* cd /etc/yum.repos.d<br />
* get ftp://openwebmail.org/pub/yum/openwebmail.repo<br />
* yum install openwebmail</p>
<p>接下來只要按下「y」，讓程式自動執行就可以了，比以前要安裝許多的相關附屬套件，真是輕鬆多了！</p>
<p>參考網頁：http://openwebmail.org/openwebmail/download/redhat/yum/readme.txt</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/centos5-1-%e5%ae%89%e8%a3%9d-openwebmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend 原來也可以通過 yum 來安裝</title>
		<link>http://blog.rootlau.com/wp/zend-%e5%8e%9f%e4%be%86%e4%b9%9f%e5%8f%af%e4%bb%a5%e9%80%9a%e9%81%8e-yum-%e4%be%86%e5%ae%89%e8%a3%9d/</link>
		<comments>http://blog.rootlau.com/wp/zend-%e5%8e%9f%e4%be%86%e4%b9%9f%e5%8f%af%e4%bb%a5%e9%80%9a%e9%81%8e-yum-%e4%be%86%e5%ae%89%e8%a3%9d/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 06:26:11 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/wp/?p=53</guid>
		<description><![CDATA[Linux CentOS 5 Server: YUM Repository to Install Zend Optimizer I recently needed to install Zend Optimizer which was required by a ZenCart addon using Zend Guard. Zend Guard encrypts some or all of a PHP application to help protect its contents from being copied or modified. So I was typically like to install everything [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Linux CentOS 5 Server: YUM Repository to Install Zend Optimizer</strong></p>
<p style="line-height: normal;">I recently needed to install Zend Optimizer which was required by a ZenCart addon using Zend Guard. Zend Guard encrypts some or all of a PHP application to help protect its contents from being copied or modified. So I was typically like to install everything on CentOS using the yum package manger to make sure that updates for all applications are uniform and easy to do.</p>
<p style="line-height: normal;">The actual package that needs to be installed to install Zend Optimizer is called php-zend-optimizer and isn’t readily available in many yum repositories. On a typical CentOS installation I add a couple extra yum repos including rpmforge and a repo that provides ruby based packages for CentOS. Anyhow after awhile of searching I finally located the atomic repository which did include the php-zend-optimizer package.</p>
<p style="line-height: normal;">
<p style="line-height: normal;"><strong>Install Atomic Repository On a CentOS Server:</strong></p>
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 456px;"><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">view plain</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">copy to clipboard</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">print</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">?</a></div>
</div>
<ol style="line-height: normal;">
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 456px;"><span style="line-height: normal;">wget</span><span style="line-height: normal;"> -q</span><span style="line-height: normal;"> -O</span><span style="line-height: normal;"> &#8211; http://www.atomicorp.com/installers/atomic.sh | sh</span></div>
</li>
</ol>
</div>
<p style="line-height: normal;">The above command will download the atomic.sh script and then execute it. First the script installs the Atomic GPG key. Unless you have a Plesk server that you want packages for you can answer “n” when asked if you want to enable the Plesk yum repository. After this it will install the atomic.repo file in /etc/yum.repos.d/ directory. Its contents are located below.</p>
<p style="line-height: normal;"><strong>Contents: atomic.repo</strong></p>
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">view plain</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">copy to clipboard</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">print</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">?</a></div>
</div>
<ol style="line-height: normal;">
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;"># Name: Atomic Rocket Turtle RPM Repository for CentOS / Red Hat Enterprise Linux 5 -</span><span style="line-height: normal;"> </span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;"># URL: http://www.atomicrocketturtle.com/</span><span style="line-height: normal;"> </span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">[</span><span style="line-height: normal;">atomic</span><span style="line-height: normal;">]</span><span style="line-height: normal;"> </span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">name = CentOS / Red Hat Enterprise Linux <span style="line-height: normal;">$releasever</span><span style="line-height: normal;"> &#8211; atomicrocketturtle.com</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-5-<span style="line-height: normal;">$basearch</span><span style="line-height: normal;"> </span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#mirrorlist = http://www.atomicorp.com/channels/atomic/centos/5/mirrors-atomic</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">enabled = 1</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">priority = 1</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">protect = 0</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">gpgcheck = 1</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;"># Almost Stable, release candidates for [atomic]</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">[</span><span style="line-height: normal;">atomic-testing</span><span style="line-height: normal;">]</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">name = CentOS / Red Hat Enterprise Linux <span style="line-height: normal;">$releasever</span><span style="line-height: normal;"> &#8211; atomicrocketturtle.com &#8211; </span><span style="line-height: normal;">(</span><span style="line-height: normal;">Testing</span><span style="line-height: normal;">)</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">mirrorlist = http://www.atomicorp.com/mirrorlist/atomic-testing/centos-5-<span style="line-height: normal;">$basearch</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">enabled = 0</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">priority = 1</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">protect = 0</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;">gpgcheck = 1</div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;"># Untested, Unstable, known buggy, and incomplete packages.</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#[atomic-bleeding]</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#name = CentOS / Red Hat Enterprise Linux $releasever &#8211; atomicrocketturtle.com &#8211; (Bleeding)</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#baseurl = http://www.atomicorp.com/channels/atomic-bleeding/centos/5/$basearch/</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#enabled = 0</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#priority = 1</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#protect = 0</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt</span></div>
</li>
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 648px;"><span style="line-height: normal;">#gpgcheck = 1</span></div>
</li>
</ol>
</div>
<p style="line-height: normal;">By default only the atmoic yum repository is installed however you can also enable the atomic-testing repository and atomic-bleeding repository. Once installed issued the below command to install php-zend-optimizer.</p>
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 417px;"><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">view plain</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">copy to clipboard</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">print</a><a style="line-height: normal;" href="http://www.question-defense.com/2009/06/06/linux-centos-5-server-yum-repository-to-install-zend-optimizer/#">?</a></div>
</div>
<ol style="line-height: normal;">
<li style="line-height: normal;">
<div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; width: 417px;"><span style="line-height: normal;">yum install php-zend-optimizer</span></div>
</li>
</ol>
</div>
<p style="line-height: normal;">Now that Zend Optimizer is installed you can run PHP applications protected by Zend Guard. The Zend Optimizer package is now easily managed with the yum package manager.</p>
<div><span style="line-height: normal;"><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/zend-%e5%8e%9f%e4%be%86%e4%b9%9f%e5%8f%af%e4%bb%a5%e9%80%9a%e9%81%8e-yum-%e4%be%86%e5%ae%89%e8%a3%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SquirrelMail + poppassd</title>
		<link>http://blog.rootlau.com/wp/squirrelmail-poppassd/</link>
		<comments>http://blog.rootlau.com/wp/squirrelmail-poppassd/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 06:54:00 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/2-guid.html</guid>
		<description><![CDATA[不管輸入的密碼是多麼的正確，一律給錯： 很久沒有替別人安裝過 Mail Server 了，那個 Fedora Core 8 真了得‧‧‧ 除了給那個 Bind 玩耍了幾天外，Poppassd 也攪了我十數個小時‧‧‧ 那個 bind 竟然不許其他 ip 查詢‧‧‧ 而 Poppassd 就錯漏百出‧‧‧ 500 Old password is incorrect 查了半天程式、 log 、網路，不斷搜尋資料，一直找不到原因，直到看到有人提到 /etc/pam.d/poppassd 裡面 #%PAM-1.0 auth required pam_pwdb.so shadow nullok account required pam_pwdb.so password required pam_cracklib.so retry=3 password required pam_pwdb.so use_authtok nullok 使用的 pam_pwdb.so ，但是系統上沒有這個檔案 O_O 。仔細一查，奇了， 竟然真的找不到這個檔案。 知道原因，就好辦。仔細查了一下， 在 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>不管輸入的密碼是多麼的正確，一律給錯：</p>
<p>很久沒有替別人安裝過 Mail Server 了，那個 Fedora Core 8 真了得‧‧‧</p>
<p>除了給那個 Bind 玩耍了幾天外，Poppassd 也攪了我十數個小時‧‧‧</p>
<p>那個 bind 竟然不許其他 ip 查詢‧‧‧</p>
<p>而 Poppassd 就錯漏百出‧‧‧</p>
<blockquote><p>500 Old password is incorrect</p></blockquote>
<p>查了半天程式、 log 、網路，不斷搜尋資料，一直找不到原因，直到看到有人提到 /etc/pam.d/poppassd 裡面</p>
<blockquote><p>#%PAM-1.0<br />
auth required pam_pwdb.so shadow nullok<br />
account required pam_pwdb.so<br />
password required pam_cracklib.so retry=3<br />
password required pam_pwdb.so use_authtok nullok</p></blockquote>
<p>使用的 pam_pwdb.so ，但是系統上沒有這個檔案 O_O 。仔細一查，奇了， 竟然真的找不到這個檔案。</p>
<p>知道原因，就好辦。仔細查了一下， 在 pam 套件裡，真的沒提供 pam_pwdb.so 。而 pam_pwdb.so 與 pam_unix.so 是相同功能的模組，於是解決方法就很簡單了：</p>
<blockquote><p>cd /lib/security<br />
ln -s pam_unix.so pam_pwdb.so</p></blockquote>
<p>建立一個 soft link ，用 pam_unix.so 來提供 pam_pwdb.so 的功能，搞定！</p>
<p>但是，要求的 password 就很有要求了，我敢肯定用戶不大可能記到這樣子的密碼‧‧‧ &gt;_&lt;</p>
<p>相信不足三、二天就一定會有人走來跟我說忘記了密碼；還需努力，再找！</p>
<blockquote dir="ltr"><p>修改 /etc/pam.d/poppassd</p>
<p>刪除 pam_cracklib.so 這一行 (在這行的前面加 # 號)</p>
<p>在這行 &#8220;password required /lib/security/pam_unix.so use_authtok nullok&#8221;</p>
<p>刪除 pam_unix.so 後面的 &#8220;use_authtok&#8221;</p></blockquote>
<p>終於可以睡覺了，但太陽伯伯已經出來!‧‧‧ z&#8230; z&#8230; Z&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/squirrelmail-poppassd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.04 LTS Server</title>
		<link>http://blog.rootlau.com/wp/ubuntu-8-04-lts-server/</link>
		<comments>http://blog.rootlau.com/wp/ubuntu-8-04-lts-server/#comments</comments>
		<pubDate>Sat, 31 May 2008 20:16:00 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/3-guid.html</guid>
		<description><![CDATA[當我收到 Ubuntu 8.04 LTS Server 這張光盤時，興致勃勃地開始安裝‧‧‧ 由一開始接觸 Linux 就是使用 Redhat，別的就從沒有用過；聽說 Ubuntu 是個不錯的 distrubtion。 開始安裝時，也是得簡單，整過過程也不難，好像少了些什麼似的‧‧‧ 但是當安裝完時竟然無法以 root 登入，即時 O 晒嘴；對了，安裝時好像並沒有問 root 的密碼！只有使用安裝時建立的用戶登入好了。 最後在線上找到了些有關於 Ubuntu Server 的資訊，原來她是把 root 的帳戶 disable 了，是為了安全吧了。如果要使用只有 root 才能使用的指令，就只得在指令前加上 sudo 才可以使用。 如果要一直使用 root 的身份，可以使用以下指令： sudo -i 如果要啟動 root 的帳戶，可以使用以下指令： sudo passwd root 如果要關閉 root 的帳戶，可以使用以下指令： sudo passwd -l root 也可以在安裝時按 [F6] 進入進階模式，那裡可以啟動 root [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>
<span id=&quot;zoom&quot;>
<p>當我收到 Ubuntu 8.04 LTS Server 這張光盤時，興致勃勃地開始安裝‧‧‧</p>
<p>由一開始接觸 Linux 就是使用 Redhat，別的就從沒有用過；聽說 Ubuntu 是個不錯的 distrubtion。</p>
<p>開始安裝時，也是得簡單，整過過程也不難，好像少了些什麼似的‧‧‧</p>
<p>但是當安裝完時竟然無法以 root 登入，即時 O 晒嘴；對了，安裝時好像並沒有問 root 的密碼！只有使用安裝時建立的用戶登入好了。</p>
<p>最後在線上找到了些有關於 Ubuntu Server 的資訊，原來她是把 root 的帳戶 disable 了，是為了安全吧了。如果要使用只有 root 才能使用的指令，就只得在指令前加上 sudo 才可以使用。</p>
<p>如果要一直使用 root 的身份，可以使用以下指令：</p>
<blockquote style=&quot;margin-right: 0px;&quot; dir=&quot;ltr&quot;><p><strong><em>sudo -i</em></strong></p>
</blockquote>
<p>如果要啟動 root 的帳戶，可以使用以下指令：</p>
<blockquote style=&quot;margin-right: 0px;&quot; dir=&quot;ltr&quot;><p><strong><em>sudo passwd root</em></strong></p>
</blockquote>
<p>如果要關閉 root 的帳戶，可以使用以下指令：</p>
<blockquote style=&quot;margin-right: 0px;&quot; dir=&quot;ltr&quot;><p><strong><em>sudo passwd -l root</em></strong></p>
</blockquote>
<p>也可以在安裝時按 [F6] 進入進階模式，那裡可以啟動 root 的帳號並設定密碼。</p>
<p /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/ubuntu-8-04-lts-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解決 dovecot POP3 收信時發生 Mailbox / INBOX 錯誤的問題</title>
		<link>http://blog.rootlau.com/wp/%e8%a7%a3%e6%b1%ba-dovecot-pop3-%e6%94%b6%e4%bf%a1%e6%99%82%e7%99%bc%e7%94%9f-mailbox-inbox-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%95%8f%e9%a1%8c/</link>
		<comments>http://blog.rootlau.com/wp/%e8%a7%a3%e6%b1%ba-dovecot-pop3-%e6%94%b6%e4%bf%a1%e6%99%82%e7%99%bc%e7%94%9f-mailbox-inbox-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%95%8f%e9%a1%8c/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 19:28:00 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/4-guid.html</guid>
		<description><![CDATA[解決 dovecot POP3 收信時發生 Mailbox / INBOX 錯誤的問題 版本: dovecot-0.99.13-3.FC3 maillog: pop3(某帳號): Error syncing mbox file /var/mail/某帳號: LF not found where expected pop3(某帳號): Error indexing mbox file /var/mail/某帳號: LF not found where expected pop3(某帳號): Couldn&#8217;t open INBOX: Internal error occured. Refer to server log for more information. 以 telnet 登入 110 埠: 輸入完密碼後回應: -ERR No [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><span id="&quot;zoom&quot;"> </span></p>
<p>解決 dovecot POP3 收信時發生 Mailbox / INBOX 錯誤的問題</p>
<p>版本: dovecot-0.99.13-3.FC3</p>
<p>maillog:</p>
<p>pop3(某帳號): Error syncing mbox file /var/mail/某帳號: LF not found where expected<br />
pop3(某帳號): Error indexing mbox file /var/mail/某帳號: LF not found where expected<br />
pop3(某帳號): Couldn&#8217;t open INBOX: Internal error occured. Refer to server log for more information.</p>
<p>以 telnet 登入 110 埠:</p>
<p>輸入完密碼後回應: -ERR No INBOX for user.</p>
<p>版本: dovecot-1.0-0.beta2.7</p>
<p>maillog:</p>
<p>pop3(某帳號): Mailbox init failed top=0/0, retr=0/ del=0/0, size=0</p>
<p>Outlook Express 訊息:</p>
<p>登入您的郵件伺服器時發生錯誤。您的密碼被拒絕。&#8230;通訊協定: POP3, 伺服器回應: &#8216;-ERR Mailbox isn&#8217;t a valid mbox file&#8217;,&#8230; 伺服器錯誤: 0x800CCC90, 錯誤碼: 0x800CCC92</p>
<p>解決方法:</p>
<p>以下以 foo 代表某帳號</p>
<p>cd /var/spool/mail<br />
cp foo foo_ 備份郵件<br />
true &gt; foo 清空郵箱</p>
<p>另外寄一封信到 foo 帳號</p>
<p>cat foo_ &gt;&gt; foo 匯入剛剛備份的郵件</p>
<p>即可正常收信</p>
<p>from: <a href="http://cha.homeip.net/blog/archives/2006/06/mis.html" target="_blank">http://cha.homeip.net/blog/archives/2006/06/mis.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/%e8%a7%a3%e6%b1%ba-dovecot-pop3-%e6%94%b6%e4%bf%a1%e6%99%82%e7%99%bc%e7%94%9f-mailbox-inbox-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Linux 的 shell 上搜尋文字並替代</title>
		<link>http://blog.rootlau.com/wp/%e5%9c%a8-linux-%e7%9a%84-shell-%e4%b8%8a%e6%90%9c%e5%b0%8b%e6%96%87%e5%ad%97%e4%b8%a6%e6%9b%bf%e4%bb%a3/</link>
		<comments>http://blog.rootlau.com/wp/%e5%9c%a8-linux-%e7%9a%84-shell-%e4%b8%8a%e6%90%9c%e5%b0%8b%e6%96%87%e5%ad%97%e4%b8%a6%e6%9b%bf%e4%bb%a3/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 22:49:00 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[I.T.]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/5-guid.html</guid>
		<description><![CDATA[今天真的忙過死去活來！在決定放棄使用 Pacific Internet 的寬頻而改用 PCCW 的一刻，已經知道會有這一天的來臨‧‧‧ 無耐 Pacific Internet 實在不爭氣，連我這個 Reseller Partner 也要‧‧‧ 接著就是要將我的 Servers (幾部) 的網絡設定，DNS，HTTPD，SENDMAIL，‧‧‧ 全部也要將 IP 更換下來，痛苦‧‧‧ 幸好徙網路上找到了一個可以將文字更換的程式，工作就可以比較輕鬆地完成！ #!/bin/bash #       This script will search and replace all regular files for a string #       supplied by the user and replace it with another string. # #       Written by Daniel McCarthy # daniel.mccarthy@linuxphile.org # [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><span class="&quot;title&quot;"> </span></p>
<p><span id="&quot;zoom&quot;"> </span></p>
<p>今天真的忙過死去活來！在決定放棄使用 Pacific Internet 的寬頻而改用 PCCW 的一刻，已經知道會有這一天的來臨‧‧‧ 無耐 Pacific Internet 實在不爭氣，連我這個 Reseller Partner 也要‧‧‧</p>
<p>接著就是要將我的 Servers (幾部) 的網絡設定，DNS，HTTPD，SENDMAIL，‧‧‧ 全部也要將 IP 更換下來，痛苦‧‧‧</p>
<p>幸好徙網路上找到了一個可以將文字更換的程式，工作就可以比較輕鬆地完成！</p>
<p>#!/bin/bash<br />
#       This script will search and replace all regular files for a string<br />
#       supplied by the user and replace it with another string.<br />
#<br />
#       Written by Daniel McCarthy<br />
# daniel.mccarthy@linuxphile.org<br />
#<br />
function usage {<br />
echo &#8220;&#8221;<br />
echo &#8220;Search/replace script&#8221;<br />
echo &#8221;    Written by Daniel McCarthy&#8221;<br />
echo &#8221; daniel.mccarthy@linuxphile.org&#8221;<br />
echo &#8221; http ://linuxphile.org&#8221;<br />
echo &#8220;&#8221;<br />
echo &#8220;Not enough parameters provided.&#8221;<br />
echo &#8220;Usage: ./$0 searchstring replacestring&#8221;<br />
echo &#8220;Remember to escape any special characters in the searchstring or the replacestring&#8221;<br />
echo &#8220;&#8221;<br />
}</p>
<p>#check for required parameters<br />
if  [ ${ #1 } -gt 0  ]  &amp;&amp;  [ ${ #2 } -gt 0  ];<br />
then<br />
for f in `find  -type f`;<br />
do<br />
if grep -q $1 $f;<br />
then<br />
cp $f $f.bak<br />
echo &#8220;The string $1 will be replaced with $2 in $f&#8221;<br />
sed s/$1/$2/g &lt; $f.bak &gt; $f<br />
rm $f.bak<br />
fi<br />
done</p>
<p>else<br />
#print usage informamtion<br />
usage<br />
fi</p>
<p>參考：<a href="http://linuxphile.org/node/13"></a><a href="http://linuxphile.org/node/13" target="_blank">http://linuxphile.org/node/13</a></p>
<p><a href="&quot;http://linuxphile.org/node/13&quot;" target="&quot;_blank&quot;"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/%e5%9c%a8-linux-%e7%9a%84-shell-%e4%b8%8a%e6%90%9c%e5%b0%8b%e6%96%87%e5%ad%97%e4%b8%a6%e6%9b%bf%e4%bb%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更改 root 的密碼</title>
		<link>http://blog.rootlau.com/wp/%e6%9b%b4%e6%94%b9-root-%e7%9a%84%e5%af%86%e7%a2%bc/</link>
		<comments>http://blog.rootlau.com/wp/%e6%9b%b4%e6%94%b9-root-%e7%9a%84%e5%af%86%e7%a2%bc/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 22:34:00 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/6-guid.html</guid>
		<description><![CDATA[有不少朋友至電給小 root 問有關於如更改 root 的密碼，當然不是我的私人密碼啦！是 Linux 管理員帳戶 root 的密碼。 All you need to do is reboot the machine. When you are presented with the Grub menu, hit the &#8216;e&#8217; key. This will allow you to edit the current boot options. Add the &#8216; single&#8217; to the line that begins with &#8216;kernel /vmlinuz&#8217;.  Now press &#8216;b&#8217; to boot with the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><span class="&quot;title&quot;"> </span><span class="&quot;date&quot;"> </span><span id="&quot;zoom&quot;"> </span></p>
<p>有不少朋友至電給小 root 問有關於如更改 root 的密碼，當然不是我的私人密碼啦！是 Linux 管理員帳戶 root 的密碼。</p>
<p>All you need to do is reboot the machine. When you are presented with the Grub menu, hit the &#8216;e&#8217; key. This will allow you to edit the current boot options. Add the &#8216; single&#8217; to the line that begins with &#8216;kernel /vmlinuz&#8217;.  Now press &#8216;b&#8217; to boot with the modified boot options.</p>
<p>You&#8217;ll now be presented with the command line. At the command line simply enter &#8216;passwd&#8217;. You&#8217;ll be prompted, twice, for a new password.</p>
<p>Type in &#8216;exit&#8217; and the machine will continue booting into the normal process. Your root password has now been changed.</p>
<p>轉自：<a href="&quot;http://linuxphile.org/node/15&quot;" target="&quot;_blank&quot;">http://linuxphile.org/node/15</a></p>
<p><a href="&quot;http://linuxphile.org/node/15&quot;" target="&quot;_blank&quot;"></a></p>
<p><a href="&quot;http://linuxphile.org/node/15&quot;" target="&quot;_blank&quot;"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/%e6%9b%b4%e6%94%b9-root-%e7%9a%84%e5%af%86%e7%a2%bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding GD PHP support to Fedora Core 5 (FC5)</title>
		<link>http://blog.rootlau.com/wp/adding-gd-php-support-to-fedora-core-5-fc5/</link>
		<comments>http://blog.rootlau.com/wp/adding-gd-php-support-to-fedora-core-5-fc5/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 19:06:00 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/blog/index.php?/archives/7-guid.html</guid>
		<description><![CDATA[A simple way to install PHP-PD in FC5 % yum install gd-devel% yum install php-gd restart apache:% /sbin/service httpd restart http://iamcam.wordpress.c&#8230;&#8230;pport-to-fedora-core-5-fc5/]]></description>
				<content:encoded><![CDATA[<p><span class=&quot;title&quot;></span><span class=&quot;date&quot;></span><span id=&quot;zoom&quot;>
<p>A simple way to install PHP-PD in FC5</p>
<p>% yum install gd-devel<br />% yum install php-gd</p>
<p>restart apache:<br />% /sbin/service httpd restart</p>
<p><a href=&quot;http://iamcam.wordpress.com/2006/09/28/adding-gd-php-support-to-fedora-core-5-fc5/&quot; target=&quot;_blank&quot;>http://iamcam.wordpress.c&#8230;&#8230;pport-to-fedora-core-5-fc5/</a></p>
<p><a href=&quot;http://iamcam.wordpress.com/2006/09/28/adding-gd-php-support-to-fedora-core-5-fc5/&quot; target=&quot;_blank&quot;></a></p>
<p><a href=&quot;http://iamcam.wordpress.com/2006/09/28/adding-gd-php-support-to-fedora-core-5-fc5/&quot; target=&quot;_blank&quot;></a></p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/adding-gd-php-support-to-fedora-core-5-fc5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
