• rss
  • facebook

緊隨 ROOTLAU.COM 的最新消息和資訊

CentOS5.1 安裝 OpenWebMail

(0)

分類 : Linux

新安裝了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

Zend 原來也可以通過 yum 來安裝

(0)

分類 : Linux

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 on CentOS using the yum package manger to make sure that updates for all applications are uniform and easy to do.

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.

Install Atomic Repository On a CentOS Server:

  1. wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh

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.

Contents: atomic.repo

  1. # Name: Atomic Rocket Turtle RPM Repository for CentOS / Red Hat Enterprise Linux 5 -
  2. # URL: http://www.atomicrocketturtle.com/
  3. [atomic]
  4. name = CentOS / Red Hat Enterprise Linux $releasever – atomicrocketturtle.com
  5. mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-5-$basearch
  6. #mirrorlist = http://www.atomicorp.com/channels/atomic/centos/5/mirrors-atomic
  7. enabled = 1
  8. priority = 1
  9. protect = 0
  10. gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
  11. gpgcheck = 1
  12. # Almost Stable, release candidates for [atomic]
  13. [atomic-testing]
  14. name = CentOS / Red Hat Enterprise Linux $releasever – atomicrocketturtle.com – (Testing)
  15. mirrorlist = http://www.atomicorp.com/mirrorlist/atomic-testing/centos-5-$basearch
  16. enabled = 0
  17. priority = 1
  18. protect = 0
  19. gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
  20. gpgcheck = 1
  21. # Untested, Unstable, known buggy, and incomplete packages.
  22. #[atomic-bleeding]
  23. #name = CentOS / Red Hat Enterprise Linux $releasever – atomicrocketturtle.com – (Bleeding)
  24. #baseurl = http://www.atomicorp.com/channels/atomic-bleeding/centos/5/$basearch/
  25. #enabled = 0
  26. #priority = 1
  27. #protect = 0
  28. #gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
  29. #gpgcheck = 1

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.

  1. yum install php-zend-optimizer

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.


分手後不要問的 7 個問題

(0)

分類 : 雜記

不要問:為什麼要分手?

無論答案是什麼,都是你難以接受的原因。

不要問:你有沒有愛過我?

愛過如何,未愛過又如何?總之這一刻就是不愛。

不要問:我做錯了什麼?

愛不是講對錯,而是講感覺。相愛是談情,不是講理,當愛的感覺已經不存在,對和錯又可以挽回些什麼?

不要問:我有什麼不好?她有什麼好?我有什麼比不上她?

何必逼對方再一次侮辱你、打擊你的自信心

不要問:難道你不記得我們以前快樂的日子了麼?

他(她)要離開,就是因為他(她)要的是現在的快樂和將來的快樂。

不要問:不如我們重新來過?

這個哀求只會令對方覺得你更可憐、更卑微

不要問:我們以後還可不可以做朋友?

這樣拖泥帶水,對方只會感到厭煩。

分手時,沉默是最好的問題,也是最圓滿的答案

不愛了

連回憶

都是負荷

【轉載自互聯網,很多的 Blog 都有,不知出處。】

AVG 誤報 userenv.dll 為木馬病毒

(0)

分類 : I.T.

AVG 大誤判

一早就連續接到幾通 AVG 抓到 c:\windows\system32\userenv.dll 有木馬的電話,本來接到第一通還問他昨天是不是有用隨身碟或是下載什麼程式,等到接到第二通、第三通就直覺應該是誤判,於是趕緊打開自己的電腦果然出現一樣的警示:

找到特洛伊木馬 Downloader.Generic8.8RZC

"AVG

出現這個請直接【忽略】就好,只是會一直出現很煩耶!

或者是這個,請不要按「移除所選的感染檔案」或是「移除所有未修復的感染檔案」,直接按【關閉】就好了。

"AVG

已經無法開機了怎麼辦?

如果你已經整台電腦掃毒然後 AVG 告訴你要重開機你也照辦了,那看到這篇就有一點太晚了,因為你的電腦應該已經無法開機了!

遇到這種情形也還不到重灌的地步,只要把被 AVG 防毒殺掉的 userenv.dll 補回去就正常了,但是你要有可以開機的光碟才能作這件事。

我是習慣用 XPE 來救,但是因為不是合法的版權所以不方便在這裡提供,請你自行用搜尋引擎找找看有沒有下載點,另外你也可以試試看用 Ubuntu Live CD 開機,然後將 userenv.dll 複製到 c:\windows\system32 即可。

沒有 userenv.dll 的話,這裡有提供 userenv.dll的壓縮檔 可以下載,這是WinXP SP3的版本,其他的請自行設法從別台電腦取得。

這個問題應該在新的病毒碼出來之後就會消失了,但就怕已經很多人已經中招無法開機了 XD

2009/09/18 10:30PM 更新

更新最新版的病毒碼之後這一次的誤報事件算是落幕了,請你檢查一下你的病毒琰是不是已經升級到 2380,如果還沒的話快手動更新一下就不會再出現誤判警告了。

"AVG

AVG 免費版防毒軟體:http://www.avgtaiwan.com

AVG 誤判官方討論串:http://forums.avg.com

userenv.dll 檔案下載:http://www.dll-files.com/dllindex/dll-files.shtml?userenv

丹霞禪師

(0)

分類 :

丹霞禪師未出家時曾一度追求功名,有一天,有人對他說:「做官不如做佛」,於是他就來到了馬祖那裡,請求他收留。

可是馬祖禪師不肯收留他,對他說:「每個人都有因緣,你的因緣不在我這裡,你還是到別的地方去吧!」於是,丹霞就來到了石頭禪師那裡,石頭禪師收留了丹霞,命他每日做一些無關緊要的小事,一做就是好幾年,丹霞從無怨言。

有一天,石頭禪師命大家除草,讓大家都回去拿除草的工具,可是丹霞卻拿了一把剃刀,石頭禪師看他已經開悟,便為其剃度。

過了一段時間,丹霞去見馬祖,感謝他指點之恩,他直接進入大殿,騎在祖師的聖像上,眾人大驚,急忙向馬祖稟報,馬祖出來看到他這樣,歡喜地說:「我子天然!」,從此,丹霞禪師即以「天然」為名。

嚴冬的時候,大雪紛飛,天氣異常寒冷,寺中沒有足夠的木材了,丹霞便把大殿上的木雕佛像丟入火中取曖,眾僧紛紛斥責丹霞對佛大不敬!

丹霞說道:「我是在燒取舍利子,而不是在烤火!」

眾人厲聲斥責說:「木刻的佛像裡怎麼會有舍利子?」

丹霞說:「既然是木頭,拿來燒火又何妨?」眾人啞然。

有一天,下了一天的雨,雨剛停,丹霞禪師就與另一位道友欲趕往某地,他們遇見一位美麗的女子,她穿著綢布衣服,繫著絲質的衣帶,沒有辦法走過那條泥濘的小路。

丹霞說:「來,我抱你過去」,然後就把那女子抱過了小路,然後他們繼續趕路,直到天黑時,道友才對丹霞說:「出家人不近女色,你的行為不檢點,為什麼要那麼做呢?」

丹霞驚異的說:「什麼?那個女人嗎?我早就把她放下了,你還抱著嗎?」

生活禪理:完全遵從形式,是更大的束縛

更新了 blog 軟體

(0)

分類 : 雜記

終於忍受不了那些發放廣告留言的機械人軟件了,舊的 blog 軟件在使用上,我非常的滿意,但對抗 spam 留言的能力就很差勁‧‧‧ 在忍無可忍的情況下,終於要放棄她了。

由今天起,要愚公移山了‧‧‧

要瀏覽舊日的網誌,請 click 這裡

SquirrelMail + poppassd

(0)

分類 : Linux

不管輸入的密碼是多麼的正確,一律給錯:

很久沒有替別人安裝過 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 。仔細一查,奇了, 竟然真的找不到這個檔案。

知道原因,就好辦。仔細查了一下, 在 pam 套件裡,真的沒提供 pam_pwdb.so 。而 pam_pwdb.so 與 pam_unix.so 是相同功能的模組,於是解決方法就很簡單了:

cd /lib/security
ln -s pam_unix.so pam_pwdb.so

建立一個 soft link ,用 pam_unix.so 來提供 pam_pwdb.so 的功能,搞定!

但是,要求的 password 就很有要求了,我敢肯定用戶不大可能記到這樣子的密碼‧‧‧ >_<

相信不足三、二天就一定會有人走來跟我說忘記了密碼;還需努力,再找!

修改 /etc/pam.d/poppassd

刪除 pam_cracklib.so 這一行 (在這行的前面加 # 號)

在這行 “password required /lib/security/pam_unix.so use_authtok nullok”

刪除 pam_unix.so 後面的 “use_authtok”

終於可以睡覺了,但太陽伯伯已經出來!‧‧‧ z… z… Z…

Ubuntu 8.04 LTS Server

(0)

分類 : Linux

當我收到 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 的帳號並設定密碼。

解決 dovecot POP3 收信時發生 Mailbox / INBOX 錯誤的問題

(0)

分類 : Linux

解決 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’t open INBOX: Internal error occured. Refer to server log for more information.

以 telnet 登入 110 埠:

輸入完密碼後回應: -ERR No INBOX for user.

版本: dovecot-1.0-0.beta2.7

maillog:

pop3(某帳號): Mailbox init failed top=0/0, retr=0/ del=0/0, size=0

Outlook Express 訊息:

登入您的郵件伺服器時發生錯誤。您的密碼被拒絕。…通訊協定: POP3, 伺服器回應: ‘-ERR Mailbox isn’t a valid mbox file’,… 伺服器錯誤: 0×800CCC90, 錯誤碼: 0×800CCC92

解決方法:

以下以 foo 代表某帳號

cd /var/spool/mail
cp foo foo_ 備份郵件
true > foo 清空郵箱

另外寄一封信到 foo 帳號

cat foo_ >> foo 匯入剛剛備份的郵件

即可正常收信

from: http://cha.homeip.net/blog/archives/2006/06/mis.html

在 Linux 的 shell 上搜尋文字並替代

(0)

分類 : Linux

今天真的忙過死去活來!在決定放棄使用 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
#
function usage {
echo “”
echo “Search/replace script”
echo “    Written by Daniel McCarthy”
echo ” daniel.mccarthy@linuxphile.org”
echo ” http ://linuxphile.org”
echo “”
echo “Not enough parameters provided.”
echo “Usage: ./$0 searchstring replacestring”
echo “Remember to escape any special characters in the searchstring or the replacestring”
echo “”
}

#check for required parameters
if  [ ${ #1 } -gt 0  ]  &&  [ ${ #2 } -gt 0  ];
then
for f in `find  -type f`;
do
if grep -q $1 $f;
then
cp $f $f.bak
echo “The string $1 will be replaced with $2 in $f”
sed s/$1/$2/g < $f.bak > $f
rm $f.bak
fi
done

else
#print usage informamtion
usage
fi

參考:http://linuxphile.org/node/13