色噜噜亚洲精品中文字幕,亚洲中文无韩国r级电影,亚洲高清无在码在线电影不卡http://www.tkk7.com/sealyu/category/30673.html--- The devil's in the Detailszh-cnMon, 09 Aug 2010 08:28:01 GMTMon, 09 Aug 2010 08:28:01 GMT60Linux 與 BSD 之間的 10 個不同之處(轉)http://www.tkk7.com/sealyu/archive/2010/08/09/328281.htmlsealsealMon, 09 Aug 2010 01:02:00 GMThttp://www.tkk7.com/sealyu/archive/2010/08/09/328281.htmlhttp://www.tkk7.com/sealyu/comments/328281.htmlhttp://www.tkk7.com/sealyu/archive/2010/08/09/328281.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/328281.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/328281.html

你是否經常會聽到人們把 Linux 及 BSD 系統混為一談?是的,我有時會經常聽到一些新手,甚至于媒體都這么說。當然,事實上這兩者確實有很多相似之處,比如它們都是基于 Unix 演變而來,而且基本上這兩類系統都是由非盈利組織及團隊開發,另外我更想說的是,這兩個系統都有一個共同的目標–那就是創建最有用、最可靠的操作系統。


不過話說回來,這兩個系統確實存在著明顯的差異,當人們忽略這點的時候,整個 BSD 社區都會感到異常的憤怒,因此我們也可以經??吹?BSD 社區人員或 BSD 用戶會對 Linux 不屑一顧。因此,我會盡我所能來幫助我的 BSD 的弟兄們,讓更多的人了解到 Linux 與 BSD 的不同之處在哪里。

1、許可證

正如我們所知道的,Linux 操作系統是基于 GPL 許可證授權下的。該許可證可防止開源軟件被轉換為封閉源代碼軟件及確保源代碼的可用性。 GPL 許可證的目的就是防止二進制包成為唯一的軟件發行源。

而 BSD 許可證的限制則要少得多,它甚至允許二進制包成為唯一的發行源。這就是核心差異,可以這樣理解:GPL 許可證讓您有權擁有任何你想要使用該軟件的方法,但你必須確保提供源代碼給下一個使用它的人(包括你對它的改變部分)。而 BSD 許可證并不是要求你必須那么做。( 譯者注:這里分別維基百科上對 BSDGPL 許可證的解釋)

2、代碼控制

BSD 的代碼不是被控制在任何一個人手里,而 Linux 的內核基本上被 Linus Torvalds ( Linux 創始人 ) 所控制,BSD 并沒有單一的人來說什么可以或什么不可以進入代碼。 <script src="/javascripts/tinymce/themes/advanced/langs/zh.js" type="text/javascript"></script><script src="/javascripts/tinymce/plugins/javaeye/langs/zh.js" type="text/javascript"></script> 相反,BSD 通過一個核心小組 ” Core Team” 來管理該項目,這個核心小組比非核心小組有更多的發言權來指導 BSD 社區的發展方向,(譯者注:而據我所知,FreeBSDD 核心小組的成員會每兩年選舉一次。)

3、內核 vs 操作系統

BSD 項目維護的是整個操作系統,而 Linux 則只是主要集中在單一的內核上面。這點確實是需要注意的,雖然這兩個系統上都運行著許多相同的軟件。

4、UNIX-Like

這里有一個關于 BSD vs Linux 的古老說法:” BSD is what you get when a bunch of UNIX hackers sit down to try to port a UNIX system to the PC. Linux is what you get when a bunch of PC hackers sit down and try to write a UNIX system for the PC “,這里表達了很多。你會發現 BSD 系統更為類似于 UNIX ,而事實上它就是傳統 UNIX 的直接衍生品。而 Linux ,則是一個松散的基于 UNIX 衍生品 ( Minix ) 而新創建的一個 OS 。

5、基本系統

這是一個關于 BSD 與 Linux 之間差異的至關重要的理念。 Linux 的”基本系統” 是并不真正存在的,許多人會說,Linux 的基本系統就是內核,但問題是如果沒有任何可用的應用程序的話,那么這個內核是完全沒有價值的。而另一方面,BSD 則有一個包括眾多工具的基本系統, 甚至 libc 也是基本系統的一部分。因為這些組件都被作為一個基本系統,所以它們都是被一起開發和打包的,許多事實表明這樣更能創建出一個更具凝聚力的整體。

6、更多來自于源代碼

由于 BSD 的開發方式(使用 Ports 系統 ) 的關系,所以用戶們更多的是從源代碼來安裝程序,而不是預先編譯好的二進制包。這是一個優勢還是劣勢?這取決于不同的用戶。如果你更多的想從友好或易用性 方面考慮的話,看到這一點后你也許會有放棄的念頭,對于新用戶更是如此。但一些新的用戶也有想要從源代碼編譯安裝,這可能比較累人。但是,從源碼安裝也有 一定的優勢,比如(庫版本控制,通過特殊的包來構建系統等等)。

7、升級

由于 BSD 的開發方式的原因(見第5項),你可以利用一條指令就可以升級你的基本系統到最新版本 ( Freebsd 下是用 freebsd-update fetch update 命令)。或者你也可以下載整個源代碼樹,然后通過編譯來升級。而在 Linux 中,你也可以通過內置的包管理系統來升級系統。前者 (BSD) 僅更新基本系統,而后者 ( Linux ) 則會升級整個系統。不過請記住,BSD 中升級到最新的基本系統并不意味著所有的附加軟件包也將會被更新,而 Linux 升級的時候,所有的軟件包都會被升級。這是否意味著 Linux 處理得更好嗎?在我看未必。我經常會看到 Linux 在升級時出現嚴重錯誤,從而需要重新安裝整個系統,但這個現象基本不太可能發生在 BSD 的升級過程中。

8、前沿技術

基本上你不太可能會看到 BSD 系統運行著任何非常前沿版本的軟件。而在 Linux 這一方面,大量的發行版會分發前沿版本的軟件包。如果你是一個 ” If it isn’t broken, don’t fix it” 這樣觀點的持有者的話,你將會是 BSD 的超級粉絲。但是,如果你很新潮,想要體驗一切最新的東西,那么你最好盡快遷移到 Linux 。

9、硬件支持

你會發現,通常情況下 Linux 的硬件支持要比 BSD 更早一些。但這并不是說 BSD 沒有像 Linux 那樣支持足夠多的硬件,它只是意味著在某些情況下 Linux 會在 BSD 之前先支持某些硬件。因此,如果你想要最新的、最好的顯卡的話,基本上不用考慮 BSD 了。如果你有一個包含了最新無線芯片的新型筆記本的話,建議你選擇 Linux,運氣好的話也許它會支持。

10、用戶群

在這里我冒險概括一下計算機用戶們,但我想先聲明一下每一個事物都有例外。下面我要向你展示我對用戶分布方面的概括。

Mac –> Windows –> Linux –> BSD –> UNIX

從左邊到右邊,分別是”使用該 OS 的人里精通電腦的用戶群最少”到”使用該 OS 的人里精通電腦的用戶群最多”的過渡。我們可以看到,Linux的被放置在了中間,而 BSD 則更接近于右邊。許多人會對此有爭論,也有些人可能會感覺被冒犯了。但是,個人認為這是一個對”哪些用戶使用哪些系統”相當準確的概括。

其他的不同點?

這個列表并不想表明哪個系統比哪個更好。事實上,BSD 和 Linux 各有著自己的亮點。你認為怎么樣?有興趣的話也請表達出你的觀點。



seal 2010-08-09 09:02 發表評論
]]>
Ubantu10.04安裝RabbitVCS方法(轉)http://www.tkk7.com/sealyu/archive/2010/07/28/327280.htmlsealsealWed, 28 Jul 2010 01:21:00 GMThttp://www.tkk7.com/sealyu/archive/2010/07/28/327280.htmlhttp://www.tkk7.com/sealyu/comments/327280.htmlhttp://www.tkk7.com/sealyu/archive/2010/07/28/327280.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/327280.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/327280.html
RabbitVCS是Linux下替代TortoiseSVN的一個可視化工具,非常不錯!
1. Go to http://wiki.rabbitvcs.org/wiki/download and click on the PPA link
2. Add "deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu lucid main" to
/etc/apt/sources.list as requested
3. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 34EF4A35
4. sudo apt-get update
5. sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus rabbitvcs-thunar thunarx-python
6. reboot


seal 2010-07-28 09:21 發表評論
]]>
ubuntu 10.04源 更新源列表(轉)http://www.tkk7.com/sealyu/archive/2010/07/22/326808.htmlsealsealThu, 22 Jul 2010 02:32:00 GMThttp://www.tkk7.com/sealyu/archive/2010/07/22/326808.htmlhttp://www.tkk7.com/sealyu/comments/326808.htmlhttp://www.tkk7.com/sealyu/archive/2010/07/22/326808.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/326808.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/326808.html臺灣

代碼:
deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted


SRT Sources

代碼:
deb http://ubuntu.srt.cn/ubuntu/ lucid main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ lucid-security main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ lucid-updates main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-backports main restricted universe multiverse


網易(速度很快)

代碼:
deb http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted



ubuntu官方上海源,提供 Kernel,Hiweed,ubuntu

代碼:
deb http://mirror.rootguide.org/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirror.rootguide.org/ubuntu/ lucid main universe restricted multiverse
deb http://mirror.rootguide.org/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://mirror.rootguide.org/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirror.rootguide.org/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirror.rootguide.org/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://mirror.rootguide.org/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirror.rootguide.org/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirror.rootguide.org/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirror.rootguide.org/ubuntu/ lucid-updates universe main multiverse restricted 


搜狐

代碼:
deb http://mirrors.shlug.org/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirrors.shlug.org/ubuntu/ lucid main universe restricted multiverse
deb http://mirrors.shlug.org/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://mirrors.shlug.org/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirrors.shlug.org/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirrors.shlug.org/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://mirrors.shlug.org/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirrors.shlug.org/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.shlug.org/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.shlug.org/ubuntu/ lucid-updates universe main multiverse restricted


骨頭源,骨頭源是bones7456架設的一個Ubuntu源 ,提供ubuntu,deepin

代碼
deb http://ubuntu.srt.cn/ubuntu/ lucid main universe restricted multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ lucid main universe restricted multiverse
deb http://ubuntu.srt.cn/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-security universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ lucid-updates universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ lucid-updates universe main multiverse restricted



seal 2010-07-22 10:32 發表評論
]]>
How to change your default locale on Ubuntu Linuxhttp://www.tkk7.com/sealyu/archive/2010/05/22/321591.htmlsealsealFri, 21 May 2010 16:16:00 GMThttp://www.tkk7.com/sealyu/archive/2010/05/22/321591.htmlhttp://www.tkk7.com/sealyu/comments/321591.htmlhttp://www.tkk7.com/sealyu/archive/2010/05/22/321591.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/321591.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/321591.html
They are all related to Ubuntu's default British locale: en_GB.UTF-8

This was causing files checked out of CVS to be in Unicode (UTF-8) format rather than ISO-8859-1 and so the British pound sign (£) was being encoded as a double-byte (rather than single-byte) character in the file.

To check which locale you currently have as your default just run: locale

Changing the default locale is a little different on Ubuntu compared to most Linux distros, these are the steps we needed to go through to get it changed:

Add the locale to the list of 'supported locales'
Edit /var/lib/locales/supported.d/local and add the following line:
en_GB ISO-8859-1

Regenerate the supported locales
Run sudo dpkg-reconfigure locales

Change the default locale
Edit /etc/environment and ensure the LANG and LANGUAGE lines read as follows:
LANG="en_GB"
LANGUAGE="en_GB:en"


UPDATE '09: An old collegue has suggested that this change should now be made in /etc/default/locale rather than /etc/environment - Thanks Guy!

Reboot!

Rerun locale to check that your default locale is now en_GB


seal 2010-05-22 00:16 發表評論
]]>
改變ubuntu的命令行語言為英文(Language:en) [轉載]http://www.tkk7.com/sealyu/archive/2010/05/22/321590.htmlsealsealFri, 21 May 2010 16:12:00 GMThttp://www.tkk7.com/sealyu/archive/2010/05/22/321590.htmlhttp://www.tkk7.com/sealyu/comments/321590.htmlhttp://www.tkk7.com/sealyu/archive/2010/05/22/321590.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/321590.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/321590.html1、修改/etc/default/locale, 改為:

LANG="en_US.UTF-8"

LANGUAGE="en_US:en"

2、sudo reboot

3、locale

顯示環境變量已經全部是英文

seal 2010-05-22 00:12 發表評論
]]>
ubuntu 10.04安裝jdkhttp://www.tkk7.com/sealyu/archive/2010/05/03/319972.htmlsealsealMon, 03 May 2010 13:44:00 GMThttp://www.tkk7.com/sealyu/archive/2010/05/03/319972.htmlhttp://www.tkk7.com/sealyu/comments/319972.htmlhttp://www.tkk7.com/sealyu/archive/2010/05/03/319972.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/319972.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/319972.html To enable Partner Repo:
SYSTEM -> ADMINISTRATION -> SOFTWARE SOURCES -> OTHER SOFTWARE -> ADD
deb http://archive.canonical.com/ lucid partner

Then CLOSE window and RELOAD, then search for Sun Java
You should find Version 6.20 ..... Install



seal 2010-05-03 21:44 發表評論
]]>
ubuntu新建用戶并添加到管理組(轉)http://www.tkk7.com/sealyu/archive/2010/05/01/319839.htmlsealsealFri, 30 Apr 2010 16:13:00 GMThttp://www.tkk7.com/sealyu/archive/2010/05/01/319839.htmlhttp://www.tkk7.com/sealyu/comments/319839.htmlhttp://www.tkk7.com/sealyu/archive/2010/05/01/319839.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/319839.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/319839.html用recovery mode模式啟動后,進入命令行模式,提示符應該是 #

1、輸入用戶管理的命令,新建用戶(以test為例):
useradd test

修改 test 用戶的密碼:
passwd test

2、將新用戶添加到管理組:
gpasswd -a test admin

3、給 test 用戶創建自己的目錄:
cd /home

mkdir test

chown test /home/test

4、重新啟動,
reboot

然后用 test 登錄,

登錄以后,點菜單“系統-系統管理-用戶和組”,進去選中你的用戶,點右邊的“屬性”按鈕,到用戶權限里打勾需要的;



seal 2010-05-01 00:13 發表評論
]]>
ubuntu 407 proxy(轉)http://www.tkk7.com/sealyu/archive/2009/10/14/298212.htmlsealsealWed, 14 Oct 2009 06:55:00 GMThttp://www.tkk7.com/sealyu/archive/2009/10/14/298212.htmlhttp://www.tkk7.com/sealyu/comments/298212.htmlhttp://www.tkk7.com/sealyu/archive/2009/10/14/298212.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/298212.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/298212.htmlcntlm 吧,比ntlmaps 好用些!

在 公司里面,網絡訪問都是通過ISA Server的(Microsoft® Internet Security and Acceleration Server),在使用Windows的時候不會出現任何問題,可是前兩天裝了Ubuntu Linux,遇到了些問題。

我使用firefox訪問網絡沒有問題,只需要設好代理服務器地址,瀏覽網站時輸入相應的用戶名和密碼即可,但在console下面使用apt-get更新系統時有問題。

開始我覺得應該這樣設置代理:
export http_proxy=http://domaindomainuser:password@proxy.corpnet.com:8080

可是總會出現這個錯誤:
407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )

后來在網上搜索了一下,找到方法解決這個問題了:

Download ntlmaps-0.9.9.0.1 from here

$ tar -zxvf ntlmaps-0.9.9.0.1

$ vim ntlmaps-0.9.9.0.1/server.cfg

Edit PARENT_PROXY,PARENT_PROXY_PORT,USER,PASSWORD to match your preferences, then run main.py

$ ./ntlmaps-0.9.9.0.1/main.py &

$ export http_proxy="http://127.0.0.1:5865 "

$ sudo apt-get update

Now, everything is OK.

seal 2009-10-14 14:55 發表評論
]]>
Ubuntu下Firefox使用flash插件亂碼問題http://www.tkk7.com/sealyu/archive/2009/05/11/270000.htmlsealsealMon, 11 May 2009 02:12:00 GMThttp://www.tkk7.com/sealyu/archive/2009/05/11/270000.htmlhttp://www.tkk7.com/sealyu/comments/270000.htmlhttp://www.tkk7.com/sealyu/archive/2009/05/11/270000.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/270000.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/270000.html sudo apt-get remove swfdec-mozilla
但是安裝過后還是亂碼,后來發現是字體配置文件的原因,解決方法:
$ sudo rm /etc/fonts/conf.d/49-sansserif.conf
然后重啟firefox。



seal 2009-05-11 10:12 發表評論
]]>
gsopcast頻道地址http://www.tkk7.com/sealyu/archive/2009/04/08/264438.htmlsealsealWed, 08 Apr 2009 04:58:00 GMThttp://www.tkk7.com/sealyu/archive/2009/04/08/264438.htmlhttp://www.tkk7.com/sealyu/comments/264438.htmlhttp://www.tkk7.com/sealyu/archive/2009/04/08/264438.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/264438.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/264438.html

seal 2009-04-08 12:58 發表評論
]]>
ubuntu 聽在線音樂http://www.tkk7.com/sealyu/archive/2009/03/10/258741.htmlsealsealTue, 10 Mar 2009 02:58:00 GMThttp://www.tkk7.com/sealyu/archive/2009/03/10/258741.htmlhttp://www.tkk7.com/sealyu/comments/258741.htmlhttp://www.tkk7.com/sealyu/archive/2009/03/10/258741.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/258741.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/258741.htmlsudo apt-get remove totem-mozilla

這樣firefox就會用MPLAYER的播放了

sudo apt-get install mplayer mozilla-mplayer

安裝mplayer的插件。

同時在about:config里增加了兩個配置項:

Network.protocol-handler.app.mms   string /usr/bin/mplayer

Network.protocal-handler.external.mms boolean True

restart it ,就OK了。


同時可以參考:

1、安裝軟件和相應解碼器

sudo apt-get install mplayer mozilla-mplayer totem-xine libxine-extracodecs w32codecs audacious

安裝后 audacious 能播放 ogg*, flac*, MP3, wma, wav, 3gp 這些格式。安裝后 mplayer 和 totem 能播放 xvid/divx 編碼的 avi 格式視頻, rm/rmvb/asf/wmv 等流媒體視頻,外加 vcd/dvd 和其他 mpeg2/mpeg4 視頻。

1) 如果要讓 Rhythmbox 和 Banshee 這些使用 gstreamer 為后端的播放器,能播放 MP3, wma, ra, ram, wav 等格式音樂,就裝上:

sudo apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-pitfdll gstreamer0.10-ffmpeg

2) 如果要讓 audacious 播放 APE 格式的音樂:

sudo apt-get install audacious-mac

3) 如果需要把 APE 轉換為 FLAC:

sudo apt-get install mac flac cuetools shntool
cuebreakpoints xx.cue |shnsplit -o flac -n xx xx.ape
2、Mplayer 的中文字幕設置方法

1) 在 Preferences-Font 里面點擊 ”Browse” 選擇一個中文字體,Encodeing 選擇 Unicode。

2) 在 Preferences-Subtitle&OSD 里面的 Encoding 選擇:

Simplified Chinese Charset(cp936)


3) 在 Preferences-Font “Text scale” 這里調整字幕大小(我調整為 3.8 )。

如果播放時提示錯誤,設置一下:

Preferences-Video 選擇 “xv X11/Xv”
Preferences-Codecs&demuxer 選擇 “FFmpeg/libavcodec audio decoders”

3、使用 Firefox 在線播放解決辦法

1) 內嵌播放,可以安裝 MediaWrap 這個擴展。

2) 如果喜歡調用外部播放器播放,安裝 MediaPlayerConnectivity 。

4、Totem 播放 rmvb 沒有聲音,這里給出了解決方法:

編輯 ~/.xine/catalog.cache 文件:
gedit ~/.xine/catalog.cache

找到
[/usr/lib/xine/plugins/1.1.4/xineplug_decode_real_audio.so]

把 decoder_priority 后面的數字修改為 10。


seal 2009-03-10 10:58 發表評論
]]>
ubuntu設置固定IPhttp://www.tkk7.com/sealyu/archive/2009/03/04/257777.htmlsealsealWed, 04 Mar 2009 06:10:00 GMThttp://www.tkk7.com/sealyu/archive/2009/03/04/257777.htmlhttp://www.tkk7.com/sealyu/comments/257777.htmlhttp://www.tkk7.com/sealyu/archive/2009/03/04/257777.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/257777.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/257777.html首先設置IP

sudo gedit /etc/network/interface

將其內容刪除

加上一下內容

auto lo

iface lo inet loopback

auto etho

iface etho inet static

address 192.168.0.168

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1

保存

然后修改DNS

sudo gedit /etc/resolv.conf

將內容修改為

nameserver 202.103.24.68

保存

重啟網絡連接

sudo /etc/init.d/networking stop

sudo /etc/init.d/networking start



seal 2009-03-04 14:10 發表評論
]]>
ubuntu java環境配置http://www.tkk7.com/sealyu/archive/2009/03/04/257760.htmlsealsealWed, 04 Mar 2009 04:31:00 GMThttp://www.tkk7.com/sealyu/archive/2009/03/04/257760.htmlhttp://www.tkk7.com/sealyu/comments/257760.htmlhttp://www.tkk7.com/sealyu/archive/2009/03/04/257760.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/257760.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/257760.htmlJava安裝配置

出自Ubuntu中文

打開終端,執行以下命令,或使用Adept/新立得軟件管理器,在其中分別搜索"sun-java6-jre"和"sun-java6-jdk"并標記安裝。

sudo apt-get install sun-java6-jre

如果空間富裕,建議安裝一個JDK。

sudo apt-get install sun-java6-jdk

提示:安裝過程中需要你回答是否同意使用協議(終端中紅藍色的提示界面),此時按tab鍵至OK,再按回車即可正常安裝。

設置當前默認的java解釋器:

sudo update-alternatives --config java

執行后會出現類似如下的畫面:

There are 2 alternatives which provide `java'.



Selection Alternative

-----------------------------------------------

1 /usr/bin/gij-wrapper-4.1

*+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java



Press enter to keep the default[*], or type selection number:

輸入 有包含 "sun" 的行的前面的數字。如上面顯示,則輸入2,然后回車確定。


配置JAVA環境變量:

sudo gedit /etc/environment

在其中添加如下兩行:

CLASSPATH=.:/usr/lib/jvm/java-6-sun/libv

JAVA_HOME=/usr/lib/jvm/java-6-sun

sudo gedit /etc/jvm

將文件中的

/usr/lib/jvm/java-6-sun

這一行填入到配置塊的頂部

安裝瀏覽器的JAVA Plugin(可選):

sudo apt-get install sun-java6-plugin



seal 2009-03-04 12:31 發表評論
]]>
Ubuntu下SQuirrel連接Microsoft SQL Server(很好的客戶端)http://www.tkk7.com/sealyu/archive/2009/01/14/251217.htmlsealsealWed, 14 Jan 2009 02:02:00 GMThttp://www.tkk7.com/sealyu/archive/2009/01/14/251217.htmlhttp://www.tkk7.com/sealyu/comments/251217.htmlhttp://www.tkk7.com/sealyu/archive/2009/01/14/251217.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/251217.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/251217.html 順便把安裝配置SQuirrel的過程中遇到到的問題記錄一下,以免忘記:
1。我安裝的版本是SQuirrel2.6.8, 在安裝完成后啟動,顯示出來的只有一個空窗口,除了標題欄沒任何東西,Google了一下,有人說是jdk版本的問題,由于項目需要,必須使用jdk5,看來只有安裝兩個jdk了。 可以這么作,原有jdk及環境變量保持不變,再安裝一個jdk6,然后手動創建一個launcher,啟動參數設置為:/usr/lib/jvm/java-6-sun/bin/java -jar /home/sealyu/tools/SQuirreL/squirrel-sql.jar 。
2。不知道是否由于版本的原因,沒找到使用文檔,SQuirrel官方網站也沒找到。后來自己摸索了一下,想要連接到Microsoft SQL Server(這里我用的版本是2005),下載了最新的jtds驅動,我的是jtds1.2.2.jar。將之放到SQuirrel_home/lib下面,這樣就能自動檢測到驅動,打開SQuirrel后,在jTDS Microsoft SQL 右鍵,選擇Modify Driver, 在 Extra Class Path 中選出你的jtds架包,List Drivers,這樣你就能在下面的下拉框中看到驅動的主類。點擊確定按鈕,這時候左邊樹形菜單里面對應的條目前方就由紅色的小叉變為綠色的對號了。
3。新建一個Alias,輸入你要連接數據庫的信息,connect即可使用。




seal 2009-01-14 10:02 發表評論
]]>
Ubuntu啟動問題:Your session only lasted less than 10 seconds 的解決http://www.tkk7.com/sealyu/archive/2009/01/13/251115.htmlsealsealTue, 13 Jan 2009 05:35:00 GMThttp://www.tkk7.com/sealyu/archive/2009/01/13/251115.htmlhttp://www.tkk7.com/sealyu/comments/251115.htmlhttp://www.tkk7.com/sealyu/archive/2009/01/13/251115.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/251115.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/251115.html
在系統做完一次更新后,重新啟動系統,輸入用戶名密碼后,彈出一個對話框:
顯示錯誤信息:
Your session only lasted less than 10 seconds。。。。。。。。。。
點擊查看詳細信息:
/etc/gdm/Xsession ........
Couldn't exec /usr/bin/pulse-session

點擊確定后會重新定向到登錄窗口。再次登錄還是同樣問題。不過可以通過將session改為failsafe模式登錄進去,安全模式也可以登錄進去。

分析錯誤信息,應該是pulseaudio這個文件出現了問題, 所以將pulseaudio這個軟件重裝了一下,重啟登錄,還是沒有解決。

后來failsafe模式進去后,發現/etc/gdm/Xsession目錄下面有一個70pulseaudio文件,應該是系統啟動gdm是要加載的session,但是找不到/usr/bin/pulse-session,所以導致了這個錯誤。
確定了問題所在,也就知道怎么解決了。

解決方法:sudo rm /etc/X11/Xsession.d/70pulseaudio
這樣每次啟動的時候就不會去找這個session加載。
不過如果需要使用pulseaudio的話,需要卸載重裝了。





seal 2009-01-13 13:35 發表評論
]]>
Ubuntu下不能刪除WICD問題的解決http://www.tkk7.com/sealyu/archive/2008/12/15/246499.htmlsealsealMon, 15 Dec 2008 14:11:00 GMThttp://www.tkk7.com/sealyu/archive/2008/12/15/246499.htmlhttp://www.tkk7.com/sealyu/comments/246499.htmlhttp://www.tkk7.com/sealyu/archive/2008/12/15/246499.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/246499.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/246499.html E: Sub-process /usr/bin/dpkg returned an error code (1)

只要找到/var/lib/dpkg/info/wicd.prerm這個文件,用管理員帳戶刪除,然后再次運行新利得刪除即可。


seal 2008-12-15 22:11 發表評論
]]>
ubuntu下ssh時碰到的問題http://www.tkk7.com/sealyu/archive/2008/12/11/245803.htmlsealsealThu, 11 Dec 2008 14:44:00 GMThttp://www.tkk7.com/sealyu/archive/2008/12/11/245803.htmlhttp://www.tkk7.com/sealyu/comments/245803.htmlhttp://www.tkk7.com/sealyu/archive/2008/12/11/245803.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/245803.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/245803.html @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!

根據網上搜索到的解決辦法,將之前保存的已知主機列表刪除即可,
執行: rm  -rf  .ssh/known_hosts
問題解決


seal 2008-12-11 22:44 發表評論
]]>
How to use Django with Apache and mod_pythonhttp://www.tkk7.com/sealyu/archive/2008/11/07/239347.htmlsealsealFri, 07 Nov 2008 15:44:00 GMThttp://www.tkk7.com/sealyu/archive/2008/11/07/239347.htmlhttp://www.tkk7.com/sealyu/comments/239347.htmlhttp://www.tkk7.com/sealyu/archive/2008/11/07/239347.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/239347.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/239347.htmlApache with mod_python currently is the preferred setup for using Django on a production server.

mod_python is similar to (and inspired by) mod_perl : It embeds Python within Apache and loads Python code into memory when the server starts. Code stays in memory throughout the life of an Apache process, which leads to significant performance gains over other server arrangements.

Django requires Apache 2.x and mod_python 3.x, and you should use Apache’s prefork MPM, as opposed to the worker MPM.

You may also be interested in How to use Django with FastCGI, SCGI or AJP (which also covers SCGI and AJP).

Basic configuration

To configure Django with mod_python, first make sure you have Apache installed, with the mod_python module activated.

Then edit your httpd.conf file and add the following:

<Location "/mysite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug On
</Location>

...and replace mysite.settings with the Python import path to your Django project's settings file.

This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the Django mod_python handler." It passes the value of DJANGO_SETTINGS_MODULE so mod_python knows which settings to use.

New in Django 1.0: The PythonOption django.root ... is new in this version.

Because mod_python does not know we are serving this site from underneath the /mysite/ prefix, this value needs to be passed through to the mod_python handler in Django, via the PythonOption django.root ... line. The value set on that line (the last item) should match the string given in the <Location ...> directive. The effect of this is that Django will automatically strip the /mysite string from the front of any URLs before matching them against your URLConf patterns. If you later move your site to live under /mysite2, you will not have to change anything except the django.root option in the config file.

When using django.root you should make sure that what's left, after the prefix has been removed, begins with a slash. Your URLConf patterns that are expecting an initial slash will then work correctly. In the above example, since we want to send things like /mysite/admin/ to /admin/, we need to remove the string /mysite from the beginning, so that is the django.root value. It would be an error to use /mysite/ (with a trailing slash) in this case.

Note that we're using the <Location> directive, not the <Directory> directive. The latter is used for pointing at places on your filesystem, whereas <Location> points at places in the URL structure of a Web site. <Directory> would be meaningless here.

Also, if your Django project is not on the default PYTHONPATH for your computer, you'll have to tell mod_python where your project can be found:

<Location "/mysite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug On
PythonPath "['/path/to/project'] + sys.path"
</Location>

The value you use for PythonPath should include the parent directories of all the modules you are going to import in your application. It should also include the parent directory of the DJANGO_SETTINGS_MODULE location. This is exactly the same situation as setting the Python path for interactive usage. Whenever you try to import something, Python will run through all the directories in sys.path in turn, from first to last, and try to import from each directory until one succeeds.

An example might make this clearer. Suppose you have some applications under /usr/local/django-apps/ (for example, /usr/local/django-apps/weblog/ and so forth), your settings file is at /var/www/mysite/settings.py and you have specified DJANGO_SETTINGS_MODULE as in the above example. In this case, you would need to write your PythonPath directive as:

PythonPath "['/usr/local/django-apps/', '/var/www'] + sys.path"

With this path, import weblog and import mysite.settings will both work. If you had import blogroll in your code somewhere and blogroll lived under the weblog/ directory, you would also need to add /usr/local/django-apps/weblog/ to your PythonPath. Remember: the parent directories of anything you import directly must be on the Python path.

Note

If you're using Windows, we still recommended that you use forward slashes in the pathnames, even though Windows normally uses the backslash character as its native separator. Apache knows how to convert from the forward slash format to the native format, so this approach is portable and easier to read. (It avoids tricky problems with having to double-escape backslashes.)

This is valid even on a Windows system:

PythonPath "['c:/path/to/project'] + sys.path"

You can also add directives such as PythonAutoReload Off for performance. See the mod_python documentation for a full list of options.

Note that you should set PythonDebug Off on a production server. If you leave PythonDebug On, your users would see ugly (and revealing) Python tracebacks if something goes wrong within mod_python.

Restart Apache, and any request to /mysite/ or below will be served by Django. Note that Django's URLconfs won't trim the "/mysite/" -- they get passed the full URL.

When deploying Django sites on mod_python, you'll need to restart Apache each time you make changes to your Python code.

Multiple Django installations on the same Apache

It's entirely possible to run multiple Django installations on the same Apache instance. Just use VirtualHost for that, like so:

NameVirtualHost *

<VirtualHost *>
ServerName www.example.com
# ...
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
</VirtualHost>

<VirtualHost *>
ServerName www2.example.com
# ...
SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
</VirtualHost>

If you need to put two Django installations within the same VirtualHost (or in different VirtualHost blocks that share the same server name), you'll need to take a special precaution to ensure mod_python's cache doesn't mess things up. Use the PythonInterpreter directive to give different <Location> directives separate interpreters:

<VirtualHost *>
ServerName www.example.com
# ...
<Location "/something">
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonInterpreter mysite
</Location>

<Location "/otherthing">
SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
PythonInterpreter othersite
</Location>
</VirtualHost>

The values of PythonInterpreter don't really matter, as long as they're different between the two Location blocks.

Running a development server with mod_python

If you use mod_python for your development server, you can avoid the hassle of having to restart the server each time you make code changes. Just set MaxRequestsPerChild 1 in your httpd.conf file to force Apache to reload everything for each request. But don't do that on a production server, or we'll revoke your Django privileges.

If you're the type of programmer who debugs using scattered print statements, note that print statements have no effect in mod_python; they don't appear in the Apache log, as one might expect. If you have the need to print debugging information in a mod_python setup, either do this:

assert False, the_value_i_want_to_see

Or add the debugging information to the template of your page.

Serving media files

Django doesn't serve media files itself; it leaves that job to whichever Web server you choose.

We recommend using a separate Web server -- i.e., one that's not also running Django -- for serving media. Here are some good choices:

If, however, you have no option but to serve media files on the same Apache VirtualHost as Django, here's how you can turn off mod_python for a particular part of the site:

<Location "/media">
SetHandler None
</Location>

Just change Location to the root URL of your media files. You can also use <LocationMatch> to match a regular expression.

This example sets up Django at the site root but explicitly disables Django for the media subdirectory and any URL that ends with .jpg, .gif or .png:

<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
</Location>

<Location "/media">
SetHandler None
</Location>

<LocationMatch "".(jpg|gif|png)$">
SetHandler None
</LocationMatch>

Serving the admin files

Note that the Django development server automagically serves admin media files, but this is not the case when you use any other server arrangement. You're responsible for setting up Apache, or whichever media server you're using, to serve the admin files.

The admin files live in (django/contrib/admin/media) of the Django distribution.

Here are two recommended approaches:

  1. Create a symbolic link to the admin media files from within your document root. This way, all of your Django-related files -- code and templates -- stay in one place, and you'll still be able to svn update your code to get the latest admin templates, if they change.
  2. Or, copy the admin media files so that they live within your Apache document root.

Using "eggs" with mod_python

If you installed Django from a Python egg or are using eggs in your Django project, some extra configuration is required. Create an extra file in your project (or somewhere else) that contains something like the following:

import os
os.environ['PYTHON_EGG_CACHE'] = '/some/directory'

Here, /some/directory is a directory that the Apache webserver process can write to. It will be used as the location for any unpacking of code the eggs need to do.

Then you have to tell mod_python to import this file before doing anything else. This is done using the PythonImport directive to mod_python. You need to ensure that you have specified the PythonInterpreter directive to mod_python as described above (you need to do this even if you aren't serving multiple installations in this case). Then add the PythonImport line in the main server configuration (i.e., outside the Location or VirtualHost sections). For example:

PythonInterpreter my_django
PythonImport /path/to/my/project/file.py my_django

Note that you can use an absolute path here (or a normal dotted import path), as described in the mod_python manual. We use an absolute path in the above example because if any Python path modifications are required to access your project, they will not have been done at the time the PythonImport line is processed.

Error handling

When you use Apache/mod_python, errors will be caught by Django -- in other words, they won't propagate to the Apache level and won't appear in the Apache error_log.

The exception for this is if something is really wonky in your Django setup. In that case, you'll see an "Internal Server Error" page in your browser and the full Python traceback in your Apache error_log file. The error_log traceback is spread over multiple lines. (Yes, this is ugly and rather hard to read, but it's how mod_python does things.)

If you get a segmentation fault

If Apache causes a segmentation fault, there are two probable causes, neither of which has to do with Django itself.

  1. It may be because your Python code is importing the "pyexpat" module, which may conflict with the version embedded in Apache. For full information, see Expat Causing Apache Crash.
  2. It may be because you're running mod_python and mod_php in the same Apache instance, with MySQL as your database backend. In some cases, this causes a known mod_python issue due to version conflicts in PHP and the Python MySQL backend. There's full information in the mod_python FAQ entry.

If you continue to have problems setting up mod_python, a good thing to do is get a barebones mod_python site working, without the Django framework. This is an easy way to isolate mod_python-specific problems. Getting mod_python Working details this procedure.

The next step should be to edit your test code and add an import of any Django-specific code you're using -- your views, your models, your URLconf, your RSS configuration, etc. Put these imports in your test handler function and access your test URL in a browser. If this causes a crash, you've confirmed it's the importing of Django code that causes the problem. Gradually reduce the set of imports until it stops crashing, so as to find the specific module that causes the problem. Drop down further into modules and look into their imports, as necessary.



seal 2008-11-07 23:44 發表評論
]]>
在RedHat AS4 上安裝Mysql_python模塊時遇到的問題http://www.tkk7.com/sealyu/archive/2008/11/07/239288.htmlsealsealFri, 07 Nov 2008 09:03:00 GMThttp://www.tkk7.com/sealyu/archive/2008/11/07/239288.htmlhttp://www.tkk7.com/sealyu/comments/239288.htmlhttp://www.tkk7.com/sealyu/archive/2008/11/07/239288.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/239288.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/239288.html
在RedHat AS4 上配置Apache+MySQL+Django 環境時,首先安裝好了Apache和Python以及Django和Mysql,
其中Mysql是編譯安裝的5.0版本。
下載了MySQL-python-1.2.2.tar.gz之后,解壓縮,cd進去,
執行: python setup.py build時報錯:
File "/tmp/easy_install-nHSsgl/MySQL-python-1.2.2/setup_posix.py", line 26, in mysql_config
EnvironmentError: mysql_config not found

后來發現是由于Mysql編譯安裝后沒有 mysql_config這個值,解決方法:
打開 setup_posix.py, 將其中line:26手動改成系統中對應的Mysql選項(這里我的是/usr/local/mysql):
mysql_config = /usr/local/mysql/bin/mysql_config

重新執行 :python setup.py build,沒有了剛才的錯誤,但是出現了另外一個錯誤:
error: /usr/bin/ld: cannot find -lmysqlclient

網上搜索了一下這個錯誤,發現有幾種不同的情況,主要有以下幾個原因:
1.沒有安裝mysqlclient。解決方法:找到對應的版本進行安裝。
2.安裝的mysqlclient的版本不匹配。對應鏈接: http://www.hao32.com/webserver/258.html
3.已經安裝了對應的mysqlclient但是找不到對應的鏈接。這是在一個國外的網站上看到的,具體網址已經找不到了,后來那位仁兄將對應的
mysql_home/lib/mysql文件夾下面libmysqlclient對應的文件全部拷貝到/usr/local/lib下面才解決了問題。

按照對應方案,問題解決。
重新執行:
python setup.py build
python setup.py install
安裝完成。




seal 2008-11-07 17:03 發表評論
]]>
為RedHat AS4添加在線升級功能http://www.tkk7.com/sealyu/archive/2008/11/06/239070.htmlsealsealThu, 06 Nov 2008 09:20:00 GMThttp://www.tkk7.com/sealyu/archive/2008/11/06/239070.htmlhttp://www.tkk7.com/sealyu/comments/239070.htmlhttp://www.tkk7.com/sealyu/archive/2008/11/06/239070.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/239070.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/239070.html文件命名,所有軟件包都跟rhel是完全兼容的,因此,我們完全可以用centos的apt和yum源來進行系統和軟件更新.

Apt下載http://rpm.pbone.net/index.php3/ ... ntos4.i386.rpm.html
下載完以后用rpm -i apt-0.5.15cnc6-4.centos4.i386.rpm 進行安裝

其實這時就可以用了,不過為了使更新更快,我們最好編輯一下下面這個文件
/etc/apt/sources.list.d/centos.list

修改其中的apt源為centos的中國鏡像
### CentOS-4 APT repository
rpm http://mirror.be10.com centos/4/apt/i386 os addons updates extras
rpm  http://mirror.be10.com centos/4/apt/i386  contrib centosplus
然后更新apt文件列表

apt-get update

升級所有文件

apt-get upgrade

也可以用下面命令來安裝軟件

apt-get install packagename

用apt可以升級我們大多數的軟件,但要升級內核還需要用yum

先安裝yum

apt-get install yum

這個時候需要導入一個GPG-KEY

rpm --import /usr/share/rhn/RPM-GPG-KEY

現在網上的文章出現了一個失誤,還要修改一下/etc/yum.repos.d/CentOS-Base.repo
才可以yum升級,把/etc/yum.repos.d/CentOS-Base.repo的內容替換為:
[base]
name=CentOS-4 - Base
baseurl=http://mirror.be10.com/centos/4/os/i386/
gpgcheck=1

#released updates
[update]
name=CentOS-4 - Updates
baseurl=http://mirror.be10.com/centos/4/updates/i386/
gpgcheck=1

#packages used/produced in the build but not released
[addons]
name=CentOS-4 - Addons
baseurl=http://mirror.be10.com/centos/4/addons/i386/
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-4 - Extras
baseurl=http://mirror.be10.com/centos/4/extras/i386/
gpgcheck=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4 - Plus
baseurl=http://mirror.be10.com/centos/4/centosplus/i386/
gpgcheck=1
enabled=0

#contrib - packages by Centos Users
[contrib]
name=CentOS-4 - Contrib
baseurl=http://mirror.be10.com/centos/4/contrib/i386/
gpgcheck=1
enabled=0

#packages in testing
[testing]
name=CentOS-4 - Testing
baseurl=http://mirror.be10.com/centos/4/testing/i386/
gpgcheck=1
enabled=0
然后現在就可以進行升級了

yum update

yum升級完以后如果升級內核的話需要重新啟動,使用

/sbin/shutdown -r now

重新啟動以后再看看系統內核,已經是新版本的了

uname -a

你應該有很高的悟性,知道baseurl=http://mirror.be10.com/centos/4/testing/i386/中,4代表的是版本號。
這類文章很多,恭喜你看到了最正確的一篇,同時也感謝你看到這里。

測試環境:紅帽AS4

seal 2008-11-06 17:20 發表評論
]]>
Linux和Windows下查看環境變量方法對比http://www.tkk7.com/sealyu/archive/2008/11/06/239050.htmlsealsealThu, 06 Nov 2008 08:13:00 GMThttp://www.tkk7.com/sealyu/archive/2008/11/06/239050.htmlhttp://www.tkk7.com/sealyu/comments/239050.htmlhttp://www.tkk7.com/sealyu/archive/2008/11/06/239050.html#Feedback1http://www.tkk7.com/sealyu/comments/commentRss/239050.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/239050.html

一、查看所有環境變量的名稱和值:

Linux下:export

Windows下:set

二、根據名稱查該環境變量的值:

Linux下:echo $環境變量名

比如:echo $ORACLE_HOME

Windows下:set 環境變量名



seal 2008-11-06 16:13 發表評論
]]>
Ubuntu8.10 應用程序菜單無法打開的解決辦法http://www.tkk7.com/sealyu/archive/2008/08/27/224923.htmlsealsealWed, 27 Aug 2008 01:25:00 GMThttp://www.tkk7.com/sealyu/archive/2008/08/27/224923.htmlhttp://www.tkk7.com/sealyu/comments/224923.htmlhttp://www.tkk7.com/sealyu/archive/2008/08/27/224923.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/224923.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/224923.html 搜索得到解決辦法:
找到/etc/xdg/menus/applications.menu這個文件,拷貝一份將你壞掉的/home/your_user_name/.config/menus/applications.menu文件替換掉就可以了。



seal 2008-08-27 09:25 發表評論
]]>
RedHat AS4升級http://www.tkk7.com/sealyu/archive/2008/08/14/222060.htmlsealsealThu, 14 Aug 2008 09:16:00 GMThttp://www.tkk7.com/sealyu/archive/2008/08/14/222060.htmlhttp://www.tkk7.com/sealyu/comments/222060.htmlhttp://www.tkk7.com/sealyu/archive/2008/08/14/222060.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/222060.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/222060.html 第一步:下載第三方軟件
#wget http://apt.sw.be/packages/apt/apt-0.5.15lor ... _64.rpm   (注意,不同的版本不一樣)
第二步:下載rpm的密鑰
#wget http-://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
第三步:安裝第三方軟件apt-get
#rpm -Uvh ./pt-0.5.15cnc6-4.2.el4.rf.i386.rpm
第四步:導入rpm密鑰
#rpm --import RPM-GPG-KEY.dag.txt
第五步:編輯文件,讓apt-get知道去哪里找升級包和密鑰
#vi /etc/apt/sources.list.d/dag.list
添加下面一行:
#rpm http://apt.sw.be redhat/el4/en/i386 dag
保存退出
第六步:升級、安裝
更新數據庫
#apt-get update
真正的升級
#apt-get upgrade

seal 2008-08-14 17:16 發表評論
]]>
Ubuntu 中的網絡管理器wicdhttp://www.tkk7.com/sealyu/archive/2008/08/13/221647.htmlsealsealWed, 13 Aug 2008 03:17:00 GMThttp://www.tkk7.com/sealyu/archive/2008/08/13/221647.htmlhttp://www.tkk7.com/sealyu/comments/221647.htmlhttp://www.tkk7.com/sealyu/archive/2008/08/13/221647.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/221647.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/221647.htmlWicd是Linux下的一個開源的有線、無線網絡連接管理器。您可以在簡單的界面里設置網絡連接的各種參數。

Wicd的功能:

  • 無需依賴Gnome運行環境 (盡管它確實需要GTK),就是說可以在XFCE、Fluxbox, Openbox、Enlightenment 等X下使用

  • 可以管理有線和無線網絡連接

  • 每個無線和有線網絡連接都有獨立的配置文件

  • 支持多種加密方式,包括 WEP、WPA、WPA2 等

  • 保持了對 wireless-tools 的兼容性

  • 在系統托盤顯示網絡狀況和信號強度

在Ubuntu中安裝 Wicd:

首先編輯  /etc/apt/sources.list 文件

sudo gedit /etc/apt/sources.list

7.10 (gutsy) 在里面添加如下一行:

deb http://apt.wicd.net gutsy extras

8.04 (hardy) 用戶在里面添加這行:

deb http://apt.wicd.net hardy extras

保存退出

現在用下面的命令更新源列表

sudo aptitude update

通過下面這行命令安裝 wicd

sudo aptitude install wicd

請注意,此操作將刪除GNOME的默認網絡管理器 network-manager,可能導致暫時失去網絡連接。

在GNOME中,如果您想讓它自動啟動并顯示系統托盤圖標。那么請在 系統→首選項→會話 啟動程序 標簽中點擊 添加。設定個名字(比如”Wicd”)并在命令一欄中輸入 “/opt/wicd/tray.py”。

Auto Start

啟動后效果如下:

Tray

使用 Wicd

在GNOME中通過應用程序菜單啟動 wicd 的方法是點擊 應用程序互聯網Wicd

在wicd的窗口中您將看見一個系統檢測到的無線網絡列表。有時 Wicd 在剛啟動的時候不能搜索到所有范圍內的無線網絡。請點擊工具條上的刷新按鈕來重新搜索。

點擊網絡名稱下面的那個 連接 后稍候幾秒就應該連上您選擇的網絡了。

Wicd Main

如果網絡是加密的,您需要再干點兒活兒。Wicd支持的加密方式包括:WPA、WEP、LEAP、TTLS、EAP 和 PEAP。

點擊您要連接的那個網絡名稱邊上的箭頭,然后點擊高級設置。在這里選中 Use Encryption 框,并在下拉菜單里選擇對應的加密方式,最后在密鑰欄填上您的密碼。

Detail





seal 2008-08-13 11:17 發表評論
]]>
RedHat AS4 下使用別名收取root帳戶郵件。http://www.tkk7.com/sealyu/archive/2008/07/31/219184.htmlsealsealThu, 31 Jul 2008 15:05:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/31/219184.htmlhttp://www.tkk7.com/sealyu/comments/219184.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/31/219184.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/219184.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/219184.html 但是可以通過下列方式解決:
配置/etc/aliases  
   
  vi   /etc/aliases  
  加入:  
  root:   your_account_name   
  :wq  
   
  #newaliases  
   
  現在,發給root的,就轉發給了your_account_name樂。  



seal 2008-07-31 23:05 發表評論
]]>
Sendmail篇之dovecot(轉)http://www.tkk7.com/sealyu/archive/2008/07/31/219158.htmlsealsealThu, 31 Jul 2008 13:16:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/31/219158.htmlhttp://www.tkk7.com/sealyu/comments/219158.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/31/219158.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/219158.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/219158.html
一、編譯安裝
# tar xzvf dovecot-1.0.2.tar.gz
# cd dovecot-1.0.2
# ./configure
# make
# make install

二、找出sendmail郵箱的位置
# echo "Hello me" | mail -s "Dovecot test" $USER
一般的rh系統都在 /var/mail 目錄下


三、配置dovecot
# mv /usr/local/etc/dovecot-example.conf /usr/local/etc/dovecot.conf
每個配置的選項conf文件里已經有很詳細的注釋了,這里貼出我的dovecot.conf:
protocols = imap pop3
disable_plaintext_auth = no
ssl_disable = yes
ser=<%u> method=%m rip=%r lip=%l %c
#login_log_format = %$: %s

mail_location = mbox:~/mail:INBOX=/var/mail/%u

dotlock_use_excl = yes
maildir_copy_with_hardlinks = yes

protocol pop3 {
pop3_uidl_format = %v.%u
}


protocol lda {
postmaster_address = postmaster@example.com
}

auth_verbose = yes

auth default {
mechanisms = plain
passdb shadow {
}
userdb passwd {
}
user = root
}

四、啟動dovecot
編輯啟動腳本 /etc/init.d/dovecot,適應于所有的操作系統
#! /bin/sh

DAEMON=/usr/local/sbin/dovecot

test -x $DAEMON || exit 0
set -e

base_dir=`$DAEMON -a|grep '^base_dir: '|sed 's/^base_dir: //'`
pidfile=$base_dir/master.pid

if test -f $pidfile; then
running=yes
else
running=no
fi

case "$1" in
start)
echo -n "Starting Dovecot"
$DAEMON
echo "."
;;
stop)
if test $running = yes; then
echo "Stopping Dovecot"
kill `cat $pidfile`
echo "."
else
echo "Dovecot is already stopped."
fi
;;
reload)
if test $running = yes; then
echo -n "Reloading Dovecot configuration"
kill -HUP `cat $base_dir/master.pid`
echo "."
else
echo "Dovecot isn't running."
fi
;;
restart|force-reload)
echo -n "Restarting Dovecot"
if test $running = yes; then
kill `cat $base_dir/master.pid`
sleep 1
fi
$DAEMON
echo "."
;;
*)
echo "Usage: /etc/init.d/dovecot {start|stop|reload|restart|force-reload}" >&2
exit 1
;;
esac

exit 0

# /etc/init.d/dovecot start 啟動dovecot
# kill `cat /usr/local/var/run/dovecot/master.pid` 關閉dovecot

參考資料:
http://wiki.dovecot.org/FrontPage?action=show&redirect=%E9%A6%96%E9%A1%B5

seal 2008-07-31 21:16 發表評論
]]>
RedHat linux AS 4+Apache2.2+MYSQL5.0.17+PHP5.1.1(轉)http://www.tkk7.com/sealyu/archive/2008/07/28/218089.htmlsealsealMon, 28 Jul 2008 08:06:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/28/218089.htmlhttp://www.tkk7.com/sealyu/comments/218089.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/28/218089.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/218089.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/218089.html # groupadd mysql
# useradd -g mysql -d /usr/local/mysql/data -M mysql
# tar -zxvf mysql-5.0.17.tar.gz
# cd mysql-5.0.17
./configure --prefix=/usr/local/mysql "             指定安裝目錄
> --sysconfdir=/etc "                                       配置文件的路徑
> --localstatedir=/usr/local/mysql/data "        數據庫存放的路徑
> --enable-assembler "                                  使用一些字符函數的匯編版本
> --with-mysqld-ldflags=-all-static "               以純靜態方式編譯服務端
> --with-charset=utf8 "                                  添加utf8字符支持
> --with-extra-charsets=all                            添加所有字符支持

# make
# make install
# /usr/local/mysql/bin/mysql_install_db
# chown -R mysql:mysql /usr/local/mysql/data
# cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
#  chkconfig --add mysqld
# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf

安裝Apache
tar -zvxf httpd-2.2.tar.gz
cd httpd-2.2
./configure --prefix=/usr/local/apache --enable-so
make
make install

先安裝支持包(注意安裝順序)
先列出配置gd2需要的網址

gd-2.0.33.tar.gz
www.boutell.com/gd

jpegsrc.v6b.tar.gz
ftp.uu.net/graphics/jpeg
www.ijg.org

libpng-1.2.7.tar.tar
www.libpng.org/pub/png/libpng.html
libpng.sourceforge.net
sourceforge.net/projects/libpng

zlib-1.2.2.tar.gz
www.zlib.net
sourceforge.net/projects/zlib

freetype-2.1.9.tar.gz
www.freetype.org
freetype.sourceforge.net/index2.html
sourceforge.net/projects/freetype

建立初始目錄:
mkdir /usr/local/modules

jpeg目錄
mkdir /usr/local/modules/jpeg6
mkdir /usr/local/modules/jpeg6/bin
mkdir /usr/local/modules/jpeg6/lib
mkdir /usr/local/modules/jpeg6/include
mkdir /usr/local/modules/jpeg6/man
mkdir /usr/local/modules/jpeg6/man/man1


安裝libxml
# tar -zxf libxml2-2.6.16.tar.gz
# cd libxml2-2.6.16
# ./configure (xml默認安裝就可以,不要指定路徑了,因為安裝時php可能找不到它,PHP5只支持libxml2-2.5.10以上版本)
# make
# make install

安裝zlib
tar xzvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
#不要用--prefix自定義安裝目錄,影響gd的安裝
./configure
make
make install

安裝freetype
tar xzvf freetype-2.1.5.tar.gz
cd freetype-2.1.5
./configure --prefix=/usr/local/modules/freetype
make
make install

安裝libpng
tar xzvf libpng-1.2.5.tar.gz
#不要用--prefix自定義安裝目錄,影響gd的安裝
cd libpng-1.2.5
cp scripts/makefile.std makefile
make
make install


安裝jpeg
tar xzvf jpegsrc.v6b.tar.gz
./configure --prefix=/usr/local/modules/jpeg6 --enable-shared --enable-static
make
make install

安裝GD
tar xzvf gd-2.0.33.tar.gz
./configure --prefix=/usr/local/modules/gd --with-jpeg=/usr/local/modules/jpeg6 --with-png --with-zlib --with-freetype=/usr/local/modules/freetype
make
make install

安裝imap:
tar zxvf imap-2001a.tar.Z
cd imap-2001a  
make  slx  
cp  ipopd/ipop*.*  /usr/sbin  
cp  imapd/imapd  /usr/sbin  
cp  c-client/c-client.a  /usr/local/lib  
請確定你有  /usr/local/include  這個目錄
cp  c-client/rfc822.h  /usr/local/include  
cp  c-client/mail.h  /usr/local/include  
cp  c-client/linkage.h  /usr/local/include  


mkdir /usr/local/php5
tar -zxvf php-5.1.1.tar.gz
cd php-5.1.1
./configure --prefix=/usr/local/php5 "
              --with-mysql=/usr/local/mysql "
              --with-mysqli=/usr/local/mysql/bin/mysql_config "
              --with-apxs2=/usr/local/apache/bin/apxs "
              --with-libxml-dir=/usr/local/lib "
              --with-gd=/usr/local/modules/gd "
              --with-jpeg-dir=/usr/local/modules/jpeg6 "
              --with-zlib "
              --with-png "
              --with-freetype-dir=/usr/local/modules/freetype "
              --with-imap=/usr/local/lib "
              --with-xmlrpc "
              --with-config-file-path=/usr/local/php5/etc
make
make install

cp ./php.ini-dist /usr/local/php5/etc/php.ini

修改httpd.conf
#vi /usr/local/apache/conf/httpd.conf
加載php模塊,去掉注釋“#”,如沒有此行,請加上。
LoadModule php5_module        modules/libphp5.so
加上此兩行
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

到這里全部的安裝過程已完成。

seal 2008-07-28 16:06 發表評論
]]>
sendmail郵件服務器搭載smtp和pop3認證的配置方法(轉)http://www.tkk7.com/sealyu/archive/2008/07/24/217055.htmlsealsealWed, 23 Jul 2008 16:24:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/24/217055.htmlhttp://www.tkk7.com/sealyu/comments/217055.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/24/217055.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/217055.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/217055.html
1.軟件準備

操作系統:centos5.0

我選擇centos5,最新的操作系統,不要再用redhat9了,很久沒有更新了,企業里用有風險的。更新換代吧。

以下軟件,centos5全部自帶,無需另外下載。

郵件系統:
               sendmail8.13
               sendmail-cf-8.13
               m4-1.4

pop3認證:dovecot-1.0

smtp認證:
        cyrus-sasl-2.1
        cyrus-sasl-md5-2.1
        cyrus-sasl-plain-2.1
          cyrus-sasl-lib-2.1

sasl這里,我要說一句,網上有人說“sendmail-8.13已經包含cyrus-sasl的功能,所沒必要再安裝cyrus-sasl”
大 哥大姐們,沒有cyrus-sasl用什么做認證.....sendmail官方只是說,sendmail的rpm包默認已經支持了cyrus-sasl 認證方式,也就是說,sendmail會在cyrus-sasl的工作目錄下自動創建相關認證配置文件,并監聽25號端口,就不用你去手動自己建立配置文 件和監聽端口了。當有請求進入25號端口的時候,sendmail會自動找到/usr/lib/sasl2/Sendmail.conf讀取認證方法。下 面我會詳細解釋。

2.安裝軟件

rpm -ivh把上面軟件全裝上,都在光盤里呢,好裝。

3.認證配置

pop3:

網 上說修改/etc/dovecot.conf文件,將第17行的:#protocols = imap imaps pop3 pop3s的#去掉。其實不用,它默認已經啟用了這些服務,除非你只想用dovecot-auth的認證,你可以改成protocols = none,否則不用改。

smtp:
注意,smtp稍微麻煩一下。

我講下原理:

當用戶請求進入 25號端口后,sendmail調用cyrus-sasl的saslauthd進程,saslauthd要求對方輸入本地系統用戶的用戶名和密碼,當用戶 輸入好后,saslauthd會去查找系統的/etc/shadow文件,密碼確認無誤,放行,告訴sendmail,這個用戶合法,可以使用郵件服務來 發郵件。

這時候你去/usr/lib/sasl2/下看看,sendmail已經做好了一個sendmail.conf文件,里面指明了:pwcheck_method=saslauthd,說明sendmail認證時就要調用saslauthd
所以要實現上述功能,就要設置cyrus-sasl的saslauthd,給它指定認證方式。
首先,進入/etc/sysconfig/,打開saslauthd的腳本,找到第7行的:

MECH=

等號后面不管寫什么,我們都要改成:

MECH=shadow

保存

這樣saslauthd才會去找shadow文件給用戶做認證。


其實saslauthd還可以用自己的用戶名和密碼數據庫做驗證,但這樣不方便,還要另外創建用戶,不如直接用系統自身存在的用戶名和密碼。




4.Sendmail配置.

配置郵件服務器名稱:

打開/etc/mail/local-host-names
加入你 @后面的郵箱地址。比如我這里是otto@linuxedentest.com
那么,你要在local-host-names文件里的第二行添加:
linuxedentest.com
保存

當然
local-host-names還可以設置郵箱別名,這個不多說,大家查文檔看看。

改好后還要去你的dns服務器上,打上mx標志,添加A標記,用來解析dns名和地址。具體方法就要查查bind的設置方法了,或者win2003的dns設置方法。


配置sendmail.mc:

打開/etc/mail/sendmail.mc文件,

找到:

dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

把前面的dnl注釋去掉,變成:

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

上面兩句的意思是:

放行那些通過EXTERNAL, LOGIN, PLAIN, CRAM-MD5或DIGEST-MD5等方式驗證的郵件用戶,無視access文件中的設置。

confAUTH_MECHANISMS,確定系統支持的認證方式。LOGIN PLAIN 方式下,outlook用的多。


還不算完,找到:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, )dnl

改成:

DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, )dnl

這樣所有ip地址都可以通過smtp端口使用我們的郵件服務器了。


-----------------------------------------------------------
這里要說一句,不要改

dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

這句話!保持注釋狀態。

上面那句話,網上好多文章都說把Port=submission,改成Port=25,說是強制所有用戶在25端口上做認證。

我不知道sendmail以前的版本是怎么樣設置smtp認證的。sendmail8.13不用這么設置,這句話人家sendmail的意思是:取消注釋后,一旦當25號端口被重定向或者被屏蔽,或者在25號端口打不開的情況下,馬上使用587備用端口給用戶做認證。

本來人家sendmail就已經打開了25端口(Port=smtp了已經),你卻在這里還Port=25,把備用端口也改成25,這不是讓sendmail的sm-client認

證進程和sendmail的主進程搶端口么....

-----------------------------------------------------------


到此為止,保存sendmail.mc


用m4重新生成sendmail.cf文件

# m4 /etc/mail/sendmail.mc > /etc/sendmail.cf


啟動dovecot進程:
/etc/init.d/dovecot start



啟動saslauthd進程:
/etc/init.d/saslauthd start



啟動sendmail進程:
/etc/init.d/sendmail start


把這些進程加入到啟動腳本中去:
chkconfig dovecot on
chkconfig saslauthd on
chkconfig sendmail on


ok,所有設置全部完成,可以正常認證和收發郵件了。

本文如有不準確的地方,請各位海批~~~


=============================分割線==============================================


                            smtp測試方法:

以下sh#表示在shell上輸入;C 為客戶端輸入, S為服務器端返回信息 。


sh# telnet <郵件服務器地址/IP>  <port(一般是25)>

S : 220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8; Sun, 18 May 2008 01:55:03 +0800

C : ehlo <名字> (不帶認證功能的是helo +名字)

S : 250-localhost.localdomain Hello zhangzb.nec-as.nec.com.cn [172.28.90.9], pleased to meet you
S : 250-ENHANCEDSTATUSCODES
S : 250-PIPELINING
S : 250-8BITMIME
S : 250-SIZE
S : 250-DSN
S : 250-ETRN
S : 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
S : 250-DELIVERBY
S : 250 HELP

C : auth login

S : 334 VXNlcm5hbWU6

注:{  下面先輸入username后passwd,兩者需要輸入encode base64碼,轉換方法:
sh# perl -MMIME::Base64 -e 'print encode_base64("username")'
(注意print前后 是單引號,username 處替換成你需要的單詞)
}

C : MQ==  (這是我的用戶名:1)

S : 334 UGFzc3dvcmQ6

C : MQ==   (密碼,也是1)

S : 235 2.0.0 OK Authenticated

C : MAIL FROM:<XXXX@XXXX> (部分服務器設置后,需要真實的郵箱后綴名,具體方法不詳)

 
S : 250 2.1.0 <XXXX@XXXX>... Sender ok

 
C : RCPT TO:<XXXX@XXXX>   (目標郵箱)

 
S : 250 2.1.5 <XXXX@XXXX>... Recipient ok

 
C : DATA

 
S : 354 Enter mail, end with "." on a line by itself

C : 〈這里添郵件內容〉
C :.  (點)
 
S : 250 2.0.0 m4HHt3Sj005640 Message accepted for delivery
 
C: quit 
〈mail send successful〉


seal 2008-07-24 00:24 發表評論
]]>
dovecot安裝http://www.tkk7.com/sealyu/archive/2008/07/23/217047.htmlsealsealWed, 23 Jul 2008 15:20:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/23/217047.htmlhttp://www.tkk7.com/sealyu/comments/217047.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/23/217047.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/217047.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/217047.html一、RPM格式
1。安裝RPM包;
2。編輯/etc/dovecot.conf
其中,修改
protocols = imap pop3
passdb passwd {
 }
passdb shadow {
  }
3。啟動
#service dovecot start
 
二、tar.gz包的安裝
1。下載地址:(目前最新版本)http://www.dovecot.org/releases/dovecot-1.0.rc14.tar.gz
2。安裝:
#tar zxvf dovecot-1.0.rc14.tar.tar
#cd dovecot-1.0.rc14
#./configure --prefix=/usr/local/dovecot --sysconfdir=/usr/local/etc --with-mysql --without-ssl --disable-ipv6
#make
#make install
# cp /usr/local/etc/dovecot-example.conf /usr/local/etc/dovecot.conf
 
3。建立啟動進程所依賴的用戶
# useradd -s /bin/false -d /dev/null dovecot
 
4。修改配置文件
編輯/usr/local/etc/dovecot.conf
其中,修改
protocols = imap pop3
ssl_disable = yes
passdb passwd {
 }
passdb shadow {
  }
5。啟動
#/usr/local/dovecot/sbin/dovecot
 
6??梢园褑用顚戇M/etc/rc.d/rc.local文件,以使得系統啟動時能自動啟動服務。
#echo "/usr/local/dovecot/sbin/dovecot" >> /etc/rc.d/rc.local
 
7。驗正
(1)驗正POP3
#telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.
 
(2)驗正imap
#telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK Dovecot ready.

seal 2008-07-23 23:20 發表評論
]]>
sendmail 配置錯誤:Cannot open /usr/share/sendmail-cf/m4/cf.m4http://www.tkk7.com/sealyu/archive/2008/07/23/217028.htmlsealsealWed, 23 Jul 2008 13:40:00 GMThttp://www.tkk7.com/sealyu/archive/2008/07/23/217028.htmlhttp://www.tkk7.com/sealyu/comments/217028.htmlhttp://www.tkk7.com/sealyu/archive/2008/07/23/217028.html#Feedback0http://www.tkk7.com/sealyu/comments/commentRss/217028.htmlhttp://www.tkk7.com/sealyu/services/trackbacks/217028.htmlm4 sendmail.mc > sendmail.cf

卻提示 sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory

這是因為沒有安裝sendmai-cf這個包

安裝完成后問題解決



seal 2008-07-23 21:40 發表評論
]]>
主站蜘蛛池模板: 日本免费电影一区| 丰满亚洲大尺度无码无码专线| 亚洲AV蜜桃永久无码精品| 波多野结衣免费在线观看| 中文字幕无码一区二区免费| 黄色免费在线观看网址| 亚洲色图激情文学| 亚洲精品456在线播放| 久久精品国产69国产精品亚洲| 亚洲国产成人爱av在线播放| 全免费a级毛片免费看不卡| 亚洲三级高清免费| 久久精品无码专区免费青青| 久草福利资源网站免费| 国产性生大片免费观看性| 午夜不卡AV免费| 国产精品亚洲五月天高清| 亚洲国产精品自在自线观看| 亚洲精品国产日韩| 久久精品国产亚洲av麻豆图片| 亚洲综合久久久久久中文字幕| 久久久久久亚洲精品| 亚洲αv久久久噜噜噜噜噜| 国产亚洲人成网站观看| 国产亚洲人成无码网在线观看| 日韩精品亚洲aⅴ在线影院| 亚洲一级片免费看| 浮力影院亚洲国产第一页| 久久久青草青青国产亚洲免观| ZZIJZZIJ亚洲日本少妇JIZJIZ| 亚洲一级特黄无码片| 亚洲综合伊人久久大杳蕉| 亚洲永久精品ww47| 亚洲成A人片在线观看无码不卡 | 亚洲乱码无人区卡1卡2卡3| 亚洲一区在线免费观看| 亚洲天堂2017无码中文| 亚洲精品精华液一区二区| 老司机午夜精品视频在线观看免费| 国产精品亚洲一区二区三区在线观看 | 亚洲欧美日韩综合久久久|