
2005年10月21日
在腳注分割線下方出現(xiàn)一個多余空行,無法刪除。

這時,可以將“視圖”轉(zhuǎn)成“普通視圖”,雙擊正文中腳注索引,在普通視圖下方會自動出現(xiàn)腳注窗口?;蛘咴?#8220;引用”選項板“腳注”中選擇“顯示備注”,可以達(dá)到同樣的效果。

在下拉列表中選擇“腳注分隔符”,此時可以對分隔符進(jìn)行編輯

此時刪除多余回車就可以了。點擊“默認(rèn)設(shè)置”可以對腳注分隔符的默認(rèn)格式進(jìn)行修改。
posted @
2010-01-10 01:09 思考 閱讀(19896) |
評論 (10) |
編輯 收藏
這個方法也是在網(wǎng)上看到的,自己總結(jié)了一下,方面以后查詢。
netsh interface dump > cssl.txt
這樣可以在本地目錄下生成一個cssl.txt文件。該文件記錄了當(dāng)前網(wǎng)絡(luò)的配置情況。通過執(zhí)行如下命令可以應(yīng)用cssl.txt文件中的網(wǎng)絡(luò)配置。
netsh exec cssl.txt
這樣,可以寫一個批處理文件完成網(wǎng)絡(luò)配置的切換。
posted @
2008-07-04 13:51 思考 閱讀(608) |
評論 (0) |
編輯 收藏
1、進(jìn)入命令提示符環(huán)境
2、進(jìn)入DISKPART程序
3、輸入AUTOMOUNT ENABLE指令
4、ok,下次USB硬盤放入后就可以像XP一樣自動裝載了。
posted @
2008-06-27 16:07 思考 閱讀(476) |
評論 (0) |
編輯 收藏
Windows 2003 server遠(yuǎn)程桌面連接數(shù)限制已經(jīng)困擾很久了,給平時的維護(hù)帶來麻煩。既然微軟不會從根本上解決這個問題,那只有通過其他方式來減少問題的發(fā)生幾率。
一、在服務(wù)器端的處理辦法如下
1. 設(shè)定已經(jīng)斷開的會話結(jié)束時間限制,這樣避免會話已經(jīng)斷開,但仍然占用一個Session
開始-運行-gpedit.msc-計算機(jī)配置-管理模板-windows組件-終端服務(wù)-會話,右邊窗口選擇"為斷開的會話設(shè)置時間限制"-選擇"已啟用",選擇一個時間;
開始-運行-gpedit.msc-計算機(jī)配置-管理模板-windows組件-終端服務(wù)-會話,右邊窗口選擇"到達(dá)時間限制時終止會話"-選擇"已啟用"。
2. 無限時保持連接會話,便于遠(yuǎn)程控制共享任意時候連接會話的數(shù)據(jù),也就是共享任意時候連接的遠(yuǎn)程桌面的當(dāng)時狀態(tài):
開始-管理工具-終端服務(wù)配置-服務(wù)器配置-限制每個用戶使用一個會話
3. 養(yǎng)成良好習(xí)慣,退出連接時不要直接關(guān)閉,而是使用注銷。
二、如果已經(jīng)有多個連接存在
1 可以通過命令的方式將連接斷開,這個方法在2000系統(tǒng)同樣可用;如果在任務(wù)管理器的用戶里注銷的方法:
1.1 在Command Line模式下,輸入命令query user:
C:\>query user
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
>dfsadmin 0 Disc . 7/23/2007 7:53 PM
mrsadmin rdp-tcp#10 1 Active . 7/24/2007 9:31 AM
ID 0的用戶是本地登陸的,ID 1是3389登陸的用戶,正在運行中,但是仍然占用系統(tǒng)資源和通道,我們要把它踢掉。
1.2 可通過logoff x命令來注銷id為x的登錄用戶。輸入命令:logoff 1,再用query user查詢狀態(tài)
C:\>logoff 1
C:\>query user
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
>dfsadmin 0 Disc none 7/23/2007 7:53 PM
三、如果連接已經(jīng)受限制
此時通過遠(yuǎn)程登錄,可以用一個"3389DOS版"軟件來進(jìn)行牽制登錄。這個軟件只能解決windows2003系統(tǒng)的限制,2000系統(tǒng)也沒辦法。
四、超過最大連接時連接
在超過最大連接數(shù)時,通過運行mstsc /v:IP /console命令就可以連接到遠(yuǎn)程系統(tǒng)的會話。
MSTSC [<Connection File>] [/v:<sever[:port]>] [/console] [/f[ullscreen]]
[/w:<width>/h:<height>] | /Edit"ConnectionFile" | /Migrate | /?
<Connection File>-- 指定連接的.rdp 文件的名稱。
/v:<sever[:port]>-- 指定要連接到的終端服務(wù)器。
/console -- 連接到服務(wù)器的控制臺會話。
/f -- 以全屏模式啟動客戶端。
/w: <width>-- 指定遠(yuǎn)程桌面屏幕的寬度。
/h:<height>-- 指定遠(yuǎn)程桌面屏幕的亮度。
/edit -- 打開指定的.rdp 文件來編輯。
/migrate -- 將客戶端連接管理器創(chuàng)建的舊版連接文件遷移到新的.rdp 連接文件。
/? -- 生成這個用法消息。
posted @
2008-06-27 16:07 思考 閱讀(16684) |
評論 (0) |
編輯 收藏
tracert命令
C:\Documents and Settings\Administrator>tracert /?
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
[-R] [-S srcaddr] [-4] [-6] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list (IPv4-only).
-w timeout Wait timeout milliseconds for each reply.
-R Trace round-trip path (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.
說明
tracert(跟蹤路由)是路由跟蹤公用程序,用于確定 IP 數(shù)據(jù)包訪問目標(biāo)所采取的路徑。Tracert 命令用 IP 生存時間 (TTL) 字段和 ICMP錯誤消息來確定從一個主機(jī)到網(wǎng)路上其它主機(jī)的路由。
Tracert 工作原理
透過向目標(biāo)發(fā)送不同 IP 生存時間 (TTL) 值的"Internet 控制消息協(xié)議 (ICMP)"回
應(yīng)數(shù)據(jù)包,Tracert 診斷程序確定到目標(biāo)所采取的路由。要求路徑上的每個路由器在轉(zhuǎn)
發(fā)數(shù)據(jù)包之前至少將數(shù)據(jù)包上的 TTL 遞減 1。數(shù)據(jù)包上的 TTL 減為 0 時,路由器應(yīng)
該將"ICMP已超時"的消息發(fā)回源系統(tǒng)。
Tracert 先發(fā)送 TTL 為 1 的響應(yīng)數(shù)據(jù)包,并在隨后的每次發(fā)送過程將 TTL 遞增1,直
到目標(biāo)響應(yīng)或 TTL 達(dá)到最大值,從而確定路由。透過檢查中間路由器發(fā)回的"ICMP已
超時"的消息確定路由。某些路由器不經(jīng)詢問直接丟棄 TTL 過期的數(shù)據(jù)包,這在Trac
ert 公用程序中看不到。
posted @
2008-06-27 16:07 思考 閱讀(402) |
評論 (0) |
編輯 收藏
id命令
顯示用戶信息
oracle:~ # id
uid=0(root) gid=0(root) groups=0(root)
oracle:~ # id esecadm
uid=1000(esecadm) gid=1000(esec) groups=1000(esec),16(dialout),33(video)
groups命令
顯示組信息
oracle:~ # groups
root
oracle:~ # groups esecadm
esecadm : esec dialout video
finger命令
顯示用戶信息
oracle:~ # finger
Login Name Tty Idle Login Time Where
root root pts/0 - Sat 22:16 192.168.100.1
oracle:~ # finger esecadm
Login: esecadm Name:
Directory: /export/home/esecadm Shell: /bin/bash
Never logged in.
No Mail.
No Plan.
oracle:~ # finger root
Login: root Name: root
Directory: /root Shell: /bin/bash
On since Sat Jun 21 22:16 (CST) on pts/0 from 192.168.100.1
New mail received Sat Jun 21 22:09 2008 (CST)
Unread since Fri Jun 20 09:21 2008 (CST)
No Plan.
/etc/paswd
所有用戶的信息都存放在該文件中。該文件中每行都代表以該用戶,每行的格式如下圖所示。因為該文件是所有用戶都可以讀的,為了系統(tǒng)安全,將用戶的口令信息放置在另一文件中。

/etc/shadow
該文件中存放有加密的用戶口令信息,并且該文件只有root可讀的。

如果用戶口令字段是空、*或者!,說明用戶不能登錄系統(tǒng)。需要通過passwd給用戶提供密碼,這時用戶才能登錄系統(tǒng)。
ssh登錄
默認(rèn)情況下,只有root用戶可以通過ssh遠(yuǎn)程登錄系統(tǒng)。為了使其它用戶登錄,需要修改/etc/ssh/sshd_config文件。在文件中加入下面一行:
AllowUsers root esecadm
后面可以跟若干用戶,其間用空格分開。
posted @
2008-06-22 01:52 思考 閱讀(2696) |
評論 (0) |
編輯 收藏
Sentinel 6安裝
Sentinel有兩種安裝方式,一種是通過命令行的方式,一種是通過GUI的方式。本文主要介紹以命令行方式安裝Sentinel 6的方法。
首先,在命令行中輸入setup.sh -console,則打開安裝程序。
oracle:/media/cdrom # ./setup.sh -console
Installing Sentinel Suite in console mode ...
安裝程序首先啟動JVM裝載安裝程序。這里需要等待一段時間。
Initializing Wizard........
Launching InstallShield Wizard........
緊接著是選擇安裝語言,默認(rèn)是英文。
----------------------------------------------------------------------------
Select a language to be used for this wizard.
[X] 1 - English
[ ] 2 - French
[ ] 3 - German
[ ] 4 - Italian
[ ] 5 - Portuguese (Brazil)
[ ] 6 - Spanish
[ ] 7 - Simplified Chinese
[ ] 8 - Traditional Chinese
[ ] 9 - Japanese
To select an item enter its number, or 0 when you are finished: [0]
下面英文界面的安裝向?qū)⒊霈F(xiàn),回車?yán)^續(xù)安裝。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Welcome to the InstallShield Wizard for Sentinel 6
The InstallShield Wizard will install Sentinel 6 on your computer.
To continue, choose Next.
Sentinel 6
Novell, Inc.
www.Novell.com
Press 1 for Next, 3 to Cancel or 5 to Redisplay [1]
接下來是安裝向?qū)崾镜腟entinel 6的許可證信息,選擇q退出閱讀即可。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Please read the following license agreement carefully.
Novell Sentinel 6
Novell Sentinel 6.0
Novell Software License Agreement
PLEASE READ THIS AGREEMENT CAREFULLY. BY INSTALLING, DOWNLOADING OR OTHERWISE
USING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT
AGREE WITH THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE THE SOFTWARE. THE
SOFTWARE MAY NOT BE SOLD, TRANSFERRED, OR FURTHER DISTRIBUTED EXCEPT AS
AUTHORIZED BY NOVELL.
This Novell Software License Agreement (Agreement) is a legal agreement between
You (an entity or a person) and Novell, Inc. (Novell). The software product
Press ENTER to read the text [Type q to quit] q
接下來,選擇1,回車,同意該許可信息。再按回車?yán)^續(xù)。
Please choose from the following options:
[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.
To select an item enter its number, or 0 when you are finished: [0] 1
[X] 1 - I accept the terms of the license agreement.
[ ] 2 - I do not accept the terms of the license agreement.
To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
緊接著安裝向?qū)崾具x擇Sentinel 6的安裝位置。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Sentinel 6 Install Location
Please specify a directory or press Enter to accept the default directory.
Destination Directory [/opt/novell/sentinel6]
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
接下來選擇Sentinel的安裝方式。因為這里我們只是用作測試,并安裝在虛擬機(jī)上,因此選擇簡單方式。這時,Sentinel的所有組件將被安裝在同一臺電腦上。
-------------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Choose the installation type that best suits your needs.
[ ] 1 - Simple
All-In-One easy installation.
[X] 2 - Custom
Allows the user to configure a custom installation.
Select the number corresponding to the type of install you would like. Enter 0
to continue: [0]1
[X] 1 - Simple
All-In-One easy installation.
[ ] 2 - Custom
Allows the user to configure a custom installation.
Select the number corresponding to the type of install you would like. Enter 0
to continue: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
輸入Sentinel 6的安裝序列號:12345678和許可證:19c3d24adc1df104。輸入后,系統(tǒng)會提示這是一個臨時許可證,將在2009年5月31日過期。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Serial Number: [] 12345678
License Key: [] 19c3d24adc1df104
You have entered a temporary license key. If a new license key is not provided,
this software will automatically disable itself after the expiration date :
'5/31/09'
[OK]
緊接著系統(tǒng)會詢問SMTP服務(wù)器和發(fā)送郵件的郵件地址信息,默認(rèn)是本地的SMTP服務(wù)器和esecadm。
SMTP Server: [localhost]
E-mail: [esecadm]
下面將詢問是否安裝Advisor,這里我們不進(jìn)行安裝。
Do you wish to install 'Advisor'?
1. Yes
2. No
Enter one of the options above: [2]
之后,系統(tǒng)會提示輸入全局系統(tǒng)口令。其中包括Sentinel管理員用戶和數(shù)據(jù)庫用戶的口令。并制定數(shù)據(jù)庫用戶的用戶名,默認(rèn)是oracle。
Global System Password (used for all Sentinel users)
Password:
Confirm Password:
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
Specify the Oracle username [oracle]
Specify the Oracle username
[OK]
選擇已經(jīng)安裝的Oracle版本,選擇2并繼續(xù)。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Select the target database server platform:
1. Oracle 9i
2. Oracle 10g
Enter one of the options above: [1] 2
Oracle JDBC Driver File: [] /opt/oracle/product/10gR2/db/jdbc/lib/ojdbc14.jar
Database Name: [ESEC]
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
接下來將顯示前面配置的Oracle安裝信息。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Oracle Configuration
SUMMARY
An Oracle database will be created with the following parameters
A new instance will be created named: ESEC.
This database will have a total size of: 10000 MB.
Data file locations are as follows
Data Files: /opt/novell/sentinel6/database
Index Files: /opt/novell/sentinel6/database
Summary Data Files: /opt/novell/sentinel6/database
Summary Index Files: /opt/novell/sentinel6/database
Temporary Files: /opt/novell/sentinel6/database
Redo Logs A: /opt/novell/sentinel6/database
Redo Logs B: /opt/novell/sentinel6/database
The database will listen on port: 1521
The database will use 256 MB of system memory.
The schema will be owned by: esecdba
The application user will be: esecapp
The Sentinel Administrator will be: esecadm
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
接下來,將顯示Sentinel 6的安裝信息,回車?yán)^續(xù)。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Sentinel 6 will be installed in the following location:
/opt/novell/sentinel6
with the following features:
Database
Sentinel Services
Communication Server
Correlation Engine
Data Access Server
Sentinel Collector Service
Applications
Sentinel Control Center
Sentinel Data Manager
for a total size:
460.2 MB
Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]
系統(tǒng)收集完上述信息之后將進(jìn)行安裝,下面是安裝時的顯示信息。安裝時間比較長,跟機(jī)器的性能有關(guān)。在我的電腦上安裝大概進(jìn)行了40分鐘,包括數(shù)據(jù)庫、分區(qū)和Sentinel產(chǎn)品各組件的安裝。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Installing Sentinel Database. Please wait...
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Adding enough partitions for '10' days. Please wait...
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Installing Sentinel 6. Please wait...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
Creating uninstaller...
Finalizing the Vital Product Data Registry. Please wait...
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Setting JVM permissions...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Installing Sentinel Communication Server. Please wait...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Installing Sentinel Communication Server. Please wait...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Setting permissions on installed files...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
Updating container configuration file. Please wait...
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Setting permissions on installed files...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
Setting permissions on installed files...
|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
The InstallShield Wizard has successfully installed Sentinel 6. Choose Finish
to exit the wizard.
Press 3 to Finish or 5 to Redisplay [3]
最后,系統(tǒng)提示需要重新啟動系統(tǒng)才能完成安裝。
----------------------------------------------------------------------------
Sentinel 6 - InstallShield Wizard
The wizard requires that you logout and log back in. To start Sentinel 6
processes, reboot the machine or log back in and start them manually.
Press 3 to Finish or 5 to Redisplay [3]
Sentinel數(shù)據(jù)庫安裝好了之后,會在系統(tǒng)中創(chuàng)建如下用戶:
esecdba:數(shù)據(jù)庫Schema所有者,出于安全考慮,該用戶并未授予數(shù)據(jù)庫DBA的特權(quán)
esecapp:數(shù)據(jù)庫應(yīng)用程序用戶,該用戶用來連接數(shù)據(jù)庫
esecadm:Sentinel管理員的數(shù)據(jù)庫用戶,該用戶不同于Sentinel管理員的操作系統(tǒng)用戶
esecrpt:數(shù)據(jù)庫報告用戶
posted @
2008-06-21 20:24 思考 閱讀(519) |
評論 (0) |
編輯 收藏
安裝SLES 10 x86_64
分區(qū)時使用Ext3文件系統(tǒng);
選擇軟件包時,選擇"Oracle Server Base"和"C/C++ Compiler and Tools",同時保證選擇了"32Bit Runtime Environment";下面是軟件包選擇的一個截圖。

安裝SLES 10的Server Pack
使用SPident或者"cat /etc/SuSE-release"來校驗
oracle:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
oracle:~ # SPident -v
Summary (using 890 packages)
Product/ServicePack conflict match update (shipped)
SLE-10-x86_64 0 0% 325 36.5% 0 (2754 11.8%)
SLE-10-x86_64-SP1 0 0% 470 52.8% 0 (2938 16.0%)
SLE-10-x86_64-SP2 0 0% 889 99.9% 0 (2337 38.0%)
Unknown 1 0.1%
CONCLUSION: System is up-to-date!
found SLE-10-x86_64-SP2
Oracle安裝先決條件
SuSE提供了orarun來自動完成很多Oracle預(yù)安裝的任務(wù)。為了下面安裝Oracle,需要進(jìn)行如下配置。
激活oracle用戶
在安裝了Oracle Server Base之后,系統(tǒng)就自動創(chuàng)建了oracle用戶。但是,默認(rèn)的該用戶是被禁用了的。
oracle:~ # vim /etc/passwd
oracle:x:103:106:Oracle user:/opt/oracle:/bin/false
為此,我們需要激活該用戶。手工編輯/etc/passwd文件:
oracle:x:103:106:Oracle user:/opt/oracle:/bin/bash
修改oracle用戶口令
oracle:~ # passwd oracle
Changing password for oracle.
New Password:
Bad password: too simple
Reenter New Password:
Password changed.
修改Oracle環(huán)境變量
編輯/etc/profile.d/oracle.sh文件中Oracle的環(huán)境變量如下:
oracle:~ # vim /etc/profile.d/oracle.sh
# ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
ORACLE_HOME=$ORACLE_BASE/product/10gR2/db
ORACLE_SID=ESEC
修改ORACLE_HOME和ORACLE_SID環(huán)境變量。
設(shè)置內(nèi)核參數(shù)
運行rcoracle start命令設(shè)置內(nèi)核參數(shù)。因為還沒有安裝Oracle數(shù)據(jù)庫,忽略期間報的錯誤。
oracle:~ # rcoracle start
#############################################################################
# Begin of O R A C L E startup section #
#############################################################################
Oracle Database Software not yet installed!
SETTINGS start from /etc/sysconfig/oracle
- Set Kernel Parameters for Oracle: yes
- Start Oracle Listener: no
- Start Oracle Database: no
- Start Oracle Webserver: no
- Start Oracle EManager: no
- Start Oracle iSQLPLUS Manager: no
- Start Oracle Agent: no
- Start Oracle Internet Filesystem: no
- Start Oracle Directory Manager: no
Oracle Agent undefinied or not properly set. Please check.
Setting kernel parameters for Oracle, see file
/etc/sysconfig/oracle for explanations.
Shared memory: SHMMAX=3294967296 SHMMNI=4096 SHMALL=2097152
Semaphore values: SEMMSL=1250 SEMMNS=32000 SEMOPM=100 SEMMNI=256
Other values: FILE_MAX_KERNEL=131072 IP_LOCAL_PORT_RANGE=1024 65000
RMEM_DEFAULT=4194304 WMEM_DEFAULT=262144 RMEM_MAX=4194304 WMEM_MAX=262144
Huge Pages: SHM_GROUP=dba NR_HUGE_PAGES=0
ULIMIT values: MAX_CORE_FILE_SIZE_SHELL=unlimited
FILE_MAX_SHELL=65536 PROCESSES_MAX_SHELL=16384
Kernel parameters set for Oracle: done
- Starting Listener... unused
+ Starting Database(s)...
unused
- Starting Apache... unused
- Starting Application Server... unused
- Starting Application Server Console... unused
- Starting Agent... unused
- Starting Enterprise Manager... unused
- Starting iSQLPLUS Manager... unused
- Starting Oracle Internet Filesystem... unused
- Starting Oracle Internet Directory... unused
#############################################################################
# End of O R A C L E section #
#############################################################################
檢驗oracle用戶
oracle:~ # su oracle
oracle@oracle:/root> id
uid=103(oracle) gid=106(oinstall) groups=106(oinstall),107(dba)
安裝Oracle 10g
解壓Oracle軟件
#gunzip 10201_database_linux_x86_64.cpio.gz
#cpio -idmv < 10201_database_linux_x86_64.cpio
安裝Oracle 10g SP2
確保使用oracle用戶登錄系統(tǒng),必須使用圖形界面進(jìn)行安裝。為了在SuSE 10上安裝Oracle 10g,必須手工修改安裝配置文件,以確保Oracle支持SuSE 10系統(tǒng)。在Oracle安裝文件路徑下編輯文件:
vim install/oraparam.ini
[Certified Versions]
Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2
選擇高級安裝

選擇默認(rèn)的Inventory目錄

選擇安裝企業(yè)版

在安裝之前,Oracle會檢查系統(tǒng)設(shè)置燈信息是否符合要求。我們將檢查未成功的選擇為"User Verified"。

選擇"Install database Software only"

查看安裝概要并選擇安裝

下面是安裝進(jìn)程。

在安裝結(jié)束之前,系統(tǒng)會提示使用root用戶登錄,執(zhí)行下面腳本。

使用另一個窗口登錄,執(zhí)行腳本。

選擇"Exit"完成安裝。

安裝補(bǔ)丁
在Novell官方的文檔中,Sentinel需要Oracle安裝補(bǔ)丁10.2.0.3。從metalink網(wǎng)站上下載Oracle的補(bǔ)丁p5337014_10203_Linux-x86-64.zip。該補(bǔ)丁有1G多,而且下載時需要metalink的帳號才能下載。
下載后解壓,并確保使用oracle用戶運行Disk1中的runInstaller進(jìn)行安裝。跟安裝Oracle 10g時一樣,安裝程序首先要檢查系統(tǒng)兼容性,為了在SLES 10上安裝,需要修改配置文件,使之支持在SuSE 10上的安裝。修改方法與Oracle 10g安裝時的一樣。
下圖是安裝時的歡迎界面。

首先現(xiàn)在Oracle 10g的安裝目錄。

接下來,是安裝的信息。確認(rèn)后執(zhí)行安裝。

下圖是安裝進(jìn)度。

安裝結(jié)束前,提示需要用戶以root身份手工執(zhí)行root.sh腳本。

打開另一個窗口,執(zhí)行ORACLE_HOME目錄下的root.sh腳本。

執(zhí)行完腳本后,點擊"OK",系統(tǒng)提示完成補(bǔ)丁安裝,點擊"Exit"退出系統(tǒng)安裝。

應(yīng)用關(guān)鍵補(bǔ)丁
下面,需要通過opatch工具安裝Oracle的關(guān)鍵補(bǔ)丁。同樣,首先從metalink網(wǎng)站上下載補(bǔ)?。簆5881721_10203_Linux-x86-64.zip并解壓。請確保使用oralce用戶進(jìn)行下面的操作。
進(jìn)入5881721目錄,運行$ORACLE_HOME/OPatch/opatch apply -local。下圖是安裝過程。

輸入y之后繼續(xù)安裝。
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '5881721' for restore. This might take a while...
Backing up files affected by the patch '5881721' for rollback. This might take a while...
Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/pre -apply 5881721 ':
Return Code = 0
Patching component oracle.sysman.repository.core, 10.2.0.3.0a...
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/DBVerify.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneObject.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneVerify.class"
Patching component oracle.sysman.bsln, 10.2.0.3.0...
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/chart/EmChartBean.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/svlt/RedirectServlet.class"
Patching component oracle.sysman.agent.core, 10.2.0.3.0a...
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmem.a" with "sysman/lib32/libnmem.a/nmemdisp.o"
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmexml.a" with "sysman/lib32/libnmexml.a/nmex.o"
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmehl.a" with "sysman/lib32/libnmehl.a/nmehl.o"
Patching component oracle.rdbms, 10.2.0.3.0...
Updating archive file "/opt/oracle/product/10gR2/db/lib/libserver10.a" with "lib/libserver10.a/qmurd.o"
Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu.sql"
Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu_rollback.sql"
ApplySession adding interim patch '5881721' to inventory
Verifying the update...
Inventory check OK: Patch ID 5881721 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 5881721 are present in Oracle Home.
--------------------------------------------------------------------------------****************************************************************************************************************************************************************** ATTENTION **** **** Please note that the Security Patch Installation (Patch Deinstallation) is **** not complete until all the Post Installation (Post Deinstallation) **** instructions noted in the Readme accompanying this patch, have been **** successfully completed. **** ******************************************************************************************************************************************************************
--------------------------------------------------------------------------------
Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/post -apply 5881721 ':
Return Code = 0
Running make for target libnmemso
Running make for target ioracle
The local system has been patched and can be restarted.
OPatch succeeded.
最后,通過$ORACLE_HOME/OPatch/opatch lsinventory命令進(jìn)行補(bǔ)丁狀態(tài)檢查。
oracle@oracle:/mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721> /opt/oracle/product/10gR2/db/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.3.0
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10gR2/db
Central Inventory : /opt/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /opt/oracle/product/10gR2/db/oui
Log file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/opatch2008-06-20_14-33-53PM.log
Lsinventory Output file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/lsinv/lsinventory2008-06-20_14-33-53PM.txt
--------------------------------------------------------------------------------Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0
There are 2 products installed in this Oracle Home.
Interim patches (3) :
Patch 5881721 : applied on Fri Jun 20 14:26:08 GMT+08:00 2008
Created on 19 Feb 2007, 02:16:34 hrs US/Pacific
Bugs fixed:
5885186, 5881721
Patch 5556081 : applied on Fri Jun 20 11:51:55 GMT+08:00 2008
Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
Bugs fixed:
5556081
Patch 5557962 : applied on Fri Jun 20 11:51:46 GMT+08:00 2008
Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
Bugs fixed:
4269423, 5557962, 5528974
--------------------------------------------------------------------------------
OPatch succeeded.
如果成功,將出現(xiàn)"OPatch succeeded."字樣。
至此,針對Sentinel 6的Oracle安裝已經(jīng)完成。接下來就是進(jìn)行Sentinel產(chǎn)品的安裝。
安裝SLES 10的Server Pack
使用SPident或者"cat /etc/SuSE-release"來校驗
oracle:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
oracle:~ # SPident -v
Summary (using 890 packages)
Product/ServicePack conflict match update (shipped)
SLE-10-x86_64 0 0% 325 36.5% 0 (2754 11.8%)
SLE-10-x86_64-SP1 0 0% 470 52.8% 0 (2938 16.0%)
SLE-10-x86_64-SP2 0 0% 889 99.9% 0 (2337 38.0%)
Unknown 1 0.1%
CONCLUSION: System is up-to-date!
found SLE-10-x86_64-SP2
Oracle安裝先決條件
SuSE提供了orarun來自動完成很多Oracle預(yù)安裝的任務(wù)。為了下面安裝Oracle,需要進(jìn)行如下配置。
激活oracle用戶
在安裝了Oracle Server Base之后,系統(tǒng)就自動創(chuàng)建了oracle用戶。但是,默認(rèn)的該用戶是被禁用了的。
oracle:~ # vim /etc/passwd
oracle:x:103:106:Oracle user:/opt/oracle:/bin/false
為此,我們需要激活該用戶。手工編輯/etc/passwd文件:
oracle:x:103:106:Oracle user:/opt/oracle:/bin/bash
修改oracle用戶口令
oracle:~ # passwd oracle
Changing password for oracle.
New Password:
Bad password: too simple
Reenter New Password:
Password changed.
修改Oracle環(huán)境變量
編輯/etc/profile.d/oracle.sh文件中Oracle的環(huán)境變量如下:
oracle:~ # vim /etc/profile.d/oracle.sh
# ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
ORACLE_HOME=$ORACLE_BASE/product/10gR2/db
ORACLE_SID=ESEC
修改ORACLE_HOME和ORACLE_SID環(huán)境變量。
設(shè)置內(nèi)核參數(shù)
運行rcoracle start命令設(shè)置內(nèi)核參數(shù)。因為還沒有安裝Oracle數(shù)據(jù)庫,忽略期間報的錯誤。
oracle:~ # rcoracle start
#############################################################################
# Begin of O R A C L E startup section #
#############################################################################
Oracle Database Software not yet installed!
SETTINGS start from /etc/sysconfig/oracle
- Set Kernel Parameters for Oracle: yes
- Start Oracle Listener: no
- Start Oracle Database: no
- Start Oracle Webserver: no
- Start Oracle EManager: no
- Start Oracle iSQLPLUS Manager: no
- Start Oracle Agent: no
- Start Oracle Internet Filesystem: no
- Start Oracle Directory Manager: no
Oracle Agent undefinied or not properly set. Please check.
Setting kernel parameters for Oracle, see file
/etc/sysconfig/oracle for explanations.
Shared memory: SHMMAX=3294967296 SHMMNI=4096 SHMALL=2097152
Semaphore values: SEMMSL=1250 SEMMNS=32000 SEMOPM=100 SEMMNI=256
Other values: FILE_MAX_KERNEL=131072 IP_LOCAL_PORT_RANGE=1024 65000
RMEM_DEFAULT=4194304 WMEM_DEFAULT=262144 RMEM_MAX=4194304 WMEM_MAX=262144
Huge Pages: SHM_GROUP=dba NR_HUGE_PAGES=0
ULIMIT values: MAX_CORE_FILE_SIZE_SHELL=unlimited
FILE_MAX_SHELL=65536 PROCESSES_MAX_SHELL=16384
Kernel parameters set for Oracle: done
- Starting Listener... unused
+ Starting Database(s)...
unused
- Starting Apache... unused
- Starting Application Server... unused
- Starting Application Server Console... unused
- Starting Agent... unused
- Starting Enterprise Manager... unused
- Starting iSQLPLUS Manager... unused
- Starting Oracle Internet Filesystem... unused
- Starting Oracle Internet Directory... unused
#############################################################################
# End of O R A C L E section #
#############################################################################
檢驗oracle用戶
oracle:~ # su oracle
oracle@oracle:/root> id
uid=103(oracle) gid=106(oinstall) groups=106(oinstall),107(dba)
安裝Oracle 10g
解壓Oracle軟件
#gunzip 10201_database_linux_x86_64.cpio.gz
#cpio -idmv < 10201_database_linux_x86_64.cpio
安裝Oracle 10g SP2
確保使用oracle用戶登錄系統(tǒng),必須使用圖形界面進(jìn)行安裝。為了在SuSE 10上安裝Oracle 10g,必須手工修改安裝配置文件,以確保Oracle支持SuSE 10系統(tǒng)。在Oracle安裝文件路徑下編輯文件:
vim install/oraparam.ini
[Certified Versions]
Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2
選擇高級安裝

選擇默認(rèn)的Inventory目錄

選擇安裝企業(yè)版

在安裝之前,Oracle會檢查系統(tǒng)設(shè)置燈信息是否符合要求。我們將檢查未成功的選擇為"User Verified"。

選擇"Install database Software only"

查看安裝概要并選擇安裝

下面是安裝進(jìn)程。

在安裝結(jié)束之前,系統(tǒng)會提示使用root用戶登錄,執(zhí)行下面腳本。

使用另一個窗口登錄,執(zhí)行腳本。

選擇"Exit"完成安裝。

安裝補(bǔ)丁
在Novell官方的文檔中,Sentinel需要Oracle安裝補(bǔ)丁10.2.0.3。從metalink網(wǎng)站上下載Oracle的補(bǔ)丁p5337014_10203_Linux-x86-64.zip。該補(bǔ)丁有1G多,而且下載時需要metalink的帳號才能下載。
下載后解壓,并確保使用oracle用戶運行Disk1中的runInstaller進(jìn)行安裝。跟安裝Oracle 10g時一樣,安裝程序首先要檢查系統(tǒng)兼容性,為了在SLES 10上安裝,需要修改配置文件,使之支持在SuSE 10上的安裝。修改方法與Oracle 10g安裝時的一樣。
下圖是安裝時的歡迎界面。

首先現(xiàn)在Oracle 10g的安裝目錄。

接下來,是安裝的信息。確認(rèn)后執(zhí)行安裝。

下圖是安裝進(jìn)度。

安裝結(jié)束前,提示需要用戶以root身份手工執(zhí)行root.sh腳本。

打開另一個窗口,執(zhí)行ORACLE_HOME目錄下的root.sh腳本。

執(zhí)行完腳本后,點擊"OK",系統(tǒng)提示完成補(bǔ)丁安裝,點擊"Exit"退出系統(tǒng)安裝。

應(yīng)用關(guān)鍵補(bǔ)丁
下面,需要通過opatch工具安裝Oracle的關(guān)鍵補(bǔ)丁。同樣,首先從metalink網(wǎng)站上下載補(bǔ)丁:p5881721_10203_Linux-x86-64.zip并解壓。請確保使用oralce用戶進(jìn)行下面的操作。
進(jìn)入5881721目錄,運行$ORACLE_HOME/OPatch/opatch apply -local。下圖是安裝過程。

輸入y之后繼續(xù)安裝。
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '5881721' for restore. This might take a while...
Backing up files affected by the patch '5881721' for rollback. This might take a while...
Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/pre -apply 5881721 ':
Return Code = 0
Patching component oracle.sysman.repository.core, 10.2.0.3.0a...
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/DBVerify.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneObject.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneVerify.class"
Patching component oracle.sysman.bsln, 10.2.0.3.0...
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/chart/EmChartBean.class"
Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/svlt/RedirectServlet.class"
Patching component oracle.sysman.agent.core, 10.2.0.3.0a...
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmem.a" with "sysman/lib32/libnmem.a/nmemdisp.o"
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmexml.a" with "sysman/lib32/libnmexml.a/nmex.o"
Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmehl.a" with "sysman/lib32/libnmehl.a/nmehl.o"
Patching component oracle.rdbms, 10.2.0.3.0...
Updating archive file "/opt/oracle/product/10gR2/db/lib/libserver10.a" with "lib/libserver10.a/qmurd.o"
Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu.sql"
Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu_rollback.sql"
ApplySession adding interim patch '5881721' to inventory
Verifying the update...
Inventory check OK: Patch ID 5881721 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 5881721 are present in Oracle Home.
--------------------------------------------------------------------------------****************************************************************************************************************************************************************** ATTENTION **** **** Please note that the Security Patch Installation (Patch Deinstallation) is **** not complete until all the Post Installation (Post Deinstallation) **** instructions noted in the Readme accompanying this patch, have been **** successfully completed. **** ******************************************************************************************************************************************************************
--------------------------------------------------------------------------------
Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/post -apply 5881721 ':
Return Code = 0
Running make for target libnmemso
Running make for target ioracle
The local system has been patched and can be restarted.
OPatch succeeded.
最后,通過$ORACLE_HOME/OPatch/opatch lsinventory命令進(jìn)行補(bǔ)丁狀態(tài)檢查。
oracle@oracle:/mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721> /opt/oracle/product/10gR2/db/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.3.0
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10gR2/db
Central Inventory : /opt/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /opt/oracle/product/10gR2/db/oui
Log file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/opatch2008-06-20_14-33-53PM.log
Lsinventory Output file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/lsinv/lsinventory2008-06-20_14-33-53PM.txt
--------------------------------------------------------------------------------Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0
There are 2 products installed in this Oracle Home.
Interim patches (3) :
Patch 5881721 : applied on Fri Jun 20 14:26:08 GMT+08:00 2008
Created on 19 Feb 2007, 02:16:34 hrs US/Pacific
Bugs fixed:
5885186, 5881721
Patch 5556081 : applied on Fri Jun 20 11:51:55 GMT+08:00 2008
Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
Bugs fixed:
5556081
Patch 5557962 : applied on Fri Jun 20 11:51:46 GMT+08:00 2008
Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
Bugs fixed:
4269423, 5557962, 5528974
--------------------------------------------------------------------------------
OPatch succeeded.
如果成功,將出現(xiàn)"OPatch succeeded."字樣。
至此,針對Sentinel 6的Oracle安裝已經(jīng)完成。接下來就是進(jìn)行Sentinel產(chǎn)品的安裝。
posted @
2008-06-21 20:14 思考 閱讀(2262) |
評論 (0) |
編輯 收藏
在suse中設(shè)置用字符界面啟動,第一個終端下面有特效。今天無意中看到在哪里可以改。記下來。
/etc/sysconfig/bootsplash
## Path: System/Boot
## Description: selects bootsplash graphics theme
## Type: string
## Default: SuSE-SLES
# Choose the bootsplash theme. It should be based in
# /etc/bootsplash/themes/
THEME="SuSE-SLES"
## Path: System/Boot
## Description: enables/disables bootup graphics
## Type: yesno
## Default: yes
#
# SPLASH can be set to "no" to turn off the splash-screen on console 1
# at boot time (after kernel load).
#
# SPLASH=no to disable the splash screen
#
# SPLASH=yes to show the splash screen
#
SPLASH="yes"
posted @
2007-09-15 18:58 思考 閱讀(542) |
評論 (1) |
編輯 收藏
摘要: 網(wǎng)上有很多源代碼可以實現(xiàn)Base64編碼的轉(zhuǎn)換,但是主要是對中文轉(zhuǎn)換的時候有問題。
后來在網(wǎng)上找了很多資料,發(fā)現(xiàn)原來在Java默認(rèn)的實現(xiàn)機(jī)制中,內(nèi)部使用UTF-16編碼,而所有算法是針對英文UTF-8的。因此,在對中文字符串轉(zhuǎn)換的過程中會出現(xiàn)截取錯誤。后來在源代碼的基礎(chǔ)上進(jìn)行了小的調(diào)整,最好可以實現(xiàn)Base64編碼。
下面貼出一個實現(xiàn)代碼:
1package ...
閱讀全文
posted @
2007-09-15 18:40 思考 閱讀(7727) |
評論 (5) |
編輯 收藏
suse:~ # help test
test: test [expr]
Exits with a status of 0 (true) or 1 (false) depending on
the evaluation of EXPR. Expressions may be unary or binary. Unary
expressions are often used to examine the status of a file. There
are string operators as well, and numeric comparison operators.
File operators:
-a FILE True if file exists.
-b FILE True if file is block special.
-c FILE True if file is character special.
-d FILE True if file is a directory.
-e FILE True if file exists.
-f FILE True if file exists and is a regular file.
-g FILE True if file is set-group-id.
-h FILE True if file is a symbolic link.
-L FILE True if file is a symbolic link.
-k FILE True if file has its `sticky' bit set.
-p FILE True if file is a named pipe.
-r FILE True if file is readable by you.
-s FILE True if file exists and is not empty.
-S FILE True if file is a socket.
-t FD True if FD is opened on a terminal.
-u FILE True if the file is set-user-id.
-w FILE True if the file is writable by you.
-x FILE True if the file is executable by you.
-O FILE True if the file is effectively owned by you.
-G FILE True if the file is effectively owned by your group.
-N FILE True if the file has been modified since it was last read.
FILE1 -nt FILE2 True if file1 is newer than file2 (according to
modification date).
FILE1 -ot FILE2 True if file1 is older than file2.
FILE1 -ef FILE2 True if file1 is a hard link to file2.
String operators:
-z STRING True if string is empty.
-n STRING
STRING True if string is not empty.
STRING1 = STRING2
True if the strings are equal.
STRING1 != STRING2
True if the strings are not equal.
STRING1 < STRING2
True if STRING1 sorts before STRING2 lexicographically.
STRING1 > STRING2
True if STRING1 sorts after STRING2 lexicographically.
Other operators:
-o OPTION True if the shell option OPTION is enabled.
! EXPR True if expr is false.
EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.
EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.
arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,
-lt, -le, -gt, or -ge.
Arithmetic binary operators return true if ARG1 is equal, not-equal,
less-than, less-than-or-equal, greater-than, or greater-than-or-equal
than ARG2.
posted @
2007-08-12 10:38 思考 閱讀(271) |
評論 (0) |
編輯 收藏
在SuSE Linux Enterprise Server 9上安裝Oracle9i后,及時使用了安裝了
orarun-1.8-109.15.i586.rpm包,也無法正常啟動。
后來跟蹤了啟動的Shell腳本,最后發(fā)現(xiàn)是需要更改$ORACLE_HOME/bin/dbstart文件。在該文件中,定義變量PFILE:
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
其中,在Oracle9i中已經(jīng)通過spfile${ORACLE_SID}.ora。因此,將PFILE變量修改為:
PFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
同時,為了可以在關(guān)機(jī)的時候關(guān)閉數(shù)據(jù)庫,同時在$ORACLE_HOME/bin/dbshut文件中對應(yīng)的位置也需要修改PFILE文件的定義。
另外,還有一種方法,就是生成pfile。用sqlplus連接數(shù)據(jù)庫,
conn / as sysdba
create pfile from spfile;
這樣,就會參考${ORACLE_HOME}/dbs/spfileora9i.ora生成initora9i.ora這個pfile。這樣就不用改啟動腳本文件了。
以上兩種方法已經(jīng)證明都可以正常工作。
posted @
2007-07-15 18:26 思考 閱讀(902) |
評論 (0) |
編輯 收藏
在SuSE下,由于SuSE特有的腳本管理方法,Should-Stop和Default-Stop選項被忽略了。同時,在腳本開始處執(zhí)行/etc/rc.status腳本,可以通過調(diào)用rc_status -v檢查啟動命令的執(zhí)行結(jié)果并彩色顯示出來。
#!/bin/bash
#
# /etc/init.d/oracle
#
### BEGIN INIT INFO
# Provides:
# Required-Start: $network $syslog
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Description: Startup/shutdown script for oracle listener and instance;
### END
. /etc/rc.status
rc_reset
start()
{
#when system stop redhat check /var/lock/subsys/oracle
#to make sure oracle is running.
touch /var/lock/subsys/oracle
# start tsnlisnter
echo -n "Start tsnlisnter:"
su - oracle -c "lsnrctl start" >/dev/null 2>/dev/null
rc_status -v
# start database
echo -n "Start Oracle database instance:"
su - oracle -c "echo \"
CONN / AS SYSDBA
STARTUP
exit \"|sqlplus /NOLOG" >/dev/null 2>/dev/null
rc_status -v
# start enterprise manager
echo -n "Start Enterprise Manager:"
su - oracle -c "emctl start dbconsole" >/dev/null 2>/dev/null
rc_status -v
#start isqlplus
echo -n "Start isqlplus"
su - oracle -c "isqlplusctl start">/dev/null 2>/dev/null
rc_status -v
}
stop()
{
#when system stop redhat check /var/lock/subsys/oracle
#to make sure oracle is running.
rm -rf /var/lock/subsys/oracle
# shutdown database
echo -n "Shutdown Oracle database instance:"
su - oracle -c "echo \"
CONN / AS SYSDBA
SHUTDOWN immediate
exit \"|sqlplus /NOLOG">/dev/null 2>/dev/null
rc_status -v
# stop tsnlisnter
echo -n "Stop tsnlisnter:"
su - oracle -c "lsnrctl stop">/dev/null 2>/dev/null
rc_status -v
# stop enterprise manager
echo -n "Stop Enterprise Manager:"
su - oracle -c "emctl stop dbconsole"
rc_status -v
# stop isqlplus
echo -n "Stop isqlplus:"
su - oracle -c "isqlplusctl stop"
rc_status -v
}
case "$1" in
start)
start
echo "Oracle Start at:" `date` >>/var/log/oracle.log
;;
stop)
stop
echo "Oracle Stop at:" `date` >>/var/log/oracle.log
;;
restart)
echo "Oracle Restart at:" `date` >>/var/log/oracle.log
stop
start
;;
*)
echo "Usage: $0 { start | stop| restart }"
exit 1
;;
esac
rc_exit
posted @
2007-06-05 09:50 思考 閱讀(1501) |
評論 (0) |
編輯 收藏
在用Struts開發(fā)項目的時候遇到了一個問題,當(dāng)上傳文件時,中文文件名會出現(xiàn)亂碼問題。
于是,在Google和Baidu上面進(jìn)行了搜索。結(jié)果發(fā)現(xiàn)有無數(shù)人遇到了相同的問題,大家也都在迫切的詢問此類問題。但是回帖的結(jié)果卻讓人特別生氣!
回帖的內(nèi)容大致可分為兩類:
第一類,都是把別人的帖子轉(zhuǎn)來轉(zhuǎn)去,也不著名出處。更是有幾個人都在自己的博客上寫的內(nèi)容完全一樣,還說是自己寫的!
另一類相對要好一些,對問題進(jìn)行了解答。但是,按照他們所說的進(jìn)行了更改,根本就不能解決問題。真是不知道他們是這么解決這個問題的。
后來在玉米田http://www.yumt.com/showlog.jspe?log_id=56#71的博客上有一篇文章說道了此事,才能徹底解決這個問題。看了之后才知道,原來Struts的upload功能是對jakarta apache的commons-fileUpload進(jìn)行了封裝實現(xiàn)的。但是在實現(xiàn)時,沒有考慮到文件編碼的問題。所以,需要對struts.jar中的文件進(jìn)行修改并重新編譯打包。事實證明,這樣作問題解決了。
但是回過頭來,那些通過在JSP頁面中設(shè)置編碼方式為UTF-8或者在得到文件名進(jìn)行編碼轉(zhuǎn)譯的人是如何解決這個問題的,難道我的系統(tǒng)跟他們的不一樣嗎?
由此,可以看出很多網(wǎng)友不能夠踏踏實實的做人,人云亦云。抱著一種極其不負(fù)責(zé)任的態(tài)度,這樣作不但是自己不能真正理解問題的本質(zhì),得不到提高和進(jìn)步,更加影響了對此類問題不甚了解并渴望解答的人所誤解。
同時,一旦這種風(fēng)氣發(fā)展下去,下次提問者作為解答者的時候這種現(xiàn)象又會出現(xiàn)。如果此類現(xiàn)象愈演愈烈,勢必會對我們中國整個軟件業(yè)甚至這個中華民族帶來及其深刻的影響!
希望跟我有同感的IT同仁可以從自己做起,認(rèn)真回答網(wǎng)友的提問。我們從自己做起,從現(xiàn)在做起!
posted @
2006-12-20 20:33 思考 閱讀(270) |
評論 (0) |
編輯 收藏
今天看了Sun的Java編程習(xí)慣,記錄一下:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
posted @
2006-11-12 17:08 思考 閱讀(324) |
評論 (1) |
編輯 收藏
好久沒來了,感覺沒有對社區(qū)做出點貢獻(xiàn),有愧版主的頭銜,今日在這里為大家提供兩則小技巧,以便幫你強(qiáng)行殺死“頑固不化”的病毒進(jìn)程。?
根據(jù)進(jìn)程名查殺?
這種方法是通過WinXP系統(tǒng)下的taskkill命令來實現(xiàn)的,在使用該方法之前,首先需要打開系統(tǒng)的進(jìn)程列表界面,找到病毒進(jìn)程所對應(yīng)的具體進(jìn)程名。?
接著依次單擊“開始→運行”命令,在彈出的系統(tǒng)運行框中,運行“cmd”命令;再在DOS命令行中輸入“taskkill?/im?aaa”格式的字符串命令,單擊回車鍵后,頑固的病毒進(jìn)程“aaa”就被強(qiáng)行殺死了。比方說,要強(qiáng)行殺死“conime.exe”病毒進(jìn)程,只要在命令提示符下執(zhí)行“taskkill?/im?conime.exe”命令,要不了多久,系統(tǒng)就會自動返回結(jié)果。?
根據(jù)進(jìn)程號查殺?
上面的方法,只對部分病毒進(jìn)程有效,遇到一些更“頑固”的病毒進(jìn)程,可能就無濟(jì)于事了。此時你可以通過Win2000以上系統(tǒng)的內(nèi)置命令——ntsd,來強(qiáng)行殺死一切病毒進(jìn)程,因為該命令除System進(jìn)程、SMSS.EXE進(jìn)程、CSRSS.EXE進(jìn)程不能“對付”外,基本可以對付其它一切進(jìn)程。但是在使用該命令殺死病毒進(jìn)程之前,需要先查找到對應(yīng)病毒進(jìn)程的具體進(jìn)程號。?
考慮到系統(tǒng)進(jìn)程列表界面在默認(rèn)狀態(tài)下,是不顯示具體進(jìn)程號的,因此你可以首先打開系統(tǒng)任務(wù)管理器窗口,再單擊“查看”菜單項下面的“選擇列”命令,在彈出的設(shè)置框中,將“PID(進(jìn)程標(biāo)志符)”選項選中,單擊“確定”按鈕。返回到系統(tǒng)進(jìn)程列表頁面中后,你就能查看到對應(yīng)病毒進(jìn)程的具體PID了。?
接著打開系統(tǒng)運行對話框,在其中運行“cmd”命令,在命令提示符狀態(tài)下輸入“ntsd?-c?q?-p?PID”命令,就可以強(qiáng)行將指定PID的病毒進(jìn)程殺死了。例如,發(fā)現(xiàn)某個病毒進(jìn)程的PID為“444”,那么可以執(zhí)行“ntsd?-c?q?-p?444”命令,來殺死這個病毒進(jìn)程。
posted @
2006-08-21 14:50 思考 閱讀(926) |
評論 (0) |
編輯 收藏
1.在拖地的水中加入幾滴薰衣草精油
2.家中幾個角落放些"滅蟻靈",一元一包,一天至兩天,讓它一窩端
3.家人無意收聽到了一則紅螞蟻遇到橡皮筋就走開的廣播,便打算試一試。
4.用雞蛋殼數(shù)個,放在爐子上烤黃(不能烤焦),然后輾成粉末狀,撒在螞蟻窩周圍及其經(jīng)常出入的地方,因為此粉末有香味,螞蟻特別愛吃,吃多了就會被撐死。
posted @
2006-08-13 13:00 思考 閱讀(404) |
評論 (0) |
編輯 收藏
今天看了一則報道“
廣州現(xiàn)新型犯罪方式 將路邊行人拉上車搶劫強(qiáng)奸”,其中說道廣州警察為了打擊犯罪,依法開了12槍,3個被擊斃,9個被打傷。這個命中率也太高了吧,100%。
posted @
2006-07-21 22:03 思考 閱讀(338) |
評論 (1) |
編輯 收藏
首先聲名,本人不是球迷,看球完全是一種消遣。
在看完昨天世界杯后,中央5臺的主持人張斌在節(jié)目中,首先講述了很多足球解說人的路子都是從球迷、記者到主持人這樣一步一步走過來的。然后,就請現(xiàn)場的一位觀眾對剛剛進(jìn)行完的比賽中德國隊的第一個進(jìn)球做現(xiàn)場解說。結(jié)果,那位是中國寬帶網(wǎng)的觀眾的表現(xiàn)可想而知,不能令人滿意。接下來,張斌就得出這樣一個結(jié)論:你看,做一名足球解說不是那么容易的事吧……如果你說了3000場比賽,你也可以說的很好。大概是這樣的吧,具體我也沒有記住。然后他大腹便便、心滿意足的回到了主持人的坐席上,繼續(xù)支持他的節(jié)目。
說實話,當(dāng)時我真想沖到北京打他一頓,說的什么狗屁話。他的言外之意就是他們的工作有難度,不想我們想象中那么簡單,所以口誤是正常的。首先,那個觀眾是第一次說球,能說成這樣已經(jīng)不錯了。但是不能因為他說的不好,就能夠證明你們的工作有多么多么的難。其次,即使我們承認(rèn)解說員工作存在難度,也不能為你們的口誤找借口啊。不然,中央臺為什么付薪水給你,而不去找其它人。話說回來,我也聽過ESPN的主持人的解說,雖然不是常聽,但是至少在我收看時沒有發(fā)現(xiàn)口誤的問題。最后,不能因為工作存在困難,就堂而皇之的為自己的失職尋找客觀原因。不要說是人,就連機(jī)器都有出錯的時候,這點我們是可以理解的。但是,如果希望觀眾,至少是那些吹毛求疵的觀眾,可以理解你們,最起碼的為自己失職的道歉還是應(yīng)該有的吧!
posted @
2006-06-21 12:05 思考 閱讀(225) |
評論 (0) |
編輯 收藏
?????????1、孔子路過泰山腳下,有一個婦女在墓前哀傷地哭泣??鬃邮址鲕囇芈犓拊V,并讓弟子問她緣由,婦女說:“以前我的公公被老虎咬死,我的丈夫跟著被老虎咬死,現(xiàn)在我的兒子也被老虎咬死了;”
孔子說:“事情都過去了,又何必傷心?”
婦女說:“不僅如此,這里還有繁重的苛捐雜稅”;
孔子道:“那為什么不離開這里呢?”
婦女說:“我怕失去低收入者作為納稅人的榮譽(yù)!”
孔子于是對弟子道:“小子識之,苛政雖猛于虎,然納稅人的榮譽(yù)牛B于苛政也!”
----全國人大農(nóng)業(yè)與農(nóng)村委員會委員任正隆則認(rèn)為,起征點太高剝奪了低收入者作為“納稅人”的榮譽(yù)。
2、漢朝的淮南王劉安派人進(jìn)山訪仙,從仙翁手里得到了一張仙方。他把自己關(guān)進(jìn)暗房里,煉起仙丹來。八卦爐里煉出一些圓滾滾的仙丹,他一口氣吞下5顆,飄飄悠悠飛上天去了!門外的雞犬一看,也跟著大吃起來,不一會,空中一陣雞鳴狗叫,原來它們也飛上天了!有人問道:“劉安,你家的雞犬怎么也跟著成仙了?”
劉安說:“為了防止拉登發(fā)動恐怖襲擊、撞擊天庭,我特意實行“一人得道,雞犬升天”制,在任何緊急情況下,都能及時幫助疏散與救援,這是一個安全上的舉措,并不是專門把成仙作為福利”。
----廣州地鐵線網(wǎng)聽政會上,地鐵員工家屬免費坐地鐵引起代表爭議,地鐵總經(jīng)理解釋,是為了“反恐需要”。
3、秦始皇修筑萬里長城時死了許多人,孟姜女的丈夫萬喜良也在其中。聽到這個消息,孟姜女只覺得天昏地暗,一下子昏倒在地,醒來后,她傷心地痛哭起來,只哭得天愁地慘,日月無光。不知哭了多久,忽聽得天搖地動般地一聲巨響,長城崩塌了幾十里,露出了數(shù)不清的尸骨。孟姜女咬破手指,把血滴在一具具的尸骨上,她心里暗暗禱告:如果是丈夫的尸骨,血就會滲進(jìn)骨頭,如果不是,血就會流向四方。終于,孟姜女用這種方法找到了萬喜良的尸骨。她抱著這堆白骨,哭著說道:“老萬,你的死跟你丫本人素質(zhì)不高有關(guān)?。 ?
----11月30日,七煤公司一領(lǐng)導(dǎo)在接受采訪時表示,“11·27”礦難的主要原因歸咎于井下礦工對規(guī)章制度執(zhí)行不力,勞動者的素質(zhì)離我們的要求還差很遠(yuǎn)。
4、三國演義里,諸葛亮造木牛流馬,用來運送糧草,以此大敗曹軍。但后來木牛流馬卻失傳了,即便是諸葛亮的得意弟子姜維也不會造。諸葛軍師臨終前眾將問他:“軍師,木牛流馬這般好用,為何您再也不造了?”
孔明長嘆一聲曰:“某交通學(xué)大學(xué)士、大教授的研究結(jié)果表明,木牛流馬的污染比汽車飛機(jī)大,為了子孫后代的幸福,你們還是等著坐汽車吧!”
----“中國城市環(huán)境污染不是由汽車造成的,而是由自行車造成的”。國內(nèi)一家搞環(huán)境研究的權(quán)威機(jī)構(gòu)經(jīng)過一番調(diào)查與研究后得出的一個“科學(xué)”結(jié)論。
5、老栓也向那邊看,卻只見一堆人的后背;頸項都伸得很長,仿佛許多鴨,被無形的手捏住了的,向上提著。靜了一會,似乎有點聲音,便又動搖起來,轟的一聲,都向后退;一直散到老栓立著的地方,幾乎將他擠倒了。
“喂!一手交錢,一手交貨!”一個渾身黑色的人,站在老栓面前,眼光正像兩把刀,刺得老栓縮小了一半。那人一只大手,向他攤著;一只手卻撮著一個鮮紅的饅頭,那紅的還是一點一點的往下滴。
老栓慌忙摸出洋錢,抖抖的想交給他,卻又不敢去接他的東西。那人便焦急起來,嚷道,“怎么?嫌貴?舍不得銀子?” 老栓還躊躇著,黑的人便搶過燈籠,一把扯下紙罩,裹了饅頭,
塞與老栓;一手抓過洋錢,捏一捏,轉(zhuǎn)身去了。嘴里哼著說:“這血饅頭是藥,不能當(dāng)饅頭賣!價格不貴,不同意降價!”
----“藥品怎么能當(dāng)饅頭賣?”在“看病難,藥價貴”呼聲高漲時,東盛制藥集團(tuán)總裁陶朝輝卻反其道而行之,拋出“饅頭論”,堅持“藥價不貴,不同意降價”。
6、宋代窮儒陳世美,進(jìn)京考中狀元,被招為駙馬。其發(fā)妻秦香蓮帶二子上京尋親,陳世美翻臉不認(rèn)人;秦香蓮悲痛欲絕,發(fā)誓要討還情債。陳世美勃然大怒,上表朝廷奏曰:臣以為,開封自古就是神圣之地,豈容外地人隨便進(jìn)入?應(yīng)該建立人口準(zhǔn)入制度!同時,對那些惡意討情之人,應(yīng)堅決打擊!”
----在剛剛結(jié)束的北京市“兩會”上,政協(xié)委員張惟英教授提出“建立人口準(zhǔn)入制度”的建議:目前北京市的居住人口已超過各種資源的人口承載極限,嚴(yán)重制約了北京的發(fā)展,建議摸清北京市實際需要的人才類別,用準(zhǔn)入制度進(jìn)行合理的引入,規(guī)范人口流動。
7、武松醉打蔣門神、替施恩奪了快活林之后,中了張都監(jiān)、張團(tuán)練的計,幾乎命喪飛云浦。武松殺了張都監(jiān)的幾名爪牙,尋思了半晌,怨恨沖天:“不殺得張都監(jiān),如何出得這口恨氣!”便去死尸身邊解下腰刀,選好的取把將來跨了,揀條好樸刀提著,直奔孟州城張都監(jiān)的后花園。
張都監(jiān)、張團(tuán)練、蔣門神正在鴛鴦樓吃酒,冷不防武松闖了進(jìn)來,噗噗幾刀砍死蔣門神、張團(tuán)練。武松踏著張都監(jiān)的腦袋喝道:“你們這幫賊子,為何黑道白道勾結(jié)、串通一氣害我?”
張都監(jiān)顫顫巍巍地答道:“說句實話,官匪勾結(jié)的重要原因,是我們的待遇過低了!”
?。啥蓟疖囌九沙鏊彼L付小華接受采訪時表示:“出現(xiàn)‘警匪勾結(jié)’這種情況的重要原因是警察待遇過低”
8、有一日,竇娥碰到蘇三、楊乃武、小白菜等人,就問他們:“你們都平反昭雪了嗎?”眾人說:“都昭雪了”;竇娥又問:“那少奇兄弟、德懷兄弟、志新妹妹呢?”眾人說:“也都平反了”。竇娥便道:“我說什么來著,咱們的司法就是公正!那么多案件從錯的糾成正的,這難道不是司法公正的體現(xiàn)嗎?”
----被無辜關(guān)押11年的佘祥林被宣告無罪了,但這一悲劇投石入湖的震蕩,遠(yuǎn)遠(yuǎn)沒有平息。當(dāng)事人申請國家賠償、責(zé)任人被追究法律責(zé)任,尚都在公眾的持續(xù)關(guān)注中。種種怨怒未消之下,另一方面卻居然頻頻出現(xiàn)奇怪的言論:4月1日湖北高院向該省法院系統(tǒng)發(fā)出通知,要求認(rèn)真總結(jié)避免佘祥林被冤殺的經(jīng)驗;最高法副院長萬鄂湘日前在就此案答媒體問時又說:“是否司法不公應(yīng)該從最后糾正的結(jié)果看。這個案件從錯的又糾成正的,難道不是司法公正的體現(xiàn)嗎?”
9、一天,周扒皮去找劉文彩,“劉大哥,我們村那些窮棒子們發(fā)牢騷,說他們活得太苦、活得沒意思”;
劉文彩說:“他們是我國巨大的財富,沒有他們的辛苦哪有咱們少數(shù)人的享樂,他們的存在和維持現(xiàn)在的狀態(tài)是很有必要的。”
周扒皮說:“有的長工說他想讀書!”
劉文彩道:“咱們的教育改革已經(jīng)成功了,他還嚷嚷個屁!”
周扒皮說:“他們說收租院放高利貸是暴利”;
劉文彩道:“放高利貸就該暴利,誰讓他們不幸生在X國了?我們就是要把暴利進(jìn)行到底!”
周扒皮說:“他們還說現(xiàn)在收入差距過大,存在兩極分化”;
劉文彩道:“純屬放屁!大家都在同一個經(jīng)緯度上,又不是一個在南極、一個在北極,哪來的兩極分化?!”
?。?經(jīng)濟(jì)學(xué)家厲以寧如是說“8億多農(nóng)民和下崗工人是中國巨大的財富,沒有他們的辛苦哪有少數(shù)人的享樂,他們的存在和維持現(xiàn)在的狀態(tài)是很有必要的?!?
10、董存瑞犧牲后到了天堂,上帝問他:“你是怎么死的?”董存瑞說:“為了炸敵人的碉堡,被炸藥包炸死的”;
上帝聽后勃然大怒,說道:“胡說!你膽敢騙我?”
董存瑞說:“我沒騙您??!”
上帝說:“你以為我不懂科學(xué)嗎?誰不知道,爆炸只會產(chǎn)生水和二氧化碳,你不是被水淹死的、就是被二氧化碳薰死的,怎么可能是被炸死的呢?!”
吉林石化的人所說:爆炸產(chǎn)生水和二氧化碳,不會污染水源!
posted @
2006-06-19 10:58 思考 閱讀(341) |
評論 (0) |
編輯 收藏
Do you ever feel like breaking down?
Do you ever feel out of place?
Like somehow you just don't belong
And no one understands you
Do you ever wanna run away?
Do you lock yourself in your room?
With the radio on turned up so loud
That no one hears you screaming
No you don't know what it's like
When nothing feels alright
You don't know what it's like to be like me
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life
Do you wanna be somebody else?
Are you sick of feeling so left out?
Are you desperate to find something more
Before your life is over?
Are you stuck inside a world you hate?
Are you sick of everyone around?
With the big fake smiles and stupid lies
While deep inside you're bleeding
No you don't know what it's like
When nothing feels alright
You don't know what it's like to be like me
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life
No one ever lies straight to your face
And no one ever stabbed you in the back
You might think I'm happy
But I'm not gonna be ok!
Everybody always gave you what you wanted
You never had to work it was always there
You don't know what it's like
What it's like!
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
No you don't know what it's like (what it's like)
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life
Welcome to my life
Welcome to my life
posted @
2006-06-14 19:39 思考 閱讀(234) |
評論 (0) |
編輯 收藏
昨天在雜志上看到Combimous公司基于人體工學(xué)設(shè)計了鼠標(biāo)和鍵盤一體的新產(chǎn)品,并在赤塔周立大學(xué)(Wichita State University)進(jìn)行了測試。澳大利亞PC世界雜志給出了如下評價:
?????????
?????????“上個世紀(jì),科學(xué)家們分割了原子。這個世紀(jì),Ari Zagnoev分割了鍵盤”

其中,左手除了標(biāo)準(zhǔn)的鍵盤設(shè)計外,在大拇指處添加了鼠標(biāo)的滾輪設(shè)計。而右手除了可以作為鍵盤使用之外,鍵盤會根據(jù)人手的位置的改變,自動在鼠標(biāo)和鍵盤兩種工作模式之間切換。并且,之間的時間延遲可以忽略不計。下圖是兩種工作模式下手的位置。
posted @
2006-06-13 17:34 思考 閱讀(173) |
評論 (0) |
編輯 收藏
昨天路考順利通過!!!
posted @
2006-06-12 13:01 思考 閱讀(195) |
評論 (0) |
編輯 收藏
經(jīng)過多次試驗,對元組進(jìn)行切片時,將嚴(yán)格按照從左到右的順序。如:
a=(0,1,2,3)
b=a[x:y]
print?b這里面我們假設(shè)x和y是變量。我們可以將a看作
?? 0?? 1?? 2?? 3
????????????
?? ^??? ^?? ^?? ^
±0?? 1?? 2?? 3
? -4? -3? -2? -1
也就是說,x=1和x=-3代表相同的位置。同理,y=3跟y=-1也代表相同的位置。這樣,切片a[x:y]中,x和y分別表示元組a中元素的位置。并且,此時x的位置一定在y的左面。如若不然,b將得到一個空的元組()。
>>>?a=(0,1,2,3)
>>>?print?a[0:0]
()
>>>?print?a[0:3]
(0,?1,?2)
>>>?print?a[0:5]
(0,?1,?2,?3)
>>>?print?a[-3:2]
(1,)
>>>?print?a[1:-1]
(1,?2)
>>>?print?a[1:2]
(1,)
>>>?print?a[1:3]
(1,?2)
>>>?print?a[2:1]
()
>>>?print?a[-4:-3]
(0,)
>>>?print?a[-3:-4]
()
>>>?
posted @
2006-06-07 18:38 思考 閱讀(1111) |
評論 (0) |
編輯 收藏
今天一早7點就爬起來,等到下午2點才開始考試?。?br />不過幸運的是考場的紅外線系統(tǒng)壞掉了:)
考試通過,慶祝一下!
posted @
2006-06-04 20:13 思考 閱讀(175) |
評論 (0) |
編輯 收藏
猶太人(希伯來語:?????)原來是居住在阿拉伯半島的一個游牧民族,最初被稱為希伯來人,意思是“游牧的人”。根據(jù)記載他們歷史的圣經(jīng)《舊約》傳說,他們的遠(yuǎn)祖亞伯拉罕(阿拉伯語發(fā)音為易卜拉辛)原來居住在蘇美爾人的烏爾帝國附近,后來遷移到迦南(今巴勒斯坦一帶)。他有兩子,嫡幼子以撒成為猶太人祖先,而其與侍女夏甲所生的庶長子以實瑪利(阿拉伯發(fā)音易斯瑪儀)的后代就是阿拉伯人?!豆盘m經(jīng)》中也承認(rèn)亞伯拉罕是阿拉伯人的祖先。
猶太人的祖先名字叫雅各(阿拉伯發(fā)音為葉爾孤白),雅格是以撒的兒子亞伯拉罕(阿拉伯發(fā)音為易卜拉欣)的孫子,希伯的后代,后來改名叫以色列,意思是“和天使搏斗的人”,并且在他和天使搏斗的時候傷了腿筋,所以他們宰殺動物時都要把腿筋挑出來丟棄。
雅各生有12個兒子,在一次災(zāi)荒中遷移到埃及,受到當(dāng)時統(tǒng)治埃及的喜克索斯人的優(yōu)待,居住在尼羅河下游,轉(zhuǎn)變?yōu)檗r(nóng)業(yè)民族。喜克索人被努比亞人暴動趕出埃及后,猶太人的地位急劇下降,淪為埃及人的奴隸,他們在摩西(阿拉伯發(fā)音為穆薩)的帶領(lǐng)下逃出埃及,逃回巴勒斯坦定居,以色列的12個兒子的后代形成十二支族,原來在巴勒斯坦分居,后來統(tǒng)一成一個國家,由猶大支族的大衛(wèi)擔(dān)任國王,以色列國家在大衛(wèi)的兒子所羅門(阿拉伯稱為蘇萊曼大帝)擔(dān)任國王期間達(dá)到鼎盛。
所羅門死后,所羅門的兒子羅波安繼承王位。由于他及一班年青的大臣所施行的苛刻政策,使北部10個支族的人拉出去,單獨成立以色列國,并推舉尼八的兒子耶羅波安為王;猶大支族和便雅憫支族聯(lián)合成立了猶大國。以色列國不久即被亞述人消滅,猶太國尚堅持了幾百年,后來也終于被巴比倫帝國攻占。人民被虜?shù)桨捅葌惓蔀榕`,波斯帝國消滅巴比倫后,猶太人被允許回國重建耶路撒冷圣殿,并成立傀儡的猶太國,并相繼淪為希臘和羅馬帝國的屬國。到了公元2世紀(jì)初,最終因起義反對羅馬人,耶路撒冷被羅馬大軍攻破,圣殿被拆毀,猶太人被迫流落到世界各地,開始自稱為猶太人。
中世紀(jì)及近代
猶太人到世界各地后,語言、風(fēng)俗逐漸和當(dāng)?shù)鼐用裢?,但他們堅持信仰本民族的宗教,以此維持民族的獨立性,仍然用自己的希伯來字母書寫文字,在意大利、西班牙的猶太人,語言被同化,用希伯來字母書寫的叫“拉丁諾文”;在德國、波蘭的猶太人語言為“意第緒語”;在中國的猶太人,由于他們的宗教信仰也不吃豬肉,被稱為“藍(lán)帽回回”,并逐漸和其他回族混淆。因為他們信仰不同,在基督教國家受到歧視,不得擁有土地,只好經(jīng)商,逐漸積累商業(yè)經(jīng)驗,基督教徒不允許放高利貸,而猶太人的信仰不禁止,可以從事信貸活動,逐漸成為歐洲的著名商人和銀行家,更為低層平民所憎惡,不時發(fā)生打擊猶太人事件。
現(xiàn)當(dāng)代
19世紀(jì)末期,由于東歐的迫害加劇,成千上萬的猶太人逃離此地,大多數(shù)投奔美國、加拿大和西歐。到1924年,共有大約兩百萬猶太人移民至美國,因當(dāng)時美國社會對待猶太族群的態(tài)度相比東歐而言更加寬容。歐洲對猶太人的迫害終于在希特勒德國時期達(dá)到頂峰,發(fā)生了滅絕約600萬猶太人的大屠殺,幾乎徹底摧毀猶太人在歐洲2000年的文化歷史沉淀。
1948年年以色列國建立,是自羅馬摧毀耶路撒冷后近2000年來第一個成立的猶太人國度,并人為復(fù)興口語希伯來語的正式使用。但以色列建國的地點是在巴勒斯坦地區(qū),導(dǎo)致和當(dāng)?shù)囟ň右丫玫陌⒗岚屠账固谷嗣芗せ怪袞|成為世界的熱點地區(qū),并致使原先居住在阿拉伯國家的近90萬猶太人也陷入困境。
到21世紀(jì)初,美國和以色列是猶太人的主要集中地。猶太人也在美國社會的政治、經(jīng)濟(jì)、文化領(lǐng)域積攢了很大的勢力。
知名猶太人列表
馬克思
愛因斯坦
馮·諾依曼
奧本海默
沙龍
哈同
弗洛伊德
庫爾特·圖霍夫斯基
斯賓諾莎
雅各·路德維希·費里克斯·門德爾松·巴爾托迪
摩西·門德爾松
基辛格
哈默
霍夫曼
猶大 (???????? 意思是"贊美",標(biāo)準(zhǔn)希伯來語 Y?huda,Tiberian 希伯來語 Y?h??āh) 是雅各和利亞的第四個兒子,生在巴旦亞蘭 (創(chuàng)世紀(jì))是猶太人十二列祖之一。(創(chuàng)世紀(jì),圣經(jīng)第一卷)
他父親雅各在臨終前曾這樣給他祝福:
猶大阿,你弟兄們必贊美你;你手必掐住仇敵的頸項;你父親的兒子們必向你下拜。 猶大是個小獅子;我兒阿,你抓了食便上山去。他蹲伏如公獅,又如母獅,誰敢惹他? 權(quán)杖必不離猶大,王杖必不離他兩腳之間,直到細(xì)羅來到,萬民都必歸順。猶大把小驢拴在葡萄樹上,把驢駒拴在美好的葡萄樹上。他在葡萄酒中洗了衣服,在葡萄汁中洗了袍褂。他的眼睛因酒紅潤;他的牙齒因奶白亮。 (創(chuàng)世紀(jì)49:8-12)
摩西是這樣祝福的:論猶大,他這樣祝福說,耶和華阿,求你聽猶大的聲音,引導(dǎo)他歸于本族;他曾用手為他們爭戰(zhàn),愿你幫助他攻擊敵人。 (申命記 33:7 )
在弟兄們中間,猶大富于憐憫。猶大曾經(jīng)阻止其他兄弟殺害弟弟約瑟,建議把他賣給以實馬利商人。下埃及 買糧食時,猶大向父親雅各擔(dān)保 弟弟便雅憫安全回來。因此他和約瑟,利未共同得到流便失去的長子名份.約瑟得到了雙份的土地,利未成為圣別的祭司,而猶大在弟兄中領(lǐng)頭( "猶大和他的兄弟們" ,創(chuàng)世紀(jì))。
按照創(chuàng)世紀(jì),猶大生了三個兒子:珥,俄南和 示拉。珥娶了他瑪,沒有孩子就死了。按照習(xí)俗他瑪嫁給了俄南,俄南不愿給哥哥留后,被神擊打而死。猶大不愿意示拉再娶他瑪,于是他瑪偽裝成妓女,從公公猶大懷孕生了法勒斯和謝拉。法勒斯是大衛(wèi)王的祖先 (路得記4:12, 18-22),也是耶穌肉身的祖先。(馬太福音1:2)
參考資料:維基百科簡體版
posted @
2006-05-28 17:06 思考 閱讀(2050) |
評論 (1) |
編輯 收藏
1.牛只有母牛會產(chǎn)奶,公牛不能產(chǎn)奶。
2.所有的母牛都能產(chǎn)奶,包括黃牛、水牛等,但有某些品種的(如黑白花的那種牛)產(chǎn)奶量比較大,所以一般黃牛、水牛被用作耕地拉車,黑白花牛用途是產(chǎn)奶。
3.黑白花的牛也有公、母之分,公牛一般用作“奶?!钡姆N牛,但由于這種牛是國外引進(jìn)的,價格比較高昂。初期都是引進(jìn)的母牛,再用其他品種(如黃牛)的公牛來配種。因為種不純,產(chǎn)奶量會下降,但當(dāng)時也是沒有辦法的辦法。
所以,也正由于國內(nèi)初期引進(jìn)的“黑白花?!倍嗍悄概#栽斐稍趪鴥?nèi)看不見“黑白花牛”的公牛。所以,“黑白花”奶牛公母的問題也就搞得很亂,呵呵。
posted @
2006-05-12 14:55 思考 閱讀(234) |
評論 (0) |
編輯 收藏
Today I got a song of Beatles, which?is?about?the word a man said to her girl maybe and the lyric of which is blow.
When?I?get?older?losing?my?hair
,
Many?years?from?now.
Will?you?still?be?sending?me?a?valentine
Birthday?greetings?bottle?of?wine.
If?I'd?been?out?till?quarter?to?three
Would?you?lock?the?door
,
Will?you?still?need?me
,
?will?you?still?feed?me
,
When?I'm?sixty-four.
You'll?be?older?too
,
And?it?you?say?the?word
,
I?could?stay?with?you.
I?could?be?handy
,
?mending?a?fuse
When?your?lights?have?gone.
You?can?knit?a?sweater?by?the?fireside
Sunday?mornings?go?for?a?ride
,
Doing?the?garden
,
?digging?the?weeds
,
Who?could?ask?for?more.
Will?you?still?need?me
,
?will?you?still?feed?me
,
When?I'm?sixty-four.
Every?summer?we?can?rent?a?cottage
,
In?the?Isle?of?Wight
,
?if?it's?not?too?dear
We?shall?scrimp?and?save
Grandchildren?on?your?knee
Vera?Chuck?&?Dave
Send?me?a?postcard
,
?drop?me?a?line
,
Stating?point?of?view
Indicate?precisely?what?you?mean?to?say
Yours?sincerely
,
?wasting?away
Give?me?your?answer
,
?fill?in?a?form
Mine?for?evermore
Will?you?still?need?me
,
?will?you?still?feed?me
,
When?I'm?sixty-four.
?
posted @
2006-04-24 22:51 思考 閱讀(241) |
評論 (0) |
編輯 收藏
星期天上午參加了樁考的考試,郁悶ing
posted @
2006-04-18 10:17 思考 閱讀(200) |
評論 (0) |
編輯 收藏
為了使FTP用戶成功上傳文件之后,可以執(zhí)行某個腳本程序,使其可以根據(jù)上傳的內(nèi)容(如多媒體)做相應(yīng)的操作。最初有這個想法的時候,我們系統(tǒng)上默認(rèn)安裝的是vsftpd。找遍了相關(guān)的資料,也沒有找到描述vsftpd可以實現(xiàn)相關(guān)功能。感謝irc.pchome.net上nok兄弟,告訴了我可以使用pure-ftpd來實現(xiàn)上面的功能。
經(jīng)過2天的學(xué)習(xí)和探索,終于測試成功!期間,發(fā)現(xiàn)了一些問題,也都一一解決了:)
posted @
2006-04-12 22:10 思考 閱讀(349) |
評論 (0) |
編輯 收藏
1
.簡介
自從
0.99.2
版本開始,
pure-ftpd
就開始支持虛擬用戶。虛擬用戶方式十分類似
/etc/passwd
,將用戶的相關(guān)信息,如口令、姓名、
uid
、目錄等,存入文件。但是該文件只適用于
FTP
。
這意味著,可以為
FTP
設(shè)置虛擬用戶,而不需要在系統(tǒng)中添加系統(tǒng)用戶。同時,可以為這些用戶單獨設(shè)置配額、
ratio
、帶寬等限制。很多虛擬用戶可以共享同一個系統(tǒng)用戶的屬性,因此建議為這些虛擬用戶單獨創(chuàng)建一個系統(tǒng)用戶,從而方便管理。
首先,可以在系統(tǒng)中添加相應(yīng)的用戶和組,如
ftpuser
和
ftpgroup
。如:
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
可以使用
”pure-pw”
來創(chuàng)建虛擬用戶。虛擬用戶的信息以每個用戶一行的方式存放在相應(yīng)的文件中,其格式如下所示:
<account>:<password>:<uid>:<gid>:<gecos>:<home directory>:<upload
bandwidth>:<download bandwidth>:<upload ratio>:<download ratio>:<max number
of connections>:<files quota>:<size quota>:<authorized local IPs>:<refused
local IPs>:<authorized client IPs>:<refused client IPs>:<time
restrictions>
其中,除了帳號、口令、
uid
、
gid
和
home
目錄之外,其它的可以是空值。
2
.創(chuàng)建一個用戶
接下來,我們來創(chuàng)建一個新的用戶。
pure-pw
的語法規(guī)范如下:
pure-pw useradd <login> [-f <passwd file>] -u <uid> [-g <gid>]
????? -D/-d <home directory> [-c <gecos>]
????? [-t <download bandwidth>] [-T <upload bandwidth>]
????? [-n <max number of files>] [-N <max Mbytes>]
????? [-q <upload ratio>] [-Q <download ratio>]
????? [-r <allow client host>[/<mask>][,<allow client host>[/<mask>]]...]
????? [-R <deny client host>[/<mask>][,<deny client host>[/<mask>]]...]
????
?[-i <allow local host>[/<mask>][,<allow client host>[/<mask>]]...]
????? [-I <deny local host>[/<mask>][,<deny local host>[/<mask>]]...]
????? [-y <max number of concurrent sessions>]
????? [-z <hhmm>-<hhmm>] [-m]
假設(shè)我們要創(chuàng)建
joe
這樣一個虛擬用戶,則可以使用如下命令:
pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
其中,
-u
將虛擬用戶
joe
同系統(tǒng)用戶
ftpuser
關(guān)聯(lián)在一起。
-d
參數(shù)使
joe
只能訪問其
home
目錄。而如果想讓他訪問整個文件系統(tǒng),可以用
-D
選項。
這時,如果
pure-ftpd
啟動時加入
-j(--createhome)
選項,則不需要創(chuàng)建
/home/ftpuser/joe
目錄。系統(tǒng)會在該用戶第一次登陸時自動創(chuàng)建。
-z
選項運用用戶在一天當(dāng)中指定的時間段連接服務(wù)器。如
-z 0900-1800
,則該用戶只能在上午
9
點到晚上
6
點之間連接服務(wù)器。
-r
選項或
-R
選項,可以限制用戶從指定
IP
和掩碼連入服務(wù)器
-y
,用戶同一時間的并發(fā)連接數(shù)。
’’
或者
0
意味著不限制
-f
,默認(rèn)虛擬用戶的信息會被存放在
/etc/pureftpd.passwd
文件中,通過該選項可以改變該文件的位置。
用戶的口令會根據(jù)系統(tǒng)對加密方式的支持情況,選擇一個最安全的方式進(jìn)行加密。
3
.更改一個用戶
同
pure-pw adduser
唯一不同的是,使用
pure-pw usermod
不是創(chuàng)建一個用戶,而是更改已經(jīng)存在用戶的某些屬性。
重置某些屬性的語法如下:
pure-pw usermod <user> -n ''
:禁用文件配額
pure-pw usermod <user> -N ''
:禁用文件大小配額
pure-pw usermod <user> -q '' -Q ''
:禁用
ratio
pure-pw usermod <user> -t ''
:禁用下載帶寬限制
pure-pw usermod <user> -T ''
:禁用上傳帶寬限制
pure-pw usermod <user> <-i,-I,-r or -R> ''
:禁用
IP
過濾
pure-pw usermod <user> -z ''
:禁用時間段約束
pure-pw usermod <user> -y ''
:禁用并發(fā)數(shù)限制
4
.刪除一個用戶
刪除一個用的命令語法是:
pure-pw userdel <login> [-f <passwd file>] [-m]
這時,用戶的信息會被從指定的
passwd
文件中刪除,但是用戶的
home
目錄會被保留,需要手工刪除。
5
.改變用戶口令
更改一個用戶口令的語法是:
pure-pw passwd <login> [-f <passwd file>] [-m]
6
.顯示用戶信息
/etc/pureftpd.passwd
文件中記錄的信息不方便用戶的閱讀,因此
pure-ftpd
提供了顯示用戶信息的命令。其語法是:
pure-pw show <login> [-f <passwd file>]
7
.提交更改
可以通過上面提到的命令,或者以手工方式對
/etc/pureftpd.passwd
文件進(jìn)行修改,從而創(chuàng)建、修改和刪除一個虛擬用戶信息。但是,只有提交這些更改時,
pure-ftpd
訪問才能生效。
提交更改,意味著系統(tǒng)會根據(jù)
/etc/pureftpd.passwd
(或者指定的其它文件)來創(chuàng)建一個
pure-ftpd
可讀的二進(jìn)制格式的文件
/etc/pureftpd.pdb
。通常,通過下面的命令:
可以通過
/etc/pureftpd.passwd
文件自動創(chuàng)建
/etc/pureftpd.pbd
文件。但是,如果需要指定特定的文件,可以通過下面的方式來實現(xiàn):
pure-pw mkdb /etc/accounts/myaccounts.pdb -f /etc/accounts/myaccounts.txt
這時,沒有必要去重啟
pure-ftpd
服務(wù),對虛擬用戶進(jìn)行的更改可以更新。同時,也可以通過
-m
選項,在對
/etc/pureftpd.passwd
文件進(jìn)行修改的時候自動進(jìn)行提交。
8
.打開對虛擬用戶的支持
使得
pure-ftpd
支持虛擬用戶,需要在編譯的時候加入選項
--with-puredb
。這時,可以通過在啟動服務(wù)是的
’-l’
參數(shù)來設(shè)置。如:
/usr/local/sbin/pure-ftpd -j -lpuredb:/etc/pureftpd.pdb &
可以在后臺,以自動創(chuàng)建虛擬用戶
home
目錄,用
puredb
的方式來支持虛擬用戶。
9
.轉(zhuǎn)換系統(tǒng)用戶
可以通過如下命令,將系統(tǒng)用戶轉(zhuǎn)換為虛擬用戶:
如果以
root
用戶運行該命令,系統(tǒng)用戶的口令一并被轉(zhuǎn)入虛擬用戶配置文件。如:
pure-pwconvert >> /etc/pureftpd.passwd
10
.環(huán)境變量
默認(rèn)的情況下,如果指定了環(huán)境變量
PURE_PASSWDFILE
,則虛擬用戶的
passwd
文件位置由該變量的值指定。否則,默認(rèn)是
/etc/pureftpd.passwd
。用樣,
PURE_DBFILE
環(huán)境變量用來指定
pdb
文件的位置。默認(rèn)是
/etc/pureftpd.pdb
。
posted @
2006-04-11 00:27 思考 閱讀(3774) |
評論 (0) |
編輯 收藏
轉(zhuǎn)載(http://www.linux-ntfs.org/content/view/127/63/)
This documentation should help you choosing the right RPM for your kernel and Linux distribution, and assist you in installing (and testing) it.
Which RPM
It is important to install exactly the same version of NTFS kernel module as the kernel you have installed. Below are some simple instructions to help you find the file you need.
A quick way to find the version is to use the . Save the file and run it. Then go to the install section.
????chmod?
700
?whichrpm
????./whichrpm
The script, above, just automates what we will do next. First we need to decide which release you have. Run this command:
????cat?/etc/redhat-release
and you will probably see one of the following responses:
????Fedora?Core?release?
3
?(Heidelberg)
????Fedora?Core?release?
4
?(Stentz)
????Fedora?Core?release?
5
?(Bordeaux)
????Red?Hat?Linux?release?
9
?(Shrike)
Next find out your kernel version:
You should see a response something like one of these:
????
2.4.18
-
3
???
????
2.4.18
-
17.7
.x
????
2.4.22
-
1.2115
.nptl
????
2.6.8
-
1.521
The version might also have one of the following suffixes:
????smp
????bigmem
????hugemem
????BOOT
Note: If the result ends with smp then you have a multi-processor computer (you probably already knew that).
Next find out what sort of processor you have. This command will ask which kernel rpm was installed for you.
Note: If your version number had a suffix, then use it here, e.g. replace kernel with kernel-smp, or kernel-bigmem.
????rpm?-q?--queryformat?
"
%{ARCH}\n
"
?kernel
Most people will have an i686 processor (a recent Pentium computer). Other options are athlon, i586 or i386.
Next download the RPM. Follow the links for
|
* Fedora 4 (Stentz) * Fedora 3 (Heidelberg) * Fedora 2 (Tettnang) * Fedora 1 (Yarrow) * RedHat Enterprise 4 (Nahant) * RedHat Enterprise 3 (Taroon) * RedHat 9 (Shrike) * RedHat 8.0 (Psyche) * RedHat 7.3 (Valhalla)
|
When you have downloaded the RPM, we will continue with the installation instructions.
Install
You must be root for the rest of the commands. The examples will continue as if you downloaded kernel-ntfs-2.4.18-14.i686.rpm.
Note: Newer NTFS RPMs have names like

????kernel-module-ntfs-2.6.8-1.541-2.1.17-0.fc.1.2.i586.rpm

Next install the rpm:
????rpm?-ihv?kernel-ntfs-2.4.18-14.i686.rpm

????Preparing...??????###############################?[100%]
???????1:kernel-ntfs??###############################?[100%]

There should be no errors, just some '#'-charakters.
Note: newer NTFS RPMs will also print a message telling you if install succeeded.
If something goes wrong see the Help Section.
This is the only command we actually needed, but we'll go on and test what we have done.
Next load the kernel module
There should be no output. If there are a lot of error messages see the Help Section.
The next command, dmesg prints the kernel logs. We search them for NTFS using grep.

????dmesg?|?grep?NTFS

????NTFS?driver?v1.1.22?[Flags:?R/O?MODULE]

We can now check that the kernel really understands NTFS. The output may vary slightly, but you are looking for the entry ntfs.

????cat?/proc/filesystems

????nodev???rootfs
????nodev???bdev
????nodev???proc
????nodev???sockfs
????nodev???tmpfs
????nodev???shm
????nodev???pipefs
????????????ext3
????????????ext2
????nodev???ramfs
????nodev???devpts
????????????ntfs

?
Mount
Mounting an NTFS Volume is covered in more detail in Section 4 of the Linux-NTFS FAQ (in the Wiki).
First you need to know which device your NTFS Volume is on and you need to create a directory as a mount point.
/sbin/fdisk -l
The output might look like:
Disk /dev/hda: 64 heads, 63 sectors, 4465 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 2125 4283968+ 07 NTFS/HPFS
/dev/hda2 2126 19851 35735616 0f Win95 Ext'd (LBA)
/dev/hda5 * 2126 4209 4201312+ 83 Linux
/dev/hda6 4210 4465 516064+ 82 Linux swap
mkdir /mnt/windows
mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222
ls -l /mnt/windows
...
-r-xr--r-- 1 root root 9719 Aug 24 1996 ansi.sys
-r-xr--r-- 1 root root 15252 Aug 24 1996 attrib.exe
-r-xr--r-- 1 root root 28096 Aug 24 1996 chkdsk.exe
-r-xr--r-- 1 root root 5175 Aug 24 1996 choice.com
...
Hopefully everything is working for you now.
Note: Now, please read the NTFS FAQ (Frequently Asked Questions, in the Wiki), especially if you want to know:
| * How to change the owner or permissions of the mounted partition (Section 4.9) * How to have Linux mount the partition automatically at boot time (Section 4.10) |
Uninstall
If you wish to remove the NTFS RPM, first list all the RPMs with ntfs in their name. You output might look something like this:
rpm -qa | grep -i ntfs
kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2
Then, cut and paste the name into the rpm erase command:
rpm -e kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2
posted @
2006-04-06 14:49 思考 閱讀(486) |
評論 (0) |
編輯 收藏
??????為了充分教研室服務(wù)器的資源,打算在服務(wù)器上安裝一個流媒體點播系統(tǒng)。為此,選擇使用Real公司的Helix產(chǎn)品。只要有合適的License,Helix可以支持絕大多數(shù)的流媒體格式,包括:
RealNetworks:??????????RealAudio (.rm, .ra), RealVideo (.rm, .rmvb), RealPix (.rp),RealText (.rt), Multi-Rate Container (.mrc)
Macromedia:?????????????Flash (.swf)
Microsoft:???????????????? Windows Media (.asf, .wma, .wmv)
Apple:??????????????????????QuickTime (.mov)
Standards-Based:??????MPEG-4, MP3
Image Formats:?????????GIF (.gif), JPEG (.jpg, jpeg), PNG (.png)
Other:??????????????????????AU (.au), AIFF (.aif, .ief), WAV (.wav)
??????教研室的服務(wù)器安裝的是Fedora Core 4 x86_64系統(tǒng),開始只找到了Helix Server 9.0.2.794。安裝之后,運行時提示錯誤:
* Heartbeat Failure 1 (Step 3)
-------------------------------------------------------------------------------
*** Helix Server Heartbeat Failure Report
When: 04-Apr-06 14:09:41
Environment: linux-2.2-libc6-i586-server, , 9.0.2.794
* Heartbeat Failure 2 (Step 3)
-------------------------------------------------------------------------------
*** Helix Server Heartbeat Failure Report
When: 04-Apr-06 14:10:04
Environment: linux-2.2-libc6-i586-server, , 9.0.2.794
* Heartbeat Failure 3 (Step 3)
Helix Server not responding normally...
Heartbeat check disabled
* Heartbeat Failure 4 (Step 3)
* Heartbeat Failure 5 (Step 3)
* Heartbeat Failure 6 (Step 3)
* Heartbeat Failure 7 (Step 3)
在網(wǎng)上找了很多相關(guān)的資料,都沒解決這個問題。后來考慮可能時系統(tǒng)版本的問題,于是下載了Helix Server 11.0.1.1884。在這個版本自帶的文檔中介紹了遇到上述問題時,可以在配置文件結(jié)尾加入如下3行代碼:
<List Name="IPBindings">。
??????<Var Address_01="any"/>
</List>
其中,any指得是服務(wù)器的IP地址。但是,按照這種方式修改,在我們的服務(wù)器上依然存在上面的問題,不知道其它版本的Linux系統(tǒng)是否可以解決。遇到相同問題的人可以嘗試一下這種辦法。
?????????在11這個版本中,啟動時已經(jīng)不會出現(xiàn)這個問題了。但是當(dāng)服務(wù)啟動了之后,我在本地計算機(jī)上無法訪問。但是在服務(wù)器上通過localhost可以正常使用。這個問題可能是防火墻的問題,于是加入了相應(yīng)的規(guī)則,但是依然無法訪問。后來,經(jīng)過翻閱資料,得知如果是服務(wù)器上有多個網(wǎng)卡,需要對其進(jìn)行綁定。否則,只能通過localhost來訪問。原來是這樣,在服務(wù)器上通過瀏覽器,在管理員界面加入了相應(yīng)的規(guī)則。重啟服務(wù),哈哈,終于可以訪問了!
?????????最后,可以在sample頁面對支持的流媒體格式進(jìn)行測試。在測試的時候,還有一些小的插曲。因為我們現(xiàn)在多數(shù)人用的是暴風(fēng)影音,像我就根本沒有安裝realplayer。所以,開始是出現(xiàn)rmvb格式的媒體無法觀看的問題。后來重新安裝了realoneplayer之后解決了上述問題。另外一個讓我弄了一個多小時的問題是,無法播放MP3格式的文件。最后,把用來播放MP3的插件——mp3fformat.so的文件從Plugins目錄移出,重啟系統(tǒng),再移入,重啟系統(tǒng)。后來就可以播放了。具體原因還不知道為什么:?不管怎么樣,最后是大功告成了,可以正常使用了。
?????????接下來的任務(wù)就是設(shè)置加載點,使用ftp目錄中的媒體來供教研室的同學(xué)訪問了。
PS:Helix似乎不支持中文,所以接下來可能要作一件事情,就是如何將中文文件名可以被使用。
posted @
2006-04-04 14:39 思考 閱讀(2409) |
評論 (3) |
編輯 收藏
dmesg???查看啟動信息
chkconfig???配置啟動信息
setup?????????圖形化的安裝配置信息
makewhatis????為man手冊頁建立索引
whatis????????????以完整字符匹配的方式查詢man手冊頁
apropos?????????查詢man手冊頁
updatedb??????建立和更新slocate的數(shù)據(jù)庫
slocate?????????以更安全的方式向用戶提供在整個文件系統(tǒng)中搜索有權(quán)限的文件
locate????????????slocate的符號連接,在GNU Linux下
whereis?????????定位源文件、二進(jìn)制文件和手冊頁
rpm -ivh??????安裝RPM包
rpm -e?????????刪除RPM包
rpm -qpl??????RPM包中的文件內(nèi)容
rpm -qa??????查詢系統(tǒng)中已經(jīng)安裝的RPM包信息
ntpdate -u????根據(jù)指定網(wǎng)絡(luò)時間服務(wù)器的時間更新系統(tǒng)時間
mount -t vfat -o CHARSET=cp936
?????????????????????可以顯示W(wǎng)indown FAT32系統(tǒng)中的中文
posted @
2006-03-31 11:19 思考 閱讀(325) |
評論 (0) |
編輯 收藏
摘要: F1
打開幫助。
...
閱讀全文
posted @
2006-03-28 23:12 思考 閱讀(264) |
評論 (0) |
編輯 收藏
前一段時間因為搞鑒定,所以就把手頭的工作停了下來,現(xiàn)在搞完了,可以繼續(xù)寫些東西了。
posted @
2006-03-28 14:29 思考 閱讀(176) |
評論 (0) |
編輯 收藏
昨天同組的在安裝GT4后,啟動容器時發(fā)生上面的錯誤。
因為我使用相同的方法在另外一臺服務(wù)器上已經(jīng)成功安裝,并且沒有問題。所以這個問題讓我們很多人都不知道如何是好。后來用-debug參數(shù)啟動進(jìn)行分析,只有可能是數(shù)據(jù)庫的問題。因為兩臺服務(wù)器上mysql的數(shù)據(jù)庫的版本不同。所以我們懷疑是mysql的connector的版本不同造成的。
今天早晨下了一個3.2.0版本的connector,將原先的3.1.10版本的connector替換掉問題就解決了。
但是,后來發(fā)現(xiàn)問題不是這個版本造成的。因為3.1.10版本的connector包含了兩個文件:
???????????????mysql-connector-java-3.1.10-bin-g.jar
???????????????mysql-connector-java-3.1.10-bin.jar
只要把mysql-connector-java-3.1.10-bin-g.jar的文件刪掉也可以成功啟動。
后來看了一些connector的說明文檔,發(fā)現(xiàn)帶-g的是用來做debug用的。
posted @
2005-10-29 16:35 思考 閱讀(6065) |
評論 (3) |
編輯 收藏
剛才在安裝mysql之后,用netstat -a |grep 3306來查看mysqld是否已經(jīng)運行的時候,發(fā)現(xiàn)無法查看。
后來高手指點說,應(yīng)該將命令改為netstat -an |grep 3306。果然,這樣一改,可以看到了。原來-n參數(shù)是指用數(shù)字來代替使用可能的host、port或user name。所以要使用這個參數(shù)。相反,如果命令改成這樣,也應(yīng)該可以正確執(zhí)行:
netstat -a |grep mysql
posted @
2005-10-27 18:21 思考 閱讀(219) |
評論 (0) |
編輯 收藏
困擾我多久的在SecurityCRT中登錄Linux是,有些英文顯示出現(xiàn)亂碼。
今天無意間發(fā)現(xiàn)了SecurityCRT幫助文件中Strip 8 bit的修改。才想到可能是這個問題。
隨后,選擇在Options->Session Options->Terminal->Advanced下面的Strip 8 bit選項。應(yīng)用后在此鍵入可能造成亂碼的命令,如man route。發(fā)現(xiàn)原先顯示亂碼的部分變成了英文了:)
分析原因,是因為在純英文終端上(最原始的終端類型),每個英文字母是用7位表示的。而后來為了增加對其它語言的支持,又加入了第8位。這就是當(dāng)初使用BBS是,telnet后面要加入-8的參數(shù)的原因。但是正是因為這樣,我們的Linux服務(wù)器沒有配置中文的支持,所以以7位方式來傳輸英文。而這時SecurityCRT安裝8位進(jìn)行解釋,可能就造成亂碼的錯誤。
posted @
2005-10-27 18:05 思考 閱讀(1539) |
評論 (1) |
編輯 收藏
which - shows the full path of (shell) commands.
whereis - locate the binary, source, and manual page files for a command.
slocate - Security Enhanced version of the GNU Locate.
Secure Locate provides a secure way to index and quickly search for files on your system. It uses
incremental encoding just like GNU locate to compress its database to make searching faster, but it will
also store file permissions and ownership so that users will not see files they do not have access to.
This manual page documents the GNU version of slocate. slocate Enables system users to search entire
filesystems without displaying unauthorized files.
tee - read from standard input and write to standard output and files
vipw, vigr - edit the password or group files
cat - concatenate files and print on the standard output
cat /etc/passwd
id - print real and effective UIDs and GIDs
who - show who is logged on
users - print the user names of users currently logged in to the current host
finger - user information lookup program
!! - execute the last command
posted @
2005-10-26 16:25 思考 閱讀(276) |
評論 (1) |
編輯 收藏
前天給學(xué)生上課,想給大家演示一個JDBC的小程序的調(diào)試過程。開始一切都十分順利,通過修改拼寫錯誤和語法錯誤,程序可以正常編譯了。下面的步驟就是運行程序顯示結(jié)果了。
可是當(dāng)我在命令行里面鍵入:
java CreateStudent
時,系統(tǒng)彈出如下錯誤提示:
Exception in thread "main" java.lang.NoClassDefFoundError: CreateStudent
當(dāng)時我找了很多地方都沒有發(fā)現(xiàn)問題。
后來等我回來,在網(wǎng)上找了一些資料才發(fā)現(xiàn),原來需要在CLASSPATH中加入“.”,程序才能正常運行。或者在運行時加入?yún)?shù)-cp或-classpath,如:
java -classpath . CreateStudent
這樣問題就解決了!
posted @
2005-10-21 09:21 思考 閱讀(59158) |
評論 (19) |
編輯 收藏