顯示文章

這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。


主題 - Vic~

頁: [1]
1
由於 kernel 的程式碼自 2.6.12 版起,在提供的 tar-archives 中多加了 git commit ID 的 extended header ,如果你的 tar 版本較舊,就會出現一個警告訊息,進而產生一個 pax_global_header 的檔案。

代碼: [選擇]
tar xjf linux-2.6.19.7.tar.bz2
tar: pax_global_header: Unknown file type 'g', extracted as normal file

tar --version
tar (GNU tar) 1.13.25
Copyright (C) 2001 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.

查了一下,雖然這是一個無關痛癢的警告,不過出現實還是怪怪的,如果可以將 tar 的版本升級至 1.14 以後,就能夠避掉這樣的警告訊息。因為習慣在 RPM 的系統下處理作業,而該主機的環境卻仍停留在 Fedora Core 2 ,就連 The Fedora Legacy Project 都不再維護,所以興起了自己編譯 tar RPM 的念頭。

曾經有將新版的 sendmail 由 Tar Ball 轉成 RPM 的經驗,所以編譯環境已經存在,不再贅述,這次依然如法泡製一番!

1.安裝 tar 的 SOURCE RPM:
代碼: [選擇]
rpm -ivh tar-1.13.25-14.1.legacy.src.rpm
2.下載新版 tar 原始碼,置於 /usr/src/redhat/SOURCES/ 目錄中:
代碼: [選擇]
wget http://ftp.gnu.org/gnu/tar/tar-1.20.tar.bz2
3.編輯 SPEC 檔,保留 man page 的 patch,否則無法編譯成功:
代碼: [選擇]
diff -urN tar-vic.spec tar.spec
--- tar-vic.spec 2008-06-08 14:12:06.936689000 +0800
+++ tar.spec 2006-03-09 08:25:32.000000000 +0800
@@ -1,7 +1,7 @@
Summary: A GNU file archiving program.
Name: tar
-Version: 1.20
-Release: vic
+Version: 1.13.25
+Release: 14.1.legacy
License: GPL
Group: Applications/Archiving
Source: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.bz2
@@ -32,13 +32,13 @@
%prep
%setup -q
%patch0 -p1 -b .manpage
-#%patch1 -p1 -b .sock
-#%patch2 -p1 -b .253
-#%patch6 -p1 -b .librt
-#%patch7 -p1 -b .err
-#%patch8 -p1 -b .absn
-#%patch9 -p1 -b .argv
-#%patch10 -p1 -b .dots
+%patch1 -p1 -b .sock
+%patch2 -p1 -b .253
+%patch6 -p1 -b .librt
+%patch7 -p1 -b .err
+%patch8 -p1 -b .absn
+%patch9 -p1 -b .argv
+%patch10 -p1 -b .dots

4.產生 RPM 檔:
代碼: [選擇]
rpmbuild -ba /usr/src/redhat/SPECS/tar.spec
5.安裝升級 tar:
代碼: [選擇]
rpm -Uvh /usr/src/redhat/RPMS/i386/tar-1.20-vic.i386.rpm
6.不再出現警告訊息:
代碼: [選擇]
tar xjf tar-1.20.tar.bz2

tar --version
tar (GNU tar) 1.20
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

2
酷!學園 精華區 / 用Tarball轉rpm升級sendmail
« 於: 2006-08-28 18:13 »
因為暫無升級OS的計畫,又感於spam的日益猖獗,浪費了很多效能與頻寬。
得知sendmail自8.13版起,有一些很好的功能可以使用,操作設定參考於:
http://www.technoids.org/dossed.html

因為這是一部過濾spam的mail gateway,於是就想試著直接升級sendmail,利用其新的功能來抵擋spam,幾經嚐試之後,個人即假設在同樣的環境底下,所需耗費的功夫應該會少一點。

原始環境:
代碼: [選擇]
OS:Fedora Core 2
sendmail:8.12.11-4.26.legacy


所需檔案:
代碼: [選擇]
sendmail.8.13.8.tar.gz
sendmail-8.12.11-4.26.legacy.src.rpm


1.安裝rpm-build套件
代碼: [選擇]
yum install rpm-build

2.安裝sendmail source rpm
代碼: [選擇]
rpm -ivh sendmail-8.12.11-4.26.legacy.src.rpm


3.修改spec
代碼: [選擇]
vi /usr/src/redhat/SPECS/sendmail.spec

原始檔案請參考source rpm中的sendmail.spec
在此僅列出異動的部份:
    未與LDAP整合,未來的使用可能性不高;
    Version要與sendmail.8.13.8.tar.gz檔案配合;
    Release是你自行定義的;
    Patch當然就不需要了;
    NIS也不需要;
    直接定義access.db的預設值,設定GreetPause、ClientConn、ClientRate;
代碼: [選擇]
--- sendmail-my.spec    2006-08-28 15:13:57.000000000 +0800
+++ sendmail.spec       2006-03-23 11:31:24.000000000 +0800
@@ -4,7 +4,7 @@
 %define       with_sasl1    no
 %define       with_sasl2    yes
 %define       with_milter   yes
-%define       with_ldap     no
+%define       with_ldap     yes
 %define       with_mysql    no

 %define       enable_pie    yes
@@ -17,8 +17,8 @@

 Summary: A widely used Mail Transport Agent (MTA).
 Name: sendmail
-Version: 8.13.8
-Release: 2.1.my
+Version: 8.12.11
+Release: 4.26.legacy
 License: Sendmail
 Group: System Environment/Daemons
 Provides: smtpdaemon
@@ -32,17 +32,17 @@
 Source6: sendmail-redhat.mc
 Source7: Sendmail-sasl1.conf
 Source8: sendmail.pam
-#Source9: sendmail-8.12.5-newconfig.readme
-#Source10: makecert.sh
+Source9: sendmail-8.12.5-newconfig.readme
+Source10: makecert.sh
 Source11: Sendmail-sasl2.conf
-#Patch3: sendmail-8.12.2-makemapman.patch
-#Patch4: sendmail-8.12.11-smrsh-paths.patch
-#Patch5: sendmail-8.12.2-movefiles.patch
-#Patch7: sendmail-8.12.5-pid.patch
-#Patch9: sendmail-8.12.7-hesiod.patch
-#Patch10: sendmail-8.12.7-manpage.patch
-#Patch11: sendmail-8.12.9-dynamic.patch
-#Patch12: sendmail-8.12-VU#834865.patch
+Patch3: sendmail-8.12.2-makemapman.patch
+Patch4: sendmail-8.12.11-smrsh-paths.patch
+Patch5: sendmail-8.12.2-movefiles.patch
+Patch7: sendmail-8.12.5-pid.patch
+Patch9: sendmail-8.12.7-hesiod.patch
+Patch10: sendmail-8.12.7-manpage.patch
+Patch11: sendmail-8.12.9-dynamic.patch
+Patch12: sendmail-8.12-VU#834865.patch
 Buildroot: %{_tmppath}/%{name}-root
 BuildRequires: tcp_wrappers
 BuildRequires: db4-devel
@@ -126,20 +126,19 @@
 %prep
 %setup -q

-#%patch3 -p1 -b .makemapman
-#%patch4 -p1 -b .smrsh_paths
-#%patch5 -p1 -b .movefiles
-#%patch7 -p1 -b .pid
-#%patch9 -p1 -b .hesiod
-#%patch10 -p1 -b .manpage
-#%patch11 -p1 -b .dynamic
-#%patch12 -p1 -b .VU#834865
+%patch3 -p1 -b .makemapman
+%patch4 -p1 -b .smrsh_paths
+%patch5 -p1 -b .movefiles
+%patch7 -p1 -b .pid
+%patch9 -p1 -b .hesiod
+%patch10 -p1 -b .manpage
+%patch11 -p1 -b .dynamic
+%patch12 -p1 -b .VU#834865

 %build
 # generate redhat config file
-#define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX')
 cat > redhat.config.m4 << EOF
-define(\`confMAPDEF', \`-DNEWDB -DHESIOD -DMAP_REGEX')
+define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX')
 define(\`confOPTIMIZE', \`${RPM_OPT_FLAGS}')
 define(\`confENVDEF', \`-I/usr/include/db4 -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETM
AILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_WORKAROUND_BROKEN_NAMESERVERS -D_FFR_SMTP_SSL')
 define(\`confLIBDIRS', \`-L/usr/kerberos/%{_lib}')
@@ -285,8 +284,8 @@
 cp smrsh/README      $DOC/README.smrsh
 cp libmilter/README  $DOC/README.libmilter
 cp cf/README         $DOC/README.cf
-#cp %{SOURCE9}        $DOC/README.redhat
-#cp %{SOURCE10}        $DOC/makecert.sh
+cp %{SOURCE9}        $DOC/README.redhat
+cp %{SOURCE10}        $DOC/makecert.sh

 # Install the cf files for the sendmail-cf package.
 cp -ar cf/* $RPM_BUILD_ROOT/%{sendmailcf}
@@ -340,14 +339,6 @@
 localhost                      RELAY
 127.0.0.1                      RELAY

-ClientRate:127.0.0.1           0
-ClientRate:                    10
-
-ClientConn:127.0.0.1           0
-ClientConn:                    10
-
-GreetPause:127.0.0.1           0
-
 EOF
 for map in virtusertable access domaintable mailertable ; do
     touch $RPM_BUILD_ROOT/etc/mail/${map}


4.製作rpm
代碼: [選擇]
rpmbuild -ba /usr/src/redhat/SPECS/sendmail-my.spec


等編譯完成後,確認沒有錯誤訊息的話,
就到/usr/src/redhat/RPMS/i386/底下試試自製的rpm,
同時在/usr/src/redhat/SRPMS/底下也會有修正過的source rpm檔,
下次拿此檔直接修改即可。

由於個人對於spec的詳細設定尚未研究透徹,
不知這樣是否會有後遺症或是不良影響,
園內高手眾多,望請略微指導一、二?

只不過,
自從上了新版sendmail之後,
系統的承載明顯降低許多,
擋掉許多以程式發信的spam,
未來就看何時它們又突破了再說。

3
在sendmail's maillog中,
發現許多這樣的訊息,
引用
Jun 30 01:45:44 spam sendmail[32601]: k5THjiWP032601: from=<.@msa.hinet.net>, size=2096, class=0, nrcpts=1, msgid=<@>, bodytype=8BITMIME, relay=root@localhost
Jun 30 01:45:45 spam sendmail[32604]: k5THjiWP032601: to=marketing@xxx.com.tw.procmail, ctladdr=<.@msa.hinet.net> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=32096, relay=xxx.com.tw. [192.168.2.201], dsn=5.6.0, stat=Data format error
Jun 30 01:45:45 spam sendmail[32604]: k5THjiWP032601: k5THjjWO032604: DSN: Data format error
Jun 30 01:45:53 spam sendmail[32604]: k5THjjWO032604: to=<.@msa.hinet.net>, delay=00:00:08, xdelay=00:00:08, mailer=esmtp, pri=33120, relay=msa-mx6.hinet.net. [168.95.5.208], dsn=2.0.0, stat=Sent (BAA17790 Message accepted for delivery)


當然marketing也沒有收到信,
不過因為出現Data format error的緣故,
sendmail會回給寄件者有錯誤發生,
這樣的理解對嗎?

若是這樣的話,
應該如何處理類似的錯誤處理,
才是比較恰當的,
從而避免到處都是垃圾訊息呢?

4
最近從朋友那兒聽說了一件怪事,
就是他們公司常以MAIL相互傳遞訊息,
不過偶而會發生大陸方面的回信台灣收不到?
或是收到的信件內容僅為
代碼: [選擇]
aaazzzaaazzzaaazzzaaazzzaaazzz

隨後收到的退信內容如下:
代碼: [選擇]

   ----- The following addresses had permanent fatal errors -----
<abc@xyz.com.tw>
    (reason: 500 error)

   ----- Transcript of session follows -----
... while talking to mail.xyz.com.tw.:
>>> RCPT To:<abc@xyz.com.tw>
<<< 500 error
554 5.0.0 Service unavailable
>>> RSET
<<< 500 error


而且檢視maillog發現,
沒什麼異常情況,
但可以得知這樣的信件大小都是"size=31"。

在這裡或許搜尋不夠徹底吧?
僅找到這個:

http://phorum.study-area.org/viewtopic.php?t=32873&highlight=aaazzz

仔細跟朋友多次討論後,
又繼續尋尋覓覓,
這是有關於500 error詭異現象的討論,

http://www.raidenhttpd.com/jlbb/viewtopic.php?t=11595&postdays=0&postorder=asc&start=0

由於台灣與大陸同時使用sendmail,
大膽架設如果是走加密傳遞的話,
不管寄件者是否等於收件者,
或是含有特定成立條件,
應該就不受到影響。

那麼接下來只要有一方把sendmail的STARTTLS功能啟用,
由自己簽發憑證給自己使用就可以了,
園內有很多文章可以參考,
或是參考依瑪貓的憑證教學:

http://www.imacat.idv.tw/tech/sslcerts.html

由於台灣的測試環境一直無法成功,
一直懷疑是不是大陸的主機有做其他的設定,
據我的了解,
sendmail當成client時,
是可以disable掉TLS的,
這樣就會使資料傳遞仍然走一般的明碼方式,
但是經詢問後大陸的主機沒有特殊設定,
完了,
問題就這樣一直卡住。 :cry:

接下來監聽封包看看,
企圖想要找出問題原因,
卻一點也沒有進展。

後來有高手指點,
把sendmail的LogLevel調高,
在maillog發現,
代碼: [選擇]

Jan 24 16:52:07 spam sendmail[26139]: k0O8q6L3026139: <-- XXXX xxx.xxx.xxx
Jan 24 16:52:07 spam sendmail[26139]: k0O8q6L3026139: --- 500 5.5.1 Command unrecognized: "XXXX xxx.xxx.xxx"
Jan 24 16:52:07 spam sendmail[26139]: k0O8q6L3026139: <-- HELO xxx.xxx.xxx
Jan 24 16:52:07 spam sendmail[26139]: k0O8q6L3026139: --- 250 spam.abc.com.tw Hello ccc.ccc.ccc [111.222.333.444], pleased to meet you


居然先來個"XXXX",
才是"HELO",
經過google的協助,
原來我被自家的cisco給玩了,
似乎是因為他不支援ESMTP,
由於我沒有辦法調整它,
那就換個環境試試唄。

當台灣的sendmail主機有支援TLS後,
在雙方都採預設值的情況下,
因為sendmail的特性是,
可以加密就加密,
所以已不再發生收不到信,
或是收到信件內容"aaazzzaaazzzaaazzzaaazzzaaazzz",
或許有助於碰到類似情況的參考。

5
這是參考園內有關討論YUM升級系統的相關資訊後,

http://phorum.study-area.org/viewtopic.php?t=28648&highlight=yum
http://www.brandonhutchinson.com/Upgrading_Red_Hat_Linux_with_yum.html
讓系統升級的相關設定,
如果覺得有什麼不妥的地方,
請不吝提出,謝謝!

目前的環境都是用Fedora Core 2,
所以就將相關的Red Hat7.3以及Red Hat 8.0先升級至Red Hat 9,
再由Red Hat 9升級至Fedora Core 2,
由於mirror了一個Red Hat 9、Fedora Core 2、3、4的YUM Server,
在內網升級時,
速度快的可以,
也同時解決大部分的套件相依性問題。

建議再做升級動作前,
請先備份你的資料,
以免有什麼意外發生。
如果沒有額外安裝其他的東西,
應該都能順利升級。
過程中yum若有問題也會停止,
先解決相關問題後,
一樣也可以升級喔。

請先參考設定檔yum_upgrade.conf的預先準備部份,
以利下一階段的執行,
由於考慮到不同版本,
統統整合在一個檔案內,
有需要時取消註解就可以用了。

Red Hat7.3(8.0) Upgrade Red Hat 9
1.先取得這些套件:
代碼: [選擇]
db4-4.0.14-14.i386.rpm
glibc-2.3.2-11.9.i386.rpm
glibc-common-2.3.2-11.9.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
gmp-4.1-4.i386.rpm
libxml2-2.4.23-1.i386.rpm
libxml2-python-2.4.23-1.i386.rpm
popt-1.7.1-1.8x.i386.rpm
python-2.2.1-17.i386.rpm
rpm-4.1.1-1.8x.i386.rpm
rpm-python-4.1.1-1.8x.i386.rpm
yum-2.0.6-1.noarch.rpm

2.安裝套件
代碼: [選擇]
rpm -Uvh *.rpm --nodeps
3.匯入KEY
代碼: [選擇]
rpm --import http://1.2.3.4/fedora/linux/redhat/9/i386/os/RPM-GPG-KEY
4.安裝relaese套件
代碼: [選擇]
rpm -Uvh http://1.2.3.4/fedora/linux/redhat/9/i386/os/RedHat/RPMS/redhat-release-9-3.i386.rpm
5.升級至Red Hat 9(設定檔是否取消註解)
代碼: [選擇]
yum -c /path/yum_upgrade.conf upgrade

因為設定檔中,
代碼: [選擇]
assumeyes=1
這個值讓yum直接進行升級的安裝,
可以設為0,
改為交談式的模式;
代碼: [選擇]
bootloader=0
yum並不會將新的kernel設為預設值,
所以重新開機後需自行選擇新的kernel開機,
或者改為1,
由yum在升級後直接設新的kernel為預設值,
不必自行選擇;
然後檢查因版本的不同,
是否會對相關設定檔有影響?
代碼: [選擇]
find / -name "*.rpm[ns]*" | xargs ls -l > upgrade_rh9.diff
逐一比對彼此的差異性。

Red Hat 9 Upgrade Fedora Core 2
1.一樣先匯入KEY
代碼: [選擇]
rpm --import http://1.2.3.4/fedora/linux/core/2/i386/os/RPM-GPG-KEY-fedora
2.安裝relaese套件
代碼: [選擇]
rpm -Uvh http://1.2.3.4/fedora/linux/core/2/i386/os/Fedora/RPMS/fedora-release-2-4.i386.rpm
3.升級至Fedora Core 2(注意設定檔是否修正了)
代碼: [選擇]
yum -c /path/yum_upgrade.conf upgrade

重新開機之後就是Fedora Core 2了,
一樣再次檢查相關檔案,
是否會影響系統運作,
代碼: [選擇]
find / -name "*.rpm[ns]*" | xargs ls -l > upgrade_fc2.diff
修正完後,就OK了。

Fedora Core 2 Upgrade Fedora Core 3
1.先匯入KEY
代碼: [選擇]
rpm --import http://1.2.3.4/fedora/linux/core/3/i386/os/RPM-GPG-KEY-fedora
2.下載FC3的套件
代碼: [選擇]
fedora-release-3-8.i386.rpm
yum-2.1.11-3.noarch.rpm

3.安裝套件
代碼: [選擇]
rpm -Uvh *.rpm
3.升級至Fedora Core 3
代碼: [選擇]
yum -c /path/yum_upgrade.conf upgrade

從Fedora Core 3開始,
yum做了些改變,
http://phorum.study-area.org/viewtopic.php?t=32673&highlight=yum
主要會參考/etc/yum.repos.d/目錄下的這兩個檔案,
代碼: [選擇]
/etc/yum.repos.d/fedora.repo
/etc/yum.repos.d/fedora-updates.repo

因為懶,
所以將它整合在一塊兒,
所以同一個檔案可以用在不同的機器上,
只要改一個檔案就可以了。

另外還有udev的因素,
要升級Fedora Core 3前,
也必須要有kernel 2.6以上的環境。

重新開機後,
就升級至Fedora Core 3,
再比對一次,如何?
代碼: [選擇]
find / -name "*.rpm[ns]*" | xargs ls -l > upgrade_fc3.diff

Fedora Core 3 Upgrade Fedora Core 4
1.先匯入KEY
代碼: [選擇]
rpm --import http://1.2.3.4/fedora/linux/core/4/i386/os/RPM-GPG-KEY-fedora
2.先取得套件
代碼: [選擇]
fedora-release-4-2.noarch.rpm
rpm-4.4.1-21.i386.rpm
rpm-build-4.4.1-21.i386.rpm
neon-0.24.7-6.i386.rpm
beecrypt-4.1.2-8.i386.rpm
rpm-libs-4.4.1-21.i386.rpm
rpm-python-4.4.1-21.i386.rpm
popt-1.10.1-21.i386.rpm

3.安裝套件
代碼: [選擇]
rpm -Uvh *.rpm
4.升級至Fedora Core 4
代碼: [選擇]
yum -c /path/yum_upgrade.conf upgrade

重新開機,
這是一定會做的,
代碼: [選擇]
find / -name "*.rpm[ns]*" | xargs ls -l > upgrade_fc4.diff

這樣就有Fedora Core 4的環境了。


設定檔yum_upgrade.conf:
代碼: [選擇]

[main]
cachedir=/var/cache/yum
debuglevel=2
errorlevel=2
logfile=/var/log/yum.log
assumeyes=1
tolerant=1
pkgpolicy=newest
distroverpkg=redhat-release
exactarch=1
retries=6
bootloader=0
obsoletes=1
gpgcheck=1
#exclude=kernel kernel-smp
#installonlypkgs=kernel kernel-smp

# For Red Hat
#[base]
#name=Red Hat $releasever - $basearch - Base
#baseurl=http://1.2.3.4/fedora/linux/redhat/$releasever/$basearch/os/
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/

#[updates-released]
#name=Red Hat $releasever - $basearch - Released Updates
#baseurl=http://1.2.3.4/fedora/linux/redhat/updates/$releasever/$basearch/
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/

# For Fedora Core
#[base]
#name=Fedora Core $releasever - $basearch - Base
#baseurl=http://1.2.3.4/fedora/linux/core/$releasever/$basearch/os/
#baseurl=http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/$releasever/$basearch/os/
#baseurl=http://ftp.3ccc.info/pub/fedora/linux/core/$releasever/$basearch/os/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/

# For Fedora Core 3 or 4
#enabled=1
#gpgcheck=1

#[updates-released]
#name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://1.2.3.4/fedora/linux/core/updates/$releasever/$basearch/
#baseurl=http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/updates/$releasever/$basearch/
#baseurl=http://ftp.3ccc.info/pub/fedora/linux/core/updates/$releasever/$basearch/
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/

# For Fedora Core 3 or 4
#enabled=1
#gpgcheck=1


### Check precondition :
# For Fedora Core 3 Upgrade Fedora Core 4
# rpm --import http://1.2.3.4/fedora/linux/core/4/i386/os/RPM-GPG-KEY-fedora
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/fedora-release-4-2.noarch.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/rpm-4.4.1-21.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/rpm-build-4.4.1-21.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/neon-0.24.7-6.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/beecrypt-4.1.2-8.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/rpm-libs-4.4.1-21.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/rpm-python-4.4.1-21.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/4/i386/os/Fedora/RPMS/popt-1.10.1-21.i386.rpm
# rpm -Uvh *.rpm

# For Fedora Core 2 Upgrade Fedora Core 3
# rpm --import http://1.2.3.4/fedora/linux/core/3/i386/os/RPM-GPG-KEY-fedora
# wget http://1.2.3.4/fedora/linux/core/3/i386/os/Fedora/RPMS/fedora-release-3-8.i386.rpm
# wget http://1.2.3.4/fedora/linux/core/3/i386/os/Fedora/RPMS/yum-2.1.11-3.noarch.rpm
# rpm -Uvh *.rpm

# For RedHat 9 Upgrade Fedora Core 2
# rpm --import http://1.2.3.4/fedora/linux/core/2/i386/os/RPM-GPG-KEY-fedora
# rpm -Uvh http://1.2.3.4/fedora/linux/core/2/i386/os/Fedora/RPMS/fedora-release-2-4.i386.rpm

# For Red Hat 7.3 or 8.0 Upgrade Red Hat 9
# wget http://1.2.3.4/fedora/linux/upgrade/db4-4.0.14-14.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/glibc-2.3.2-11.9.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/glibc-common-2.3.2-11.9.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/glibc-devel-2.3.2-11.9.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/gmp-4.1-4.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/libxml2-2.4.23-1.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/libxml2-python-2.4.23-1.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/popt-1.7.1-1.8x.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/python-2.2.1-17.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/rpm-4.1.1-1.8x.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/rpm-python-4.1.1-1.8x.i386.rpm
# wget http://1.2.3.4/fedora/linux/upgrade/yum-2.0.6-1.noarch.rpm
# rpm -Uvh *.rpm --nodeps
# rpm --import http://1.2.3.4/fedora/linux/redhat/9/i386/os/RPM-GPG-KEY
# rpm -Uvh http://1.2.3.4/fedora/linux/redhat/9/i386/os/RedHat/RPMS/redhat-release-9-3.i386.rpm

6
我參考了前輩的作法,
http://www.study-area.org/tips/mysql_replication.htm
設定了MySQL的Replication,
結果在slave上一直沒有寫入資料。

在slave的log檔案中說要先賦予REPLICATION SLAVE的權限,
於是參考MySQL網站的說明
http://dev.mysql.com/doc/mysql/en/replication-howto.html
加了這個
代碼: [選擇]

mysql>GRANT REPLICATION SLAVE ON *.* TO repl@192.168.1.2 IDENTIFIED BY ‘abc123’;

就可以了,
不曉得這樣的作法到底正不正確呢?

OS:Fedoar Core 2
DB:MySQL 4.0.20-0

7
Linux 討論版 / 我的man page出現一大堆tag???
« 於: 2005-01-05 14:57 »
我想看看man page的說明時,
遇到了一點小狀況,
就是會有一堆Tag夾雜在文中,
實在有點礙眼,
不知是哪裡設錯了?
還是什麼東西漏裝了?


底下附上我man find的結果




FIND(1L)                                                              FIND(1L)

NAME
       find - search for files in a directory hierarchy

SYNOPSIS
       find [path...] [expression]

DESCRIPTION
       This  manual page documents the GNU version of find.  find searches the
       directory tree rooted at each given file name by evaluating  the  given
       expression  from  left  to  right, according to the rules of precedence
       (see section OPERATORS), until the outcome is known (the left hand side
       is false for and operations, true for or), at which point find moves on
       to the next file name.

       The first argument that begins with <A1><A5>-<A1><A6>, <A1><A5>(<A1><A6>, <A1><A5>)
<A1><A6>, <A1><A5>,<A1><A6>, or <A1><A5>!<A1><A6> is taken
       to  be  the  beginning  of  the expression; any arguments before it are
       paths to search, and any arguments after it are the rest of the expres-
       sion.   If  no  paths  are given, the current directory is used.  If no
       expression is given, the expression <A1><A5>-print<A1><A6> is used.

       find exits with status 0  if  all  files  are  processed  successfully,
       greater than 0 if errors occur.

EXPRESSIONS
       The  expression  is  made up of options (which affect overall operation

8
Linux 討論版 / [討論]lsmod中出現unsafe???
« 於: 2004-12-12 06:28 »
使用p4p800 onbroad的網卡,
os是fedora 2,
不管啟動與否,
都是unsafe的狀態,
這有影響嗎?

# lsmod
Module                  Size  Used by
ipt_state               5568  5
iptable_mangle          6209  0
iptable_nat            22885  1
ip_conntrack           30929  2 ipt_state,iptable_nat
iptable_filter          6209  1
ip_tables              18497  4 ipt_state,iptable_mangle,iptable_nat,iptable_filter
ipv6                  232933  18
autofs4                20165  0
sk98lin               141929  0 [unsafe]
3c59x                  36201  0
dm_mod                 49477  0
uhci_hcd               30681  0
ehci_hcd               29893  0
button                  8793  0
battery                11085  0
asus_acpi              13017  0
ac                      7373  0
ext3                   99497  8
jbd                    58457  1 ext3

9
將燒錄機移到Fedora,
執行底下指令後,
cdrecord -v -eject blank=all speed=4 dev=/dev/hdc -data /var/xxx.iso
只是把片子抹除而已,
並未將資料寫入,
請問這是何故?

10
最近公司借了一部積架式伺服器,
GS-SR125E,
說是要測試他的RAID功能,
對於這個自己又不是很熟,
好不容易才讓Fedora Core2 run起來,
只是碰到HostRAID這東西,
設成RAID1後,
一進安裝畫面就出現,
No Device Have Found,

這樣子還有辦法繼續測試嗎?

之前因為雙cpu的緣故,
差點要放棄了,
現在都做一半了,
又是一個難題。

11
Network 討論版 / 網卡無法自動判別嗎?
« 於: 2004-12-09 10:15 »
我的電腦在不同的網路環境下,
有時螢幕畫面一直出現如下的訊息:

Transmit list 3d9803e0 vs. 3f9802a0.
0: @3f980200  length 800005ea status 000105ea
1: @3f9802a0  length 800005ea status 000105ea
2: @3f980340  length 800005ea status 000105ea
3: @3f9803e0  length 800005ea status 800005ea
4: @3f980480  length 800005b3 status 000105b3
5: @3f980520  length 80000036 status 00010036
6: @3f9805c0  length 80000036 status 00010036
7: @3f980660  length 8000003e status 0001003e
8: @3f980700  length 80000036 status 00010036
9: @3f9807a0  length 80000147 status 00010147
10: @3f980840  length 800005ea status 000105ea
11: @3f9808e0  length 800005ea status 000105ea
12: @3f980980  length 800005ea status 000105ea
13: @3f980a20  length 800005ea status 000105ea
14: @3f980ac0  length 800005ea status 000105ea
15: @3f980b60  length 800005ea status 000105ea
eth0: Transmit error, Tx status register 82.
Probably a duplex mismatch.  See Documentation/networking/vortex.txt

我下mii-tool -v觀察
eth0: negotiated 100baseTx-FD flow-control, link ok
  product info: vendor 00:10:5a, model 0 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

訊息看起來應該是OK的,
但是畫面一直出現那18行訊息,
所以不斷嘗試後,發現下這個command
"mii-tool --force=100baseTx-FD eth0"
就一切正常了。

再下mii-tool -v觀看
eth0: 100 Mbit, full duplex, link ok
  product info: vendor 00:10:5a, model 0 rev 0
  basic mode:   100 Mbit, full duplex
  basic status: link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

難道網卡不能自動判別嗎?

我的環境是
Fedora Core 2
kernel-smp-2.6.7-1.494.2.2
3Com PCI 3c905C

頁: [1]