<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-49  評論-67  文章-27  trackbacks-0
      2006年6月21日
     

      在腳注分割線下方出現一個多余空行,無法刪除。

      這時,可以將“視圖”轉成“普通視圖”,雙擊正文中腳注索引,在普通視圖下方會自動出現腳注窗口。或者在“引用”選項板“腳注”中選擇“顯示備注”,可以達到同樣的效果。

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

      此時刪除多余回車就可以了。點擊“默認設置”可以對腳注分隔符的默認格式進行修改。

    posted @ 2010-01-10 01:09 思考 閱讀(19896) | 評論 (10)編輯 收藏

    這個方法也是在網上看到的,自己總結了一下,方面以后查詢。

    netsh interface dump > cssl.txt

    這樣可以在本地目錄下生成一個cssl.txt文件。該文件記錄了當前網絡的配置情況。通過執行如下命令可以應用cssl.txt文件中的網絡配置。

    netsh exec cssl.txt

    這樣,可以寫一個批處理文件完成網絡配置的切換。

    posted @ 2008-07-04 13:51 思考 閱讀(608) | 評論 (0)編輯 收藏

    1、進入命令提示符環境
    2、進入DISKPART程序
    3、輸入AUTOMOUNT ENABLE指令
    4、ok,下次USB硬盤放入后就可以像XP一樣自動裝載了。

    posted @ 2008-06-27 16:07 思考 閱讀(476) | 評論 (0)編輯 收藏

    Windows 2003 server遠程桌面連接數限制已經困擾很久了,給平時的維護帶來麻煩。既然微軟不會從根本上解決這個問題,那只有通過其他方式來減少問題的發生幾率。

    一、在服務器端的處理辦法如下
    1. 設定已經斷開的會話結束時間限制,這樣避免會話已經斷開,但仍然占用一個Session

    開始-運行-gpedit.msc-計算機配置-管理模板-windows組件-終端服務-會話,右邊窗口選擇"為斷開的會話設置時間限制"-選擇"已啟用",選擇一個時間;

    開始-運行-gpedit.msc-計算機配置-管理模板-windows組件-終端服務-會話,右邊窗口選擇"到達時間限制時終止會話"-選擇"已啟用"。

    2. 無限時保持連接會話,便于遠程控制共享任意時候連接會話的數據,也就是共享任意時候連接的遠程桌面的當時狀態:

    開始-管理工具-終端服務配置-服務器配置-限制每個用戶使用一個會話

    3. 養成良好習慣,退出連接時不要直接關閉,而是使用注銷。

    二、如果已經有多個連接存在
    1 可以通過命令的方式將連接斷開,這個方法在2000系統同樣可用;如果在任務管理器的用戶里注銷的方法:

    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登陸的用戶,正在運行中,但是仍然占用系統資源和通道,我們要把它踢掉。

    1.2 可通過logoff x命令來注銷id為x的登錄用戶。輸入命令:logoff 1,再用query user查詢狀態

    C:\>logoff 1

    C:\>query user

    USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME

    >dfsadmin 0 Disc none 7/23/2007 7:53 PM

    三、如果連接已經受限制
    此時通過遠程登錄,可以用一個"3389DOS版"軟件來進行牽制登錄。這個軟件只能解決windows2003系統的限制,2000系統也沒辦法。

    四、超過最大連接時連接
    在超過最大連接數時,通過運行mstsc /v:IP /console命令就可以連接到遠程系統的會話。

    MSTSC [<Connection File>] [/v:<sever[:port]>] [/console] [/f[ullscreen]]

    [/w:<width>/h:<height>] | /Edit"ConnectionFile" | /Migrate | /?

    <Connection File>-- 指定連接的.rdp 文件的名稱。

    /v:<sever[:port]>-- 指定要連接到的終端服務器。

    /console -- 連接到服務器的控制臺會話。

    /f -- 以全屏模式啟動客戶端。

    /w: <width>-- 指定遠程桌面屏幕的寬度。

    /h:<height>-- 指定遠程桌面屏幕的亮度。

    /edit -- 打開指定的.rdp 文件來編輯。

    /migrate -- 將客戶端連接管理器創建的舊版連接文件遷移到新的.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 數據包訪問目標所采取的路徑。Tracert 命令用 IP 生存時間 (TTL) 字段和 ICMP錯誤消息來確定從一個主機到網路上其它主機的路由。

    Tracert 工作原理

    透過向目標發送不同 IP 生存時間 (TTL) 值的"Internet 控制消息協議 (ICMP)"回
    應數據包,Tracert 診斷程序確定到目標所采取的路由。要求路徑上的每個路由器在轉
    發數據包之前至少將數據包上的 TTL 遞減 1。數據包上的 TTL 減為 0 時,路由器應
    該將"ICMP已超時"的消息發回源系統。

    Tracert 先發送 TTL 為 1 的響應數據包,并在隨后的每次發送過程將 TTL 遞增1,直
    到目標響應或 TTL 達到最大值,從而確定路由。透過檢查中間路由器發回的"ICMP已
    超時"的消息確定路由。某些路由器不經詢問直接丟棄 TTL 過期的數據包,這在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

    所有用戶的信息都存放在該文件中。該文件中每行都代表以該用戶,每行的格式如下圖所示。因為該文件是所有用戶都可以讀的,為了系統安全,將用戶的口令信息放置在另一文件中。

    /etc/shadow

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

    如果用戶口令字段是空、*或者!,說明用戶不能登錄系統。需要通過passwd給用戶提供密碼,這時用戶才能登錄系統。

    ssh登錄

    默認情況下,只有root用戶可以通過ssh遠程登錄系統。為了使其它用戶登錄,需要修改/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........

    緊接著是選擇安裝語言,默認是英文。

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

    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]

    下面英文界面的安裝向導將出現,回車繼續安裝。

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

    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]

    接下來是安裝向導提示的Sentinel 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,回車,同意該許可信息。再按回車繼續。

    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]

    緊接著安裝向導提示選擇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的安裝方式。因為這里我們只是用作測試,并安裝在虛擬機上,因此選擇簡單方式。這時,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。輸入后,系統會提示這是一個臨時許可證,將在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]

    緊接著系統會詢問SMTP服務器和發送郵件的郵件地址信息,默認是本地的SMTP服務器和esecadm。

    SMTP Server: [localhost]

    E-mail: [esecadm]

    下面將詢問是否安裝Advisor,這里我們不進行安裝。

    Do you wish to install 'Advisor'?

    1. Yes

    2. No

    Enter one of the options above: [2]

    之后,系統會提示輸入全局系統口令。其中包括Sentinel管理員用戶和數據庫用戶的口令。并制定數據庫用戶的用戶名,默認是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]

    選擇已經安裝的Oracle版本,選擇2并繼續。

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

    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的安裝信息,回車繼續。

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

    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]

    系統收集完上述信息之后將進行安裝,下面是安裝時的顯示信息。安裝時間比較長,跟機器的性能有關。在我的電腦上安裝大概進行了40分鐘,包括數據庫、分區和Sentinel產品各組件的安裝。

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

    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]

    最后,系統提示需要重新啟動系統才能完成安裝。

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

    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數據庫安裝好了之后,會在系統中創建如下用戶:

    esecdba:數據庫Schema所有者,出于安全考慮,該用戶并未授予數據庫DBA的特權

    esecapp:數據庫應用程序用戶,該用戶用來連接數據庫

    esecadm:Sentinel管理員的數據庫用戶,該用戶不同于Sentinel管理員的操作系統用戶

    esecrpt:數據庫報告用戶

    posted @ 2008-06-21 20:24 思考 閱讀(519) | 評論 (0)編輯 收藏

    安裝SLES 10 x86_64

    分區時使用Ext3文件系統;

    選擇軟件包時,選擇"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預安裝的任務。為了下面安裝Oracle,需要進行如下配置。

    激活oracle用戶

    在安裝了Oracle Server Base之后,系統就自動創建了oracle用戶。但是,默認的該用戶是被禁用了的。

    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環境變量

    編輯/etc/profile.d/oracle.sh文件中Oracle的環境變量如下:

    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環境變量。

    設置內核參數

    運行rcoracle start命令設置內核參數。因為還沒有安裝Oracle數據庫,忽略期間報的錯誤。

    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用戶登錄系統,必須使用圖形界面進行安裝。為了在SuSE 10上安裝Oracle 10g,必須手工修改安裝配置文件,以確保Oracle支持SuSE 10系統。在Oracle安裝文件路徑下編輯文件:

    vim install/oraparam.ini

    [Certified Versions]

    Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2

    選擇高級安裝

    選擇默認的Inventory目錄

    選擇安裝企業版

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

    選擇"Install database Software only"

    查看安裝概要并選擇安裝

    下面是安裝進程。

    在安裝結束之前,系統會提示使用root用戶登錄,執行下面腳本。

    使用另一個窗口登錄,執行腳本。

    選擇"Exit"完成安裝。

    安裝補丁

    在Novell官方的文檔中,Sentinel需要Oracle安裝補丁10.2.0.3。從metalink網站上下載Oracle的補丁p5337014_10203_Linux-x86-64.zip。該補丁有1G多,而且下載時需要metalink的帳號才能下載。

    下載后解壓,并確保使用oracle用戶運行Disk1中的runInstaller進行安裝。跟安裝Oracle 10g時一樣,安裝程序首先要檢查系統兼容性,為了在SLES 10上安裝,需要修改配置文件,使之支持在SuSE 10上的安裝。修改方法與Oracle 10g安裝時的一樣。

    下圖是安裝時的歡迎界面。

    首先現在Oracle 10g的安裝目錄。

    接下來,是安裝的信息。確認后執行安裝。

    下圖是安裝進度。

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

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

    執行完腳本后,點擊"OK",系統提示完成補丁安裝,點擊"Exit"退出系統安裝。

    應用關鍵補丁

    下面,需要通過opatch工具安裝Oracle的關鍵補丁。同樣,首先從metalink網站上下載補丁:p5881721_10203_Linux-x86-64.zip并解壓。請確保使用oralce用戶進行下面的操作。

    進入5881721目錄,運行$ORACLE_HOME/OPatch/opatch apply -local。下圖是安裝過程。

    輸入y之后繼續安裝。

    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命令進行補丁狀態檢查。

    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.

    如果成功,將出現"OPatch succeeded."字樣。

    至此,針對Sentinel 6的Oracle安裝已經完成。接下來就是進行Sentinel產品的安裝。

    安裝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預安裝的任務。為了下面安裝Oracle,需要進行如下配置。

    激活oracle用戶

    在安裝了Oracle Server Base之后,系統就自動創建了oracle用戶。但是,默認的該用戶是被禁用了的。

    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環境變量

    編輯/etc/profile.d/oracle.sh文件中Oracle的環境變量如下:

    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環境變量。

    設置內核參數

    運行rcoracle start命令設置內核參數。因為還沒有安裝Oracle數據庫,忽略期間報的錯誤。

    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用戶登錄系統,必須使用圖形界面進行安裝。為了在SuSE 10上安裝Oracle 10g,必須手工修改安裝配置文件,以確保Oracle支持SuSE 10系統。在Oracle安裝文件路徑下編輯文件:

    vim install/oraparam.ini

    [Certified Versions]

    Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2

    選擇高級安裝

    選擇默認的Inventory目錄

    選擇安裝企業版

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

    選擇"Install database Software only"

    查看安裝概要并選擇安裝

    下面是安裝進程。

    在安裝結束之前,系統會提示使用root用戶登錄,執行下面腳本。

    使用另一個窗口登錄,執行腳本。

    選擇"Exit"完成安裝。

    安裝補丁

    在Novell官方的文檔中,Sentinel需要Oracle安裝補丁10.2.0.3。從metalink網站上下載Oracle的補丁p5337014_10203_Linux-x86-64.zip。該補丁有1G多,而且下載時需要metalink的帳號才能下載。

    下載后解壓,并確保使用oracle用戶運行Disk1中的runInstaller進行安裝。跟安裝Oracle 10g時一樣,安裝程序首先要檢查系統兼容性,為了在SLES 10上安裝,需要修改配置文件,使之支持在SuSE 10上的安裝。修改方法與Oracle 10g安裝時的一樣。

    下圖是安裝時的歡迎界面。

    首先現在Oracle 10g的安裝目錄。

    接下來,是安裝的信息。確認后執行安裝。

    下圖是安裝進度。

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

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

    執行完腳本后,點擊"OK",系統提示完成補丁安裝,點擊"Exit"退出系統安裝。

    應用關鍵補丁

    下面,需要通過opatch工具安裝Oracle的關鍵補丁。同樣,首先從metalink網站上下載補丁:p5881721_10203_Linux-x86-64.zip并解壓。請確保使用oralce用戶進行下面的操作。

    進入5881721目錄,運行$ORACLE_HOME/OPatch/opatch apply -local。下圖是安裝過程。

    輸入y之后繼續安裝。

    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命令進行補丁狀態檢查。

    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.

    如果成功,將出現"OPatch succeeded."字樣。

    至此,針對Sentinel 6的Oracle安裝已經完成。接下來就是進行Sentinel產品的安裝。

    posted @ 2008-06-21 20:14 思考 閱讀(2262) | 評論 (0)編輯 收藏

    在suse中設置用字符界面啟動,第一個終端下面有特效。今天無意中看到在哪里可以改。記下來。
    /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)編輯 收藏
         摘要: 網上有很多源代碼可以實現Base64編碼的轉換,但是主要是對中文轉換的時候有問題。 后來在網上找了很多資料,發現原來在Java默認的實現機制中,內部使用UTF-16編碼,而所有算法是針對英文UTF-8的。因此,在對中文字符串轉換的過程中會出現截取錯誤。后來在源代碼的基礎上進行了小的調整,最好可以實現Base64編碼。 下面貼出一個實現代碼:   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腳本,最后發現是需要更改$ORACLE_HOME/bin/dbstart文件。在該文件中,定義變量PFILE:
    PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
    其中,在Oracle9i中已經通過spfile${ORACLE_SID}.ora。因此,將PFILE變量修改為:
    PFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
    同時,為了可以在關機的時候關閉數據庫,同時在$ORACLE_HOME/bin/dbshut文件中對應的位置也需要修改PFILE文件的定義。

    另外,還有一種方法,就是生成pfile。用sqlplus連接數據庫,
    conn / as sysdba
    create pfile from spfile;
    這樣,就會參考${ORACLE_HOME}/dbs/spfileora9i.ora生成initora9i.ora這個pfile。這樣就不用改啟動腳本文件了。

    以上兩種方法已經證明都可以正常工作。
    posted @ 2007-07-15 18:26 思考 閱讀(902) | 評論 (0)編輯 收藏
    在SuSE下,由于SuSE特有的腳本管理方法,Should-Stop和Default-Stop選項被忽略了。同時,在腳本開始處執行/etc/rc.status腳本,可以通過調用rc_status -v檢查啟動命令的執行結果并彩色顯示出來。

    #!/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開發項目的時候遇到了一個問題,當上傳文件時,中文文件名會出現亂碼問題。
    于是,在Google和Baidu上面進行了搜索。結果發現有無數人遇到了相同的問題,大家也都在迫切的詢問此類問題。但是回帖的結果卻讓人特別生氣!

    回帖的內容大致可分為兩類:
    第一類,都是把別人的帖子轉來轉去,也不著名出處。更是有幾個人都在自己的博客上寫的內容完全一樣,還說是自己寫的!
    另一類相對要好一些,對問題進行了解答。但是,按照他們所說的進行了更改,根本就不能解決問題。真是不知道他們是這么解決這個問題的。

    后來在玉米田http://www.yumt.com/showlog.jspe?log_id=56#71的博客上有一篇文章說道了此事,才能徹底解決這個問題。看了之后才知道,原來Struts的upload功能是對jakarta apache的commons-fileUpload進行了封裝實現的。但是在實現時,沒有考慮到文件編碼的問題。所以,需要對struts.jar中的文件進行修改并重新編譯打包。事實證明,這樣作問題解決了。

    但是回過頭來,那些通過在JSP頁面中設置編碼方式為UTF-8或者在得到文件名進行編碼轉譯的人是如何解決這個問題的,難道我的系統跟他們的不一樣嗎?

    由此,可以看出很多網友不能夠踏踏實實的做人,人云亦云。抱著一種極其不負責任的態度,這樣作不但是自己不能真正理解問題的本質,得不到提高和進步,更加影響了對此類問題不甚了解并渴望解答的人所誤解。

    同時,一旦這種風氣發展下去,下次提問者作為解答者的時候這種現象又會出現。如果此類現象愈演愈烈,勢必會對我們中國整個軟件業甚至這個中華民族帶來及其深刻的影響!

    希望跟我有同感的IT同仁可以從自己做起,認真回答網友的提問。我們從自己做起,從現在做起!

    posted @ 2006-12-20 20:33 思考 閱讀(270) | 評論 (0)編輯 收藏
    今天看了Sun的Java編程習慣,記錄一下:
    http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
    posted @ 2006-11-12 17:08 思考 閱讀(324) | 評論 (1)編輯 收藏

    好久沒來了,感覺沒有對社區做出點貢獻,有愧版主的頭銜,今日在這里為大家提供兩則小技巧,以便幫你強行殺死“頑固不化”的病毒進程。?


      根據進程名查殺?


      這種方法是通過WinXP系統下的taskkill命令來實現的,在使用該方法之前,首先需要打開系統的進程列表界面,找到病毒進程所對應的具體進程名。?

    接著依次單擊“開始→運行”命令,在彈出的系統運行框中,運行“cmd”命令;再在DOS命令行中輸入“taskkill?/im?aaa”格式的字符串命令,單擊回車鍵后,頑固的病毒進程“aaa”就被強行殺死了。比方說,要強行殺死“conime.exe”病毒進程,只要在命令提示符下執行“taskkill?/im?conime.exe”命令,要不了多久,系統就會自動返回結果。?


      根據進程號查殺?


      上面的方法,只對部分病毒進程有效,遇到一些更“頑固”的病毒進程,可能就無濟于事了。此時你可以通過Win2000以上系統的內置命令——ntsd,來強行殺死一切病毒進程,因為該命令除System進程、SMSS.EXE進程、CSRSS.EXE進程不能“對付”外,基本可以對付其它一切進程。但是在使用該命令殺死病毒進程之前,需要先查找到對應病毒進程的具體進程號。?


      考慮到系統進程列表界面在默認狀態下,是不顯示具體進程號的,因此你可以首先打開系統任務管理器窗口,再單擊“查看”菜單項下面的“選擇列”命令,在彈出的設置框中,將“PID(進程標志符)”選項選中,單擊“確定”按鈕。返回到系統進程列表頁面中后,你就能查看到對應病毒進程的具體PID了。?


      接著打開系統運行對話框,在其中運行“cmd”命令,在命令提示符狀態下輸入“ntsd?-c?q?-p?PID”命令,就可以強行將指定PID的病毒進程殺死了。例如,發現某個病毒進程的PID為“444”,那么可以執行“ntsd?-c?q?-p?444”命令,來殺死這個病毒進程。

    posted @ 2006-08-21 14:50 思考 閱讀(926) | 評論 (0)編輯 收藏
    1.在拖地的水中加入幾滴薰衣草精油
    2.家中幾個角落放些"滅蟻靈",一元一包,一天至兩天,讓它一窩端
    3.家人無意收聽到了一則紅螞蟻遇到橡皮筋就走開的廣播,便打算試一試。
    4.用雞蛋殼數個,放在爐子上烤黃(不能烤焦),然后輾成粉末狀,撒在螞蟻窩周圍及其經常出入的地方,因為此粉末有香味,螞蟻特別愛吃,吃多了就會被撐死。
    posted @ 2006-08-13 13:00 思考 閱讀(404) | 評論 (0)編輯 收藏
    今天看了一則報道“廣州現新型犯罪方式 將路邊行人拉上車搶劫強奸”,其中說道廣州警察為了打擊犯罪,依法開了12槍,3個被擊斃,9個被打傷。這個命中率也太高了吧,100%。
    posted @ 2006-07-21 22:03 思考 閱讀(338) | 評論 (1)編輯 收藏
    首先聲名,本人不是球迷,看球完全是一種消遣。
    在看完昨天世界杯后,中央5臺的主持人張斌在節目中,首先講述了很多足球解說人的路子都是從球迷、記者到主持人這樣一步一步走過來的。然后,就請現場的一位觀眾對剛剛進行完的比賽中德國隊的第一個進球做現場解說。結果,那位是中國寬帶網的觀眾的表現可想而知,不能令人滿意。接下來,張斌就得出這樣一個結論:你看,做一名足球解說不是那么容易的事吧……如果你說了3000場比賽,你也可以說的很好。大概是這樣的吧,具體我也沒有記住。然后他大腹便便、心滿意足的回到了主持人的坐席上,繼續支持他的節目。
    說實話,當時我真想沖到北京打他一頓,說的什么狗屁話。他的言外之意就是他們的工作有難度,不想我們想象中那么簡單,所以口誤是正常的。首先,那個觀眾是第一次說球,能說成這樣已經不錯了。但是不能因為他說的不好,就能夠證明你們的工作有多么多么的難。其次,即使我們承認解說員工作存在難度,也不能為你們的口誤找借口啊。不然,中央臺為什么付薪水給你,而不去找其它人。話說回來,我也聽過ESPN的主持人的解說,雖然不是常聽,但是至少在我收看時沒有發現口誤的問題。最后,不能因為工作存在困難,就堂而皇之的為自己的失職尋找客觀原因。不要說是人,就連機器都有出錯的時候,這點我們是可以理解的。但是,如果希望觀眾,至少是那些吹毛求疵的觀眾,可以理解你們,最起碼的為自己失職的道歉還是應該有的吧!
    posted @ 2006-06-21 12:05 思考 閱讀(225) | 評論 (0)編輯 收藏
    主站蜘蛛池模板: 6080午夜一级毛片免费看6080夜福利| 成人免费视频小说| 亚洲国产精品日韩在线观看| 免费看国产成年无码AV片| 另类小说亚洲色图| 亚洲最大激情中文字幕| a级毛片免费在线观看| 亚洲一级毛片免费在线观看| 亚洲国产日韩成人综合天堂| 6080午夜一级毛片免费看 | 成人性做爰aaa片免费看| 亚洲AV一二三区成人影片| 亚洲国产中文v高清在线观看| 99爱在线观看免费完整版| 亚洲精华国产精华精华液| 亚洲AV无码一区二区乱子伦 | 国产在线观看免费不卡| 国产在线观看免费av站| 一区二区亚洲精品精华液| 亚洲热线99精品视频| 日韩在线a视频免费播放| 成人影片一区免费观看| 日韩色日韩视频亚洲网站| 久久丫精品国产亚洲av| 久久亚洲av无码精品浪潮| 18禁超污无遮挡无码免费网站国产| a级毛片在线免费| 国产亚洲综合精品一区二区三区| 亚洲熟妇色自偷自拍另类| 在线亚洲精品福利网址导航| 午夜毛片不卡免费观看视频| 99国产精品免费观看视频| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 亚洲精品在线视频观看| 伊人久久综在合线亚洲91 | 亚洲另类古典武侠| 国产亚洲精品岁国产微拍精品| 国产三级免费电影| 国产精品视频免费一区二区| 91av免费观看| 午夜免费福利视频|