Translate翻譯

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/NorwegianÖversätta till Svensk/Swedishहिन्दी अनुवाद करने के लिए/Hindi
Tradueix al català/CatalanTulkot uz latviešu/LatvianPreložiť do slovenčiny/SlovakVertaal aan het Nederlands/Dutchترجمة الى العربية/ArabicTraduzca al Español/SpanishTraduisez au Français/French
Traduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplified中文翻译/Chinese TraditionalПереклад на українську/Ukrainian
Installing Oracle 11g Release 2 on Fedora 13安裝 Oracle 11g第2版在Fedora 13

Oracle神諭 Database 11g Release 2 is not certified to run on數據庫 11g第2版上運行未認證 Fedora Fedora的 13 (Goddard) but I wanted to use it to debug a problem with a particular application which used this database. 13(戈達德),但我想用它來調試的問題與特定的應用程序,使用該數據庫。 I checked on the Internet for details about how to install this version of the Oracle database on Fedora 13 but did not come across comprehensive instructions.我檢查了互聯網的細節有關如何安裝此版本的Oracle數據庫在Fedora 13,但沒有遇到全面的指示。 I therefore decided to write this post as a guide for others who may also wish to install this database on Fedora 13.因此,我決定寫這篇文章作為指導別人誰也不妨在Fedora安裝此數據庫 13。

First of all you need to add a number of kernel parameters to /etc/sysctl.conf if they do not already exist in this file or have values less then what is shown here.首先你需要添加一個數字的內核參數到/ etc / sysctl.conf中 ,如果他們不存在這個文件中的值小於或有什麼是在這裡顯示。 These are minimum required values by the way; they can be higher.這是最低要求值的方式,他們可以更高。

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586


Compared to相比 Sybase ASE Sybase合作 which only requires kernel.shmmax , an Oracle database requires significantly more kernel parameter tweeking.只需要kernel.shmmax,Oracle數據庫需要更多的內核參數tweeking。

The current value of a kernel parameter can be displayed using the following command:目前的價值內核參數可以顯示使用以下命令:

# /sbin/sysctl -a | grep


If you do not want to reboot your system, just execute the following command to update the kernel with the new parameters:如果你不想重新啟動系統,只需執行以下命令來更新與新的內核參數:

# /sbin/sysctl -p


You need to install a number of software packages on your system if the packages are not already installed.您需要安裝一個軟件包的數量,如果您的系統上尚未安裝的軟件包。 If you have installed the Development Tools package group, the majority of the necessary packages will already be installed.如果您已經安裝了開發工具包組,大部分必要的包都已經安裝。 Install the Development Tools package group and the following packages if not already installed:安裝開發工具包組和下列包如果尚未安裝:

  • binutils binutils的
  • libaio, libaio-devel libaio,libaio - devel的
  • ksh 先令
  • sysstat sysstat的
  • unixODBC, unixODBC-devel 的unixodbc,的unixodbc - devel的
  • compat-libstdc++-33 協調問題的libstdc + + -33

Next, you need to modify PAM (Plugable Authentication Module) to increase session limits for the oracle user which we will create later on.接下來,您需要修改聚丙烯酰胺(可插入式驗證模塊),以增加會議的oracle用戶的限制,我們將建立以後。 Add the following line to /etc/pam.d/login if it does not already exist:添加以下行到/ etc / pam.d /目錄登錄,如果它尚不存在:

    session    required     pam_limits.so


and add the following lines to /etc/security/limits.conf :並添加以下行到/ etc / security / limits.conf中:

    oracle     soft    nproc   2047
    oracle     hard    nproc   16384
    oracle     soft    nofile  1024
    oracle     hard    nofile  65536


Note that this file may not currently exist on your system.請注意,此文件可能不是目前存在於您的系統。 You may have to create it.您可能必須創建它。

Now create a number of new users and groups as follows:現在創建一個新的用戶數和團體如下:

groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle


and set a password for the new oracle user.並設置一個密碼為的Oracle用戶。

You must disable Secure Linux (SELINUX) while installing the database.您必須禁用安全Linux(SELinux的),而安裝的數據庫。 Edit /etc/selinux/config as follows:編輯/ etc / SELinux的/配置如下:

SELINUX=disabled


and execute setenforce off .並執行setenforce關閉

Edit the /etc/redhat-release file replacing the current release information – Fedora release 13 (Goodwin) – with the following:編輯/ etc / Redhat的發行文件替換當前版本的信息-發布的Fedora 13(古德溫) -與以下內容:

redhat release 5


You must create the directories in which the Oracle database software will be installed.您必須創建的目錄中的Oracle數據庫軟件將被安裝。 In our example, the directory is /app/oracle and the SID is dbhome_1 .在我們的例子中,該目錄是/程序/ Oracle和SID是dbhome_1。

mkdir -p /app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /app
chmod -R 775 /app


The remaining steps require that you are logged in as oracle .其餘的步驟要求您登錄 oracle。 As user oracle , download Oracle Database 11g R2 from作為用戶 oracle,下載Oracle數據庫11g R2的從 Oracle神諭 and place the two files you downloaded into the same subdirectory.和地方兩個文件下載到同一個子目錄。 I placed them in ~oracle/tmp but you are free to choose any subdirectory.我把他們在〜甲骨文/ tmp目錄 ,但你可以自由選擇任何子目錄。 Then unzip both files.然後解壓縮這兩個文件。

# unzip linux.x64_11gR2_database_1of2.zip
# unzip linux.x64_11gR2_database_2of2.zip
# ls -d */
database/
#


A single subdirectory called database is created.所謂單一數據庫創建子目錄。 This subdirectory contains the unzipped files.該子目錄包含解壓縮文件。

Assuming that the user oracle is using the bash shell, add the following lines to the oracle user's .bash_profile file, changing ORACLE_HOSTNAME , ORACLE_HOME , etc. as required to suit your particular requirements:假設用戶 oracle使用bash shell ,添加以下行到oracle用戶的。bash_profile文件,更改ORACLE_HOSTNAME,的ORACLE_HOME等,根據需要,以滿足您的特定要求:

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=ultra.xfpmurphy.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=dbhome_1; export ORACLE_UNQNAME
ORACLE_BASE=/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=dbhome_1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi


If you are using a different shell, you will need to set up these enviromental variables and limits using the appropriate shell syntax and shell initialization file.如果您使用的是不同的外殼,你將需要設置這些環境變量,並限制使用適當的語法和殼殼初始化文件。 You may also need to set the NLS_LANG environmental variable to match your country, language and desired character set, eg germany_germany.we8iso8859p1 .您可能還需要設置設置NLS_LANG環境變量,以配合您的國家,語言和期望的字符集,例如germany_germany.we8iso8859p1。

Oracle databases are installed using the Oracle Universal Installer (OUI) which is GUI-based and uses the X Window system.安裝 Oracle數據庫使用Oracle通用安裝程序(的OUI),這是基於 GUI和使用X Window系統。 There is no equivalent command line installer.沒有等效的命令行安裝程序。 You may need to set the your DISPLAY environmental variable and use the xhost utility to configure server access.您可能需要設置您的顯示環境變量和使用xhost的實用工具來配置服務器的訪問。 Start OUI by issuing the runInstaller command in the ~oracle/tmp/database directory.開始的OUI通過發出runInstaller命令在〜甲骨文/ tmp目錄/數據庫目錄。

If OUI cannot determine your IP address because it is not in /etc/hosts then you will get the following error:如果不能確定的OUI您的IP地址,因為它不是在/ etc / hosts中 ,那麼你會得到以下錯誤:

[INS-06101] IP address of localhost could not be determined


If you see an error message similar to one of the following: “Failed to connect to server”, “Connection refused by server” or “Can't open display”, then you have a problem with X Windows, either with permissions or the DISPLAY variable.如果你看到一個錯誤信息類似下列之一:“無法連接到服務器”,“連接被服務器拒絕”或“無法打開顯示”,那麼你有一個問題與 X視窗,或者具有權限或DISPLAY變量。 I am going to assume you know how to fix such problems.我將假設你知道如何解決這些問題。

After answering a few basic questions, you should see the following Typical Install Configuration screen:之後回答幾個基本問題,你應該看到以下典型安裝配置屏幕:

Oracle安裝程序截圖。第4階段 8

Check the settings carefully before proceeding further.檢查前仔細進行進一步的設置。

Next OUI checks that the installed software development and runtime packages are correct:下一步的OUI檢查已安裝的軟件開發和運行時包是正確的:

Oracle安裝程序截圖

Fedora 13 will fail all these checks. Fedora的13所有這些檢查將失敗。 Just tick the check box Ignore All on the top right hand to ignore these errors.剛剔複選框全部忽略的頂部右手忽略這些錯誤。 So long as you have the latest version of each of these packages installed, all will be fine.只要你有最新版本的每一個這些軟件包安裝的,都將被罰款。 Note that you do not need to install pdksh (Public Domain Korn Shell) if you have ksh installed.請注意,您不需要安裝pdksh這些 (公共域Korn外殼)如果您有先令安裝。

During the installation, OUI will popup a dialog window advising you that an error has occurred with ins_emagent.mk .在安裝過程中說不,將會彈出一個對話框窗口通知您發生了錯誤的ins_emagent.mk。 See below:見下文:

Oracle安裝程序截圖

This error is due to a change in the GCC linker in Fedora 13.此錯誤是由於連接器改變海灣合作委員會在Fedora 13。 The announcement is這一消息是 here這裡 . The fix is to edit $ORACLE_HOME/sysman/lib/ins_emagent.mk , search for the line $(MK_EMAGENT_NMECTL) and replace the line with $(MK_EMAGENT_NMECTL) -lnnz11 as shown above.解決辦法是編輯在$ ORACLE_HOME / sysman / lib中/ ins_emagent.mk,搜索行$(MK_EMAGENT_NMECTL),將線與$(MK_EMAGENT_NMECTL)- lnnz11如上所示。

After saving the changed file, select the Retry option, and the install should successfully continue.更改後保存文件,選擇重試選項,安裝成功應該繼續下去。 Eventually you should see the Database Configuration Assistant screen as shown below:最終,你應該看到數據庫配置助手屏幕如下所示:

Oracle安裝程序截圖

Do not ignore the Password Management button; press it and change the passwords for SYS and SYSTEM .不要忽視密碼管理按鈕,按下它並更改密碼 SYS SYSTEM。

You are now ready to do a basic smoketest of the installed database software.你現在準備做一個基本smoketest安裝的數據庫軟件。

$ id
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin)
$ cd $ORACLE_HOME
$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-AUG-2010 20:47:56

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /app/oracle/diag/tnslsnr/ultra/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ultra.xxxxxxxxxx.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                06-AUG-2010 20:47:58
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /app/oracle/diag/tnslsnr/ultra/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ultra.xxxxxxxxxx.com)(PORT=1521)))
The listener supports no services
The command completed successfully
$

$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://ultra.xxxxxxxxxxx.com:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...... started.
------------------------------------------------------------------
Logs are generated in directory /app/oracle/product/11.2.0/dbhome_1/ultra.xxxxxxxxxx.com_orcl/sysman/log
$

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 6 20:50:12 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  839282688 bytes
Fixed Size		    2217992 bytes
Variable Size		  524290040 bytes
Database Buffers	  306184192 bytes
Redo Buffers		    6590464 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$


If you have got this far with your installation of Oracle 11g, all is well.如果你擁有這麼遠你安裝的Oracle 11g中,一切都很好。 The core Oracle 11g database software is installed and working. Oracle 11g的核心數據庫軟件安裝和工作。 You may have some tweaking to do for your particular requirements but that is outside the scope of this post.您可能有一些調整要為您的特定要求,但就是這個範圍以外的職務。 Note the listener supports no services message; we will address this shortly.注意傾聽支持任何服務消息,我們會在短期內解決這個。

First, as root , we need to fix up a couple of files.首先,作為 ,我們需要修復了一對夫婦的文件。 Edit the /etc/oratab file setting the restart flag for each instance to Y :編輯/ etc / oratab文件設置每個實例的重啟標誌 Y:

DB11G:/u01/app/oracle/product/11.2.0/dbhome_1:Y


Edit the /etc/redhat-release file to restore the original release information:編輯/ etc / Redhat的發布文件,以恢復原來的版本信息:

Fedora release 13 (Goodwin)


At this stage you should be able to invoke the Oracle sqldeveloper GUI by invoking $ORACLE_HOMEsqldeveloper/sqldeveloper/bin/sqldeveloper .在這個階段,你應該能夠援引甲骨文sqldeveloper界面援引$ ORACLE_HOMEsqldeveloper / sqldeveloper /斌/ sqldeveloper。 Once you have configured a valid connection, you should see a screen similar to this:一旦你配置一個有效的連接,你應該看到一個類似的畫面:

甲骨文sqldeveloper截圖

If you configure listener.ora you can also access the Oracle Enterprise Console via the Web as shown here:如果您配置的listener.ora您還可以訪問Oracle企業通過網絡控制台,如下所示:

Oracle企業管理截圖

Here is what is in my listener.ora :下面是在我的listener.ora:

$ cat $ORACLE_HOME/admin/listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ultra.xfpmurphy.com)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (GLOBAL_DBNAME = DBHOME)
       (ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1)
       (SID_NAME = orcl)
     )
   )

ADR_BASE_FPM = /app/oracle
$


You will obviously have to use different values for HOST and possibly SID_NAME , ORACLE_HOME and GLOBAL_DBNAME .你會明顯地使用不同的價值觀為主機和可能SID_NAME,ORACLE_HOMEGLOBAL_DBNAME。

To automatically start and shop the Oracle database during system startup and shutdown you need to place an appropriate script in the /etc/rc.d/init.d directory and symbolically link it to the appropriate rc directories.要自動啟動的Oracle數據庫及商店在系統啟動和關閉您需要進行適量的腳本在/ etc / rc.d / init.d目錄,並象徵性地將其鏈接到相應的rc目錄。 Here is a script to start or stop the Oracle database using dbinit :下面是一個腳本來啟動或停止Oracle數據庫使用dbinit:

#!/bin/bash
#
# init file for starting and stopping Oracle 11g database using dbstart/dbstop
#
# chkconfig: 35 80 30
# description: Oracle database startup and shutdown script
#

. /etc/rc.d/init.d/functions

ORACLE_BASE=/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
ORACLE_SID=dbhome_1

case "$1" in
   start)
       echo -n $"Starting Oracle DB:"
       su - oracle -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
       echo "OK"
       ;;
   stop)
      echo -n $"Stopping Oracle DB:"
      su - oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
      echo "OK"
      ;;
   *)
     echo $"Usage: $0 {start|stop}"
esac


and here is an alternative script to start and stop the Oracle database using Oracle Enterprise Manager Database Control:這裡是另一種腳本來啟動和停止Oracle數據庫使用Oracle企業管理器數據庫控制:

#!/bin/bash
#
# init file for starting and stopping Oracle 11g database using emctl
#
# chkconfig: 35 80 30
# description: Oracle database startup and shutdown script using Enterprise manager console
#

. /etc/rc.d/init.d/functions

ORACLE_BASE=/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
ORACLE_SID=dbhome_1

case "$1" in
   start)
      echo -n $"Starting Oracle Enterprise Manager Database Console:"
      su - oracle -c "$ORACLE_HOME/bin/emctl start dbconsole"
      echo "OK"
      ;;
   stop)
      echo -n $"Stopping Oracle Enterprise Manager Database Console:"
      su - oracle -c "$ORACLE_HOME/bin/emctl stop dbconsole"
      echo "OK"
      ;;
   *)
      echo $"Usage: $0 {start|stop}"
esac


I assume that you know how to install a new init script so I am not going to describe the process here.我以為你是知道如何安裝一個的init腳本,所以我不打算在這裡描述的過程。

Please let me know if I left out anything important that you feel would of been of help to you in installing Oracle 11g on Fedora 13 and I will add it to this post.請讓我知道如果我離開了,你覺得什麼重要的是將幫助您在安裝 Oracle 11g的在Fedora 13,我將它添加到這個職位。

1 comment to Installing Oracle 11g Release 2 on Fedora 13 1安裝 Oracle 11g的評論在Fedora 13日第2版

  • Daniel 丹尼爾

    Hi Finnbarr您好芬尼巴爾

    Very helpful description.非常有幫助的說明。 Thanks a lot.非常感謝。 Sole problem I had, was the SID, which was not consistent in your description.唯一的問題,我已經是該 SID,這不是在你的描述一致。 Would be helpful to use orcl only.將有助於使用orcl只。

    And a another small problem I had was和另一個小問題,我已經是
    Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXRTPROC1521)))錯誤監聽:(介紹 =(地址=(協議 = IPC)的(鍵 = EXRTPROC1521)))
    TNS-12555: TNS:permission denied TNS的- 12555:TNS的:權限被拒絕
    TNS-12560: TNS:protocol adapter error TNS的- 12560:TNS:協議適配器錯誤
    TNS-00525: Insufficient privilege for operation TNS的- 00525:權限不足,無法操作
    Linux Error: 1: Operation not permitted Linux的錯誤:1:操作不允許

    Could solve this using this post: http://forums.oracle.com/forums/thread.jspa?threadID=931431, by replacing the KEY to EXRTPROC0能否解決這個使用這個職位:http://forums.oracle.com/forums/thread.jspa?threadID=931431,通過更換關鍵要EXRTPROC0

    Final wish: Maybe, you can also describe how to install a new init script.最後的希望:也許,你還可以描述了如何安裝一個新的init腳本。 Then, your tutorial is complete in all terms :-)那麼,你的教程是完成所有條款 :-)

Leave a Comment發表評論