Oracle Database: Difference between revisions

From ArchWiki
(I updated the english version from Netherlands version and improved the content. The reason: the english version was out of date and some information was incomplete.)
(Thanks, but edits must respect ArchWiki:Contributing#Do_not_make_complex_edits_at_once. Please update the article in small, deducible steps)
Line 1: Line 1:
[[Category:Database management systems]]
[[Category:Database management systems]]
[[en:Oracle]]
[[nl:Oracle]]
[[zh-CN:Oracle]]
[[zh-CN:Oracle]]
This article is related to the installation of Oracle 12c (12.1) - 64-bit.
{{out of date|Installation: Packages and AUR reference too old, Dutch version is up-to-date. Berlios is no more.}}
{{Note|The Arch Linux distribution is not supported by Oracle !}}
{{Related articles start}}
{{Related|Oracle client}}
{{Related articles end}}
This document will help you install Oracle Database 11gR1 on Arch Linux. If you only want to connect to Oracle databases running elsewhere, see the instructions for installing the [[Oracle client]]. For installation of Oracle Express Edition, see {{AUR|oracle-xe}} and get back to method 2 for after-install configurations.


It is assumed that [[Xorg]] is configured and
By using the install method 2 you will be able to finalize the long installation process with only a few steps.
a [[Window manager]] or a [[Desktop environment]] is installed.


==Preparation==
== Install method 1 - manual ==


===Dependencies===
This section will guide you through installing Oracle onto a fresh installation of archlinux.  This is a general approach that has been tested with kernel 2.6.28.ARCH x86_64 and Oracle 11g R1 64-bit.  '''''This should in principle work with other versions of Oracle'''''.
Before installing the Oracle Database on the Arch Linux System, it must be checked for the availability of the following packages on the system. These packages must be installed first:


* base-devel (the entire group)
=== Pre installation ===
* jre8-openjdk, mksh, gdb, gawk, libelf, sysstat, libstdc++5, unzip, sudo, icu, lib32-libstdc++5, python2
* gcc-multilib, gcc-libs-multilib, libtool


Next, it's necessary to create the following symbolic links because Oracle installer expects some software packages available on specific paths, which are different compared to the Arch standard paths:
=== AUR helper ===


ln -s /usr/lib /usr/lib64
To ease the installation process you may find useful to install an AUR helper:
  ln -s /usr/bin/basename /bin/basename
  # pacman -U ftp://ftp.berlios.de/pub/aurbuild/aurbuild-1.8.4-1-any.pkg.tar.gz
rm /usr/bin/python
ln -s /usr/bin/python2 /usr/bin/python
ln -s /usr/lib64/libgcc_s.so.1 /lib64/


===Oracle user===
==== Required packages for Oracle database installation ====


Then, create an Oracle user (e.g. the user named <tt>oracle</tt>) that is a member of the group <tt>oinstall</tt> and <tt>dba</tt>:
[[Install]] packages {{Pkg|unzip}} {{Pkg|sudo}} {{Grp|base-devel}} {{Pkg|icu}} {{Pkg|gawk}} {{Pkg|gdb}} {{Pkg|elfutils}} {{Pkg|sysstat}} {{Pkg|libstdc++5}}.


  groupadd oinstall
Install a [[Java]] runtime environment, like {{Pkg|jre7-openjdk}} and {{Pkg|jdk7-openjdk}}.
  groupadd dba
  useradd -m -g oinstall -G dba oracle


and configure the password for this user:
From the [[AUR]], install {{AUR|ksh}} (other implementations like [[ksh|these]] may work), {{AUR|beecrypt}}, {{AUR|rpm}}{{Broken package link|{{aur-mirror|rpm}}}} and {{Pkg|libaio}}.


passwd oracle
Oracle database 32-bit requires {{Pkg|unixodbc}}.


Edit the .bashrc file for this user with a text editor (e.g. {{ic|vi}}):
Optional lib32 packages on x86_64 are: {{Pkg|lib32-libstdc++5}} {{Pkg|lib32-glibc}} {{Pkg|lib32-gcc-libs}}.


sudo oracle
Oracle database require 32-bit libaio and unixodbc on x86_64 but is not necessary under Arch linux.
vi ~/.bashrc


and add the following content, to set the Oracle environment variables, Oracle path and the default text editor:
{{Note|The following step is not required in newer Arch Linux installation after the binary directories merge}}
Some prerequisite symbolic links for Oracle Universal Installer.
# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/ksh /bin/ksh
# ln -s /bin/awk /usr/bin/awk
# ln -s /bin/tr /usr/bin/tr
# ln -s /usr/bin/basename /bin/basename
Arch x86_64:
# ln -s /usr/lib /usr/lib64


export ORACLE_BASE=/oracle
==== Configuration ====
export ORACLE_HOME=/oracle/product/db
export ORACLE_INVENTORY=/oracle/inventory
export ORACLE_SID='''''<SID of your DB>'''''
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export EDITOR=vi
export VISUAL=vi


If you prefer another text-editor instead of vi to edit your text files, you can modify the value of EDITOR and VISUAL environment variables above. Use the editor of your choice, setting for example these variables to <tt>nano</tt> or <tt>gedit</tt> or <tt>kate</tt> or <tt>atom</tt> or other. Make sure to give the correct value to ORACLE_SID variable. It is the SID you choose in {{ic|dbca}} tool. If you don't know the SID right now, you must set the variable after running dbca.
Create users and group for Oracle database:
# groupadd oinstall
# groupadd dba
# useradd -m -g oinstall -G dba oracle


==Configuration==
Set password for the user oracle:
# passwd oracle


===Kernel parameters===
Optional: Add oracle to the {{ic|sshd_config}} file.
# pacman -S openssh
Add this line to {{ic|/etc/ssh/sshd_config}}:
AllowUsers oracle


The following kernel parameters must be adjusted. Add to file {{ic|/etc/sysctl.d/99-sysctl.conf}} the following parameters, or adjust them if already defined:
Add oracle to {{ic|/etc/sudoers}}. This will give oracle super user privilege.
oracle    ALL=(ALL) ALL


fs.file-max = 6815744
Add these lines to {{ic|/etc/sysctl.d/99-sysctl.conf}} ('''''Review Oracle documentation to adjust these settings''''').
  fs.aio-max-nr = 1048576
# oracle kernel settings
  fs.file-max = 6553600
  kernel.shmall = 2097152
  kernel.shmall = 2097152
  kernel.shmmax = 2147483648
  kernel.shmmax = 2147483648
  kernel.shmmni = 4096
  kernel.shmmni = 4096
  kernel.sem = 250 32000 100 128
  kernel.sem = 250 32000 100 128
  net.ipv4.ip_local_port_range = 9000 65500
  net.ipv4.ip_local_port_range = 1024 65535
  net.core.rmem_default = 4194304
  net.core.rmem_default = 4194304
  net.core.rmem_max = 4194304
  net.core.rmem_max = 4194304
  net.core.wmem_default = 262144
  net.core.wmem_default = 262144
  net.core.wmem_max = 1048576
  net.core.wmem_max = 262144


and activate the modified settings:
Add these lines to {{ic|/etc/security/limits.conf}} ('''''Review Oracle documentation to adjust these settings''''')
# oracle settings
oracle          soft    nproc  2047
oracle          hard    nproc  16384
oracle          soft    nofile  1024
oracle          hard    nofile  65536


# sysctl --system
Optional: You may reboot now if you want the changes to take effect.


===Pam Limits===
Create some directories for Oracle database. You can chose the directory path. Here is an example.
mkdir -p /oracle/inventory /oracle/recovery /oracle/product/db


Also the PAM module limits must be configured (see also: [[Realtime process management]]). Add to file /etc/security/limits.conf the following:
Set permissions for the directories.
chown -R oracle:dba /oracle
chmod 777 /tmp


  oracle           soft    nproc  2047
Create or update oracle bashrc {{ic|/home/oracle/.bashrc}}. Here is an example of the oracle user settings.
  oracle           hard    nproc  16384
  export ORACLE_BASE=/oracle
  oracle           soft    nofile 1024
  export ORACLE_HOME=/oracle/product/db
  oracle           hard    nofile 65536
  export ORACLE_SID=xdb
export ORACLE_INVENTORY=/oracle/inventory
export ORACLE_BASE ORACLE_SID ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
  export EDITOR=nano
export VISUAL=nano
 
=== Graphical installation ===
 
==== Installing Oracle database software ====
 
Download the Oracle database from here:
http://www.oracle.com/technology/software/products/database/index.html
 
Unzip the Oracle database.
 
Arch i686:
unzip linux_11gR1_database_1013.zip -d /media
Arch x86_64:
unzip linux.x64_11gR1_database_1013.zip -d /media
 
Optional: Arch x86_64 (only required if the installer will not launch automatically ... at the time of this writing there was an issue with the packaged unzip in the 64-bit Oracle installer):
cd /media/database/install
mv unzip unzipx
  ln -s /usr/bin/unzip


===Installation===
Change the permissions for the extracted Oracle database.
chmod -R 777 /media/database
chown -R oracle:oinstall /media/database


And now the easy part. Login as <tt>oracle</tt> user:
Enter the directory where you extracted the Oracle database.


In oder to run oracle installation script you need to export the X display as a normal user:
  DISPLAY=:0.0; export DISPLAY; xhost +
  DISPLAY=:0.0; export DISPLAY; xhost +
  su - oracle
 
Login as the user oracle and export the X display:
  su oracle
  DISPLAY=:0.0; export DISPLAY
  DISPLAY=:0.0; export DISPLAY


Download the Oracle software from Oracle site towards the <tt>oracle</tt> user folder:
Enter the database directory and run the Oracle Universal Installer as the user oracle.
http://www.oracle.com/technology/software/products/database/index.html
cd /media/database
./runInstaller -ignoreSysPrereqs
 
During the Graphical installation:
# Click on "Next".
# Choose "Enterprise Edition" Installation Type and click on "Next"
# Oracle Base should be: /oracle. Don't change it, unless you know what you're doing.
## Change the default "Name" to orarch or something else.
## The predefined path in {{ic|/etc/rc.d/oracledb}} is "db", ie: /oracle/product/db. If you want to use a different path you'll have to change {{ic|/etc/rc.d/oracledb}}, so that the startup script can locate ORACLE_HOME directory.
## After changing the defaults, click on "Next".
# Since Oracle database requires certain distro requirement, you'll have to manually check them and then click on "Next".
# Chose "Software Install Only" and click on "Next".
# There is only one DBA group for oracle database. Click on "Next".
# Install "Summary" shows what's going to be installed. Click on "Install".
# The installation will take some time, especially the "Linking" part. Be patient! If you get an error message ignore it by clicking on "Continue".
## At the end of the installation you'll have to open another terminal, and execute {{ic|/oracle/product/db/root.sh}} as root. '''Don't click on "OK" yet'''.
## When running root.sh, you'll be offered to use /usr/local/bin as the full pathname. Press the "Enter" key here.
## Now you can click on "OK"
# Installation is finished, click on "Exit" and "Yes", you really want to exit.
 
=== Oracle Enterprise Manager installation (optional) ===
 
This section describes how to install the web based OEM available in 10g+. 
 
''Depending on your settings the OUI may have already installed this''.
 
Login or su to oracle, then run the following commands (answering the prompts approriately). '''''This may take a while'''''.
cd ${ORACLE_HOME}/bin
./emca -repos create
./emca -config dbcontrol db
 
Test this out by navigating to the enterprise manager (adjust the servername (localhost) apporpriately). 
<nowiki>https://localhost:1158/em/console</nowiki>
 
You can control OEM with the following commands.
emctl status dbconsole
emctl stop dbconsole
emctl start dbconsole
 
== Install method 2 - AUR ==
 
=== Installation ===
 
{{Note| This installation method creates a database automatically. The Oracle database will therefore be ready to be used after the installation.}}
 
'''Step 1.'''
Download the Arch Linux package {{AUR|oracle}}{{Broken package link|{{aur-mirror|oracle}}}} from AUR.
Download the Oracle database 11gR1: http://www.oracle.com/technology/software/products/database/index.html
 
'''Step 2.'''
Extract the Arch Linux package into a directory. Copy the Oracle database 11gR1 into that directory as well.
 
INFO: The default install configuration in {{ic| ee.rsp.patch}} is:
ORACLE_BASE="/home/oracle/app/oracle"
ORACLE_HOME="/home/oracle/app/oracle/product/11.1.0/orarch"
ORACLE_HOME_NAME="orarch"
s_globalDBName="archlinux"
s_dbSid="archlinux"
s_superAdminSamePasswd="orarchdbadmin"
s_superAdminSamePasswdAgain="orarchdbadmin"
 
Optional: You can either change the default password now or later after the installation. If you change the ee.rsp.patch file, you need to update the md5sums in the PKGBUILD file. To obtain the md5sum, run (makepkg -g) or:
md5sum ee.rsp.patch
 
Create the Oracle database package by using makepkg:
makepkg -s
 
'''Step 3.'''
Install the package that makepkg has created by using pacman. You may get an error stating "/bin/ksh already exists", just remove that file and pacman will continue.
 
Pacman will now install the Oracle database by executing Oracle's own installation script(./runInstaller -silent -ignoreSysPrereqs).


and unzip it in /media folder:
The installation will take som time, please be patient. Do not exit terminal during database installation, especially when the installation script is executing configuration assistants:
  su -
....
  unzip /home/oracle/Downloads/linuxamd64_12102_database_1of2.zip -d /media
Starting to execute configuration assistants
  unzip /home/oracle/Downloads/linuxamd64_12102_database_2of2.zip -d /media
Configuration assistant "Oracle Net Configuration Assistant" succeeded
...


then, adjust the owner and group of the extracted installation directory structure as follows:
The installation script ends something like this:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/home/oracle/oraInventory/orainstRoot.sh
/home/oracle/app/oracle/product/11.1.0/orarch/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
   
The installation of Oracle Database 11g was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2009-03-03_07-24-10PM.log'
for more details.


  chown -R oracle:oinstall /media/database
'''Step 4.'''
Run these scripts as root:


if not allowed to change the ownership by the <tt>oracle</tt> user, please use the <tt>su</tt> user to modify the ownership as reported.
# cd /home/oracle/oraInventory
# ./orainstRoot.sh
# cd /home/oracle/app/oracle/product/11.1.0/orarch
# ./root.sh


===Target directory structure===
'''Step 5.'''
The default user for the Oracle database is "oracle". Since the password is not set for the user oracle, you need to run passwd as root:
passwd oracle


Now create the directory structure where the Oracle software will be installed:
'''Step 6.'''
Login as the user oracle.
su oracle


  mkdir -p /oracle/{inventory,recovery,product/db}
Create the file /home/oracle/.bashrc and add these lines to the .bashrc file:
  export ORACLE_SID=archlinux
export ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/orarch
export PATH=$PATH:$ORACLE_HOME/bin


===Launch the Oracle installer===
'''Step 7.'''
If you haven't altered the {{ic| ee.rsp.patch}} file, you need to '''change the administration password for SYS and SYSTEM'''.


  /media/database/runInstaller
{{Note| If the database isn't mounted or opened. Login as the user oracle and try this first:}}
  su oracle


Now, you have to answer to several questions:
sqlplus '/as sysdba'


;Installation option
SQL> startup mount;
: "Install database software only"
SQL> alter database open;


;Grid Options
Changing the password for the '''SYSTEM''' user:
: "Single instance database installation"
{{bc|<nowiki>
sqlplus '/as sysdba'


;Product Languages
SQL> show user
: "English"
USER is "SYS"


;Database Edition
SQL> passw system
: "Enterprise Edition"
Changing password for system
New password:
Retype new password:
Password changed


;Installation Location
SQL> quit
: Oracle Base: /oracle and the Software Location: /oracle/product/db
</nowiki>}}


;Create Inventory
Changing the password for the '''SYS''' user:
: Inventory Directory: /oracle/inventory and the oraInventory Group Name: oinstall
{{bc|<nowiki>
sqlplus system/secretpassword


;Operating System Groups
SQL> show user;
: Database Administrator Group: dba and the Database Operator Group: oinstall
USER is "SYSTEM"


;Prerequisite Checks
SQL> passw sys
: Ignore all
Changing password for sys
New password:
Retype new password:  
Password changed


==== Possible errors====
SQL> quit
</nowiki>}}


During installation you may get some error messages.
== Post installation ==


The first error in the corresponding log file can be:
===Creating initial database ===


{{note|this error message appeared in Oracle 11gR2 x64}}
==== Graphical ====


INFO: /usr/lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14'
You have only installed the Oracle database software. Now you need to create a database. Login as the user oracle:
  collect2: error: ld returned 1 exit status
  su oracle


In case it appears, ignore the error message: click "Continue". Unfortunately, this error leads to the unavailability of the lexical compiler: it won't work.
Export the ORACLE_HOME binary directory:
The lexical compiler is used to generate its own Chinese and Japanese dictionaries.
export ORACLE_HOME=/oracle/product/db
export PATH=$PATH:$ORACLE_HOME/bin


Another error message can be:
Run database installation script:
dbca


/oracle/product/db/lib/libnnz11.so: could not read symbols: Invalid operation
During the graphical installation:
collect2: error: ld returned 1 exit status


To fix it: open the file $ORACLE_HOME/sysman/lib/ins_emagent.mk in the text editor and go to line 190:
# Click on "Next".
replace {{ic|$(MK_EMAGENT_NMECTL)}} door:
# Check "Create a Database" and click on "Next".
# Check "General Purpose or Transaction Processing" and click on "Next".
# Chose a database name and SID. Example: Global Database Name: {{Ic|archlinux}}, SID: {{Ic|archlinux}}. And then click on "Next".
# Uncheck "Configure Enterprise Manager", leave it empty and click on "Next".
# Check "Use the Same Administrative Password for All Accounts", set password and click on "Next".
# Check "File System" and click on "Next".
# Check "Use Database File Locations from Template" and click on "Next".
# Uncheck "Specify Flash Recovery Area" and click on "Next".
# No need for "Sample Schemas", click on "Next".
# If you do not know what you're doing, check "Typical" and click on "Next"
# Check "Keep the enhanced 11g default security settings" and click on "Next".
# Uncheck "Enable automatic maintenance tasks" if you wish to do it by yourself and click on "Next".
# View your filesystem layout and click on "Next".
# "Create Database" is checked by default. Click on "Finish" to create database.
# Summary of following operations to be performed, click on "OK".
# When database creation is complete, click on "Exit".


$(MK_EMAGENT_NMECTL) -lnnz11
==== Scripted ====


Now click "Retry" on the installer window.
This section walks you through doing a scripted initial database creation.


===Start scripts===
{{Note|The scripts assume they are the first database to be installed on this system.  If this is not the case review the xdb-create.sh script and comment out the portions which deal with the *.ora files.}}


To automatically start the Oracle database during the boot process, it's possible to create two init scripts:
Download the following tar file with a set of scripted database installation scripts.
wget http://sites.google.com/site/mbasil77/Home/instanceCreateXdb.tgz


'''/etc/rc.d/ora.listener''' :
Extract the directory
tar xzf instanceCreateXdb.tgz


#!/bin/sh
Move into instanceCreateXdb directory
export ORACLE_HOME="/oracle/product/db"
  cd instanceCreateXdb
export ORACLE_BASE=/oracle
export ORACLE_SID='''''<SID of your DB>'''''
export ORACLE_INVENTORY=/oracle/inventory
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
case "$1" in
start)
  echo "Start Oracle Listeners"
  /bin/su oracle -c "$ORACLE_HOME/bin/lsnrctl start LISTENER"
  ;;
stop)
/bin/su oracle -c "$ORACLE_HOME/bin/lsnrctl stop LISTENER"
;;
  esac


'''/etc/rc.d/ora.database''' :
File list
* CreateDB.sql
* CreateDBCatalog.sql
* initxdb.dbs.ora
* initxdb.ora
* listener.ora
* postDBCreation.sql
* sqlnet.ora
* sysObjects.sql
* tnsnames.ora
* xdb-create.sh
* xdb-create.sql
* xdb-secfix.sh


#!/bin/sh
Script notes
export ORACLE_HOME="/oracle/product/db"
* the files assume a database sid of '''xdb'''
export ORACLE_BASE=/oracle
* the files assume an oracle base of '''/oracle/product/db'''
export ORACLE_SID='''''<SID of your DB>'''''
* '''''review all memory and storage parameters against Oracle documentation'''''
export ORACLE_INVENTORY=/oracle/inventory
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
case "$1" in
start)
  echo "Start Oracle Database"
  /bin/su oracle -c "$ORACLE_HOME/bin/dbstart"
  ;;
stop)
  /bin/su oracle -c "$ORACLE_HOME/bin/dbshut"
  ;;
esac


Make both scripts executable:
Setup filesystem (as root)
./xdb-create.sh


  chmod +x /etc/rc.d/ora*
Install database from script ('''''this will take a long time''''')
  su oracle
sqlplus / as sysdba @/oracle/admin/xdb/scripts/xdb-create.sql


You can now call the two scripts from {{ic|/etc/rc.conf}}
==== Testing database ====


  DAEMONS=( ... ora.listener ora.database ...)
Login as the user oracle and run export ORACLE_SID="yourSID" etc., ie:
export ORACLE_SID=xdb
  export ORACLE_HOME=/oracle/product/db
export PATH=$PATH:$ORACLE_HOME/bin


an alternative way is to manually start the database by logging on the inactive database as sysdba, using sqlplus :
Running oraenv should confirm the exported configuration:
oraenv


  $ su - oracle
  ORACLE_SID = [xdb] ?
  $ sqlplus / as sysdba
The Oracle base for ORACLE_HOME=/oracle/product/db
  is /oracle


and then start the database with:
Check if the database is shutting down or starting:
sqlplus '/as sysdba'


  SQL> startup
  SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


To stop the database:
SQL> startup mount;
ORACLE instance started.
Total System Global Area  385003520 bytes
Fixed Size     1300100 bytes
Variable Size   234883452 bytes
Database Buffers   142606336 bytes
Redo Buffers     6213632 bytes
Database mounted.
Database opened.


  SQL> shutdown immediate
Type "quit" when you want to leave SQL prompt:
  SQL> quit


To start or stop the database instance listener, it's possible to use the command <tt>lsnrctl</tt>:
=== Starting oracle during the boot ===


To start the listener:
If you want to start with your oracle SID, replace ":N" with ":Y" in {{ic|/etc/oratab}}:
<your sid>:<oracle home>:N
<your sid>:<oracle home>:Y


  $ su - oracle
Example from Scripted database creation (/etc/oratab):
$ lsnrctl start
  xdb:/oracle/product/db:Y


To stop the listener:
To start the oracle database daemon during boot, add "oracledb" in your /etc/rc.conf:


  $ su - oracle
  DAEMONS=(oracledb syslog-ng dbus !network netfs crond ntpd alsa hal wicd fam)
$ lsnrctl stop


To check for the status of the listener:
Note: If the daemon doesn't start, please check that the {{ic|ORACLE_HOME}} path matches your current oracle directory in /etc/rc.d/oracledb:
export ORACLE_HOME=/oracle/product/db


  $ su - oracle
  $ pwd
  $ lsnrctl status
  /oracle/product/db


===Completion===
Test starting the daemon as root:
/etc/rc.d/oracledb start


The Oracle db graphical installer can ask for the execution of two scripts as root:
Starting Oracle:
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 27-FEB-2009 23:14:45
...
The command completed successfully
Processing Database instance "archlinux": log file
/oracle/product/db/startup.log
OK


  su
Now you'll login to your oracle database each time you reboot:
  /oracle/inventory/orainstRoot.sh
  su oracle
  /oracle/product/db/root.sh
  export ORACLE_SID=xdb
oraenv
  sqlplus '/as sysdba'


The last script asks for the full pathname. Give this:
Install Method 2:
su oracle
export ORACLE_SID=archlinux
oraenv
sqlplus '/as sysdba'


/usr/local/bin
=== Setting permissions for normal users ===


===Listener===
Since there is only one user(oracle) that has access to the oracle database, you need to add your normal user to the group "dba". In this case "joe" is the normal user:
# gpasswd -a joe dba


As last step, the instance listener must be created. This is done by starting (as oracle user) the following graphical tool
The group changes will take effect after you logout and login again. The user oracle has the permissions to access the oracle home directory, ie /home/oracle:
drwx------ 6 oracle dba 4096 2009-02-27 23:27 oracle


  netca
You need to grant the group "dba" permission to execute the binary files in the oracle home directory:
  chmod -R g+x /home/oracle


Answer to the configuration wizards as follows:
Now you'll be able to run the oracle database as the normal user.


; Choose the configuration you would like to do
== Transfer existing Oracle installation ==
: Listener configuration


; Select what you want to do:
Moving or transferring Oracle can be quite useful in the following conditions:
: Add
* replacing hardware
* setting up several dev machines
* running lean system (no desktop manager, java, etc)


; Listener name:
The installation of Oracle requires several packages.  However, just running an Oracle database is much simpler and has far fewer requirements, as shown below.
: LISTENER


; Selected Protocols
''In principle transferring Oracle should work across distros.  Transferring from RHEL/Centos 5.2 to ARCH 2009.02 has been tested successfully.''
: TCP


; Which TCP/IP port number should the listener use ?
To prep Oracle for a move shutdown database services
: standard port number of 1521
dbstop ${ORACLE_HOME}
lsnrctl stop


; Would you like to configure another listener
Optional: stop OEM if it is running
: No
emctl stop dbconsole


Then click on "Finish"
'''''If you are running other Oracle daemons stop them as well'''''


Moreover, when you connect to an Oracle database running on the same machine where the connection request is done, you don't need an instance listener. The listener is needed when you want to access the database from "outside", or when you make a connection through the JDBC driver, for example in a Java application.
This section assumes the following conditions about the existing Oracle installation:
* oracle root is /oracle
* oracle data is at /oracle/oradata/<sid>


==Post Installation==
Tar up entire Oracle installation and data.
cd /
tar czf oracle.tgz /oracle


A database can now be created by the user <tt>oracle</tt> who starts the <tt>dbca</tt> graphical tool:
Using ssh and sftp or your method of choice transfer oracle.tgz to the root (/) of the target system.


  dbca
Login to target system as root and unpack the tar
  cd /
tar xzf oracle.tgz
chmod 755 -R /oracle
chown -R oracle:dba /oracle


After the db creation, edit the file <tt>/etc/oratab</tt> and change this row from:
Update the system:
pacman -Syu python unzip sudo
pacman -U ftp://ftp.berlios.de/pub/aurbuild/aurbuild-1.8.4-1-any.pkg.tar.gz


  <your sid>:<oracle home>:N
Install required package run Oracle database and ''required'' daemons
  aurbuild -s libaio
pacman -S sysstat


to :
Configure server for oracle [[#Configuration]]


<your sid>:<oracle home>:Y
Setup OEM (optional) [[#Oracle Enterprise Manager installation (optional)]]


==Listener IPv6 problem ==
Execute appropriate/desired post installation steps [[#Post installation]]


As default, the listener is configured with the {{ic | localhost.localdomain}} to listen.
== Known issues ==
It seems that Arch default IPv6 deployment is different, so the database instance can not register with the listener. To solve this problem, check for the listener status, to verify if it's listening the events from/to the database instance:


# lsnrctl status
The Oracle Universal Installer (ie, in silent mode) seems create errors when installing on other paths than "../app/oracle/..".


If you see:
Two consistent errors using the current libraries will occur. The first one can be ignored:


  The listener supports no services
  INFO: / usr/lib64/libstdc + + so.5:. Undefined reference to `memcpy@GLIBC_2.14 '
collect2: error: ld returned 1 exit status


Go to the path {{ic|$ORACLE_HOME/network/admin}} and edit the file {{ic|listener.ora}}. Change the following line:
Ignore this message by clicking the "Continue" button. Unfortunately,this has the consequence of the  Lexical Compiler not working. The Lexical Compiler is used to generate the Chinese and Japanese dictionaries.  


      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))


to:
The second error needs to be fixed as it can cause the emconsole to fail eventually. Fortunately, the fix is easy:


      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
su oracle
cd $ORACLE_HOME/sysman/lib
make -f ins_emagent.mk "agent"


This forces the listener to use your external IP address and therefore IPv4.
The last gcc call fails, which is what is causing the error. We need to add the -lnnz11 flag after the -lcore11 flag for this to make successfully, therefore, enter the following into the terminal:


Now, if you check again for the listener status:
gcc -o $ORACLE_HOME/sysman/lib/emdctl -L$ORACLE_HOME/lib/ -L$ORACLE_HOME/sysman/lib/  -L$ORACLE_HOME/lib/stubs/      `cat $ORACLE_HOME/lib/sysliblist` -Wl,-rpath,$ORACLE_HOME/lib -lm    `cat $ORACLE_HOME/lib/sysliblist` -ldl -lm  -L$ORACLE_HOME/lib $ORACLE_HOME/sysman/lib//s0nmectl.o -lnmectl -lclntsh -L$ORACLE_HOME/lib  -L$ORACLE_HOME/sysman/lib/ -lnmemso -lcore11 -lnnz11 -Wl,-rpath,$ORACLE_HOME/lib/:$ORACLE_HOME/sysman/lib/:$ORACLE_HOME/jdk/jre/lib/amd64/server:$ORACLE_HOME/jdk/jre/lib/amd64 -L$ORACLE_HOME/jdk/jre/lib/amd64/server -L$ORACLE_HOME/jdk/jre/lib/amd64 -z lazyload -ljava -ljvm -lverify -z nolazyload -Wl,-rpath,$ORACLE_HOME/lib/:$ORACLE_HOME/sysman/lib/:$ORACLE_HOME/jdk/jre/lib/amd64/server:$ORACLE_HOME/jdk/jre/lib/amd64 -Wl,--allow-shlib-undefined    `cat $ORACLE_HOME/lib/sysliblist` -ldl -lm


# lsnrctl status
The make will succeed and you can now choose continue in the Oracle installer.


it's possible to see that database is registered and the listener is listening to it:
== See also ==


Service "<SID name>" has 1 instance(s).
Most of the steps are based on this oracle installation guide for ubuntu users. This guide includes step by step graphical examples:
Instance "<SID name>", status READY, has 1 handler(s) for this service...
http://www.pythian.com/blogs/1355/installing-oracle-11gr1-on-ubuntu-810-intrepid-ibex

Revision as of 10:27, 29 October 2016

zh-CN:Oracle

This article or section is out of date.

Reason: Installation: Packages and AUR reference too old, Dutch version is up-to-date. Berlios is no more. (Discuss in Talk:Oracle Database)

This document will help you install Oracle Database 11gR1 on Arch Linux. If you only want to connect to Oracle databases running elsewhere, see the instructions for installing the Oracle client. For installation of Oracle Express Edition, see oracle-xeAUR and get back to method 2 for after-install configurations.

By using the install method 2 you will be able to finalize the long installation process with only a few steps.

Install method 1 - manual

This section will guide you through installing Oracle onto a fresh installation of archlinux. This is a general approach that has been tested with kernel 2.6.28.ARCH x86_64 and Oracle 11g R1 64-bit. This should in principle work with other versions of Oracle.

Pre installation

AUR helper

To ease the installation process you may find useful to install an AUR helper:

# pacman -U ftp://ftp.berlios.de/pub/aurbuild/aurbuild-1.8.4-1-any.pkg.tar.gz

Required packages for Oracle database installation

Install packages unzip sudo base-devel icu gawk gdb elfutils sysstat libstdc++5.

Install a Java runtime environment, like jre7-openjdk and jdk7-openjdk.

From the AUR, install kshAUR (other implementations like these may work), beecryptAUR, rpmAUR[broken link: Template:Aur-mirror] and libaio.

Oracle database 32-bit requires unixodbc.

Optional lib32 packages on x86_64 are: lib32-libstdc++5 lib32-glibc lib32-gcc-libs.

Oracle database require 32-bit libaio and unixodbc on x86_64 but is not necessary under Arch linux.

Note: The following step is not required in newer Arch Linux installation after the binary directories merge

Some prerequisite symbolic links for Oracle Universal Installer.

# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/ksh /bin/ksh
# ln -s /bin/awk /usr/bin/awk
# ln -s /bin/tr /usr/bin/tr
# ln -s /usr/bin/basename /bin/basename

Arch x86_64:

# ln -s /usr/lib /usr/lib64

Configuration

Create users and group for Oracle database:

# groupadd oinstall
# groupadd dba
# useradd -m -g oinstall -G dba oracle

Set password for the user oracle:

# passwd oracle

Optional: Add oracle to the sshd_config file.

# pacman -S openssh

Add this line to /etc/ssh/sshd_config:

AllowUsers oracle

Add oracle to /etc/sudoers. This will give oracle super user privilege.

oracle    ALL=(ALL) ALL

Add these lines to /etc/sysctl.d/99-sysctl.conf (Review Oracle documentation to adjust these settings).

# oracle kernel settings
fs.file-max = 6553600
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Add these lines to /etc/security/limits.conf (Review Oracle documentation to adjust these settings)

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

Optional: You may reboot now if you want the changes to take effect.

Create some directories for Oracle database. You can chose the directory path. Here is an example.

mkdir -p /oracle/inventory /oracle/recovery /oracle/product/db

Set permissions for the directories.

chown -R oracle:dba /oracle
chmod 777 /tmp

Create or update oracle bashrc /home/oracle/.bashrc. Here is an example of the oracle user settings.

export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/product/db
export ORACLE_SID=xdb
export ORACLE_INVENTORY=/oracle/inventory
export ORACLE_BASE ORACLE_SID ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export EDITOR=nano
export VISUAL=nano

Graphical installation

Installing Oracle database software

Download the Oracle database from here: http://www.oracle.com/technology/software/products/database/index.html

Unzip the Oracle database.

Arch i686:

unzip linux_11gR1_database_1013.zip -d /media

Arch x86_64:

unzip linux.x64_11gR1_database_1013.zip -d /media

Optional: Arch x86_64 (only required if the installer will not launch automatically ... at the time of this writing there was an issue with the packaged unzip in the 64-bit Oracle installer):

cd /media/database/install
mv unzip unzipx
ln -s /usr/bin/unzip 

Change the permissions for the extracted Oracle database.

chmod -R 777 /media/database
chown -R oracle:oinstall /media/database

Enter the directory where you extracted the Oracle database.

In oder to run oracle installation script you need to export the X display as a normal user:

DISPLAY=:0.0; export DISPLAY; xhost +

Login as the user oracle and export the X display:

su oracle
DISPLAY=:0.0; export DISPLAY

Enter the database directory and run the Oracle Universal Installer as the user oracle.

cd /media/database
./runInstaller -ignoreSysPrereqs

During the Graphical installation:

  1. Click on "Next".
  2. Choose "Enterprise Edition" Installation Type and click on "Next"
  3. Oracle Base should be: /oracle. Don't change it, unless you know what you're doing.
    1. Change the default "Name" to orarch or something else.
    2. The predefined path in /etc/rc.d/oracledb is "db", ie: /oracle/product/db. If you want to use a different path you'll have to change /etc/rc.d/oracledb, so that the startup script can locate ORACLE_HOME directory.
    3. After changing the defaults, click on "Next".
  4. Since Oracle database requires certain distro requirement, you'll have to manually check them and then click on "Next".
  5. Chose "Software Install Only" and click on "Next".
  6. There is only one DBA group for oracle database. Click on "Next".
  7. Install "Summary" shows what's going to be installed. Click on "Install".
  8. The installation will take some time, especially the "Linking" part. Be patient! If you get an error message ignore it by clicking on "Continue".
    1. At the end of the installation you'll have to open another terminal, and execute /oracle/product/db/root.sh as root. Don't click on "OK" yet.
    2. When running root.sh, you'll be offered to use /usr/local/bin as the full pathname. Press the "Enter" key here.
    3. Now you can click on "OK"
  9. Installation is finished, click on "Exit" and "Yes", you really want to exit.

Oracle Enterprise Manager installation (optional)

This section describes how to install the web based OEM available in 10g+.

Depending on your settings the OUI may have already installed this.

Login or su to oracle, then run the following commands (answering the prompts approriately). This may take a while.

cd ${ORACLE_HOME}/bin
./emca -repos create
./emca -config dbcontrol db

Test this out by navigating to the enterprise manager (adjust the servername (localhost) apporpriately).

https://localhost:1158/em/console

You can control OEM with the following commands.

emctl status dbconsole
emctl stop dbconsole
emctl start dbconsole

Install method 2 - AUR

Installation

Note: This installation method creates a database automatically. The Oracle database will therefore be ready to be used after the installation.

Step 1. Download the Arch Linux package oracleAUR[broken link: Template:Aur-mirror] from AUR. Download the Oracle database 11gR1: http://www.oracle.com/technology/software/products/database/index.html

Step 2. Extract the Arch Linux package into a directory. Copy the Oracle database 11gR1 into that directory as well.

INFO: The default install configuration in ee.rsp.patch is:

ORACLE_BASE="/home/oracle/app/oracle"
ORACLE_HOME="/home/oracle/app/oracle/product/11.1.0/orarch"
ORACLE_HOME_NAME="orarch"
s_globalDBName="archlinux"
s_dbSid="archlinux"
s_superAdminSamePasswd="orarchdbadmin"
s_superAdminSamePasswdAgain="orarchdbadmin"

Optional: You can either change the default password now or later after the installation. If you change the ee.rsp.patch file, you need to update the md5sums in the PKGBUILD file. To obtain the md5sum, run (makepkg -g) or:

md5sum ee.rsp.patch 

Create the Oracle database package by using makepkg:

makepkg -s

Step 3. Install the package that makepkg has created by using pacman. You may get an error stating "/bin/ksh already exists", just remove that file and pacman will continue.

Pacman will now install the Oracle database by executing Oracle's own installation script(./runInstaller -silent -ignoreSysPrereqs).

The installation will take som time, please be patient. Do not exit terminal during database installation, especially when the installation script is executing configuration assistants:

.... 
Starting to execute configuration assistants
Configuration assistant "Oracle Net Configuration Assistant" succeeded 
...

The installation script ends something like this:

The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/home/oracle/oraInventory/orainstRoot.sh
/home/oracle/app/oracle/product/11.1.0/orarch/root.sh
To execute the configuration scripts:
   1. Open a terminal window
   2. Log in as "root"
   3. Run the scripts
   
The installation of Oracle Database 11g was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2009-03-03_07-24-10PM.log'
for more details.

Step 4. Run these scripts as root:

# cd /home/oracle/oraInventory
# ./orainstRoot.sh
# cd /home/oracle/app/oracle/product/11.1.0/orarch
# ./root.sh

Step 5. The default user for the Oracle database is "oracle". Since the password is not set for the user oracle, you need to run passwd as root:

passwd oracle

Step 6. Login as the user oracle.

su oracle

Create the file /home/oracle/.bashrc and add these lines to the .bashrc file:

export ORACLE_SID=archlinux
export ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/orarch
export PATH=$PATH:$ORACLE_HOME/bin

Step 7. If you haven't altered the ee.rsp.patch file, you need to change the administration password for SYS and SYSTEM.

Note: If the database isn't mounted or opened. Login as the user oracle and try this first:
su oracle
sqlplus '/as sysdba'
SQL> startup mount;
SQL> alter database open; 

Changing the password for the SYSTEM user:

sqlplus '/as sysdba'

SQL> show user
USER is "SYS"

SQL> passw system
Changing password for system
New password:
Retype new password:
Password changed

SQL> quit

Changing the password for the SYS user:

sqlplus system/secretpassword

SQL> show user;
USER is "SYSTEM"

SQL> passw sys
Changing password for sys
New password: 
Retype new password: 
Password changed

SQL> quit

Post installation

Creating initial database

Graphical

You have only installed the Oracle database software. Now you need to create a database. Login as the user oracle:

su oracle

Export the ORACLE_HOME binary directory:

export ORACLE_HOME=/oracle/product/db
export PATH=$PATH:$ORACLE_HOME/bin

Run database installation script:

dbca

During the graphical installation:

  1. Click on "Next".
  2. Check "Create a Database" and click on "Next".
  3. Check "General Purpose or Transaction Processing" and click on "Next".
  4. Chose a database name and SID. Example: Global Database Name: archlinux, SID: archlinux. And then click on "Next".
  5. Uncheck "Configure Enterprise Manager", leave it empty and click on "Next".
  6. Check "Use the Same Administrative Password for All Accounts", set password and click on "Next".
  7. Check "File System" and click on "Next".
  8. Check "Use Database File Locations from Template" and click on "Next".
  9. Uncheck "Specify Flash Recovery Area" and click on "Next".
  10. No need for "Sample Schemas", click on "Next".
  11. If you do not know what you're doing, check "Typical" and click on "Next"
  12. Check "Keep the enhanced 11g default security settings" and click on "Next".
  13. Uncheck "Enable automatic maintenance tasks" if you wish to do it by yourself and click on "Next".
  14. View your filesystem layout and click on "Next".
  15. "Create Database" is checked by default. Click on "Finish" to create database.
  16. Summary of following operations to be performed, click on "OK".
  17. When database creation is complete, click on "Exit".

Scripted

This section walks you through doing a scripted initial database creation.

Note: The scripts assume they are the first database to be installed on this system. If this is not the case review the xdb-create.sh script and comment out the portions which deal with the *.ora files.

Download the following tar file with a set of scripted database installation scripts.

wget http://sites.google.com/site/mbasil77/Home/instanceCreateXdb.tgz

Extract the directory

tar xzf instanceCreateXdb.tgz

Move into instanceCreateXdb directory

cd instanceCreateXdb

File list

  • CreateDB.sql
  • CreateDBCatalog.sql
  • initxdb.dbs.ora
  • initxdb.ora
  • listener.ora
  • postDBCreation.sql
  • sqlnet.ora
  • sysObjects.sql
  • tnsnames.ora
  • xdb-create.sh
  • xdb-create.sql
  • xdb-secfix.sh

Script notes

  • the files assume a database sid of xdb
  • the files assume an oracle base of /oracle/product/db
  • review all memory and storage parameters against Oracle documentation

Setup filesystem (as root)

./xdb-create.sh

Install database from script (this will take a long time)

su oracle
sqlplus / as sysdba @/oracle/admin/xdb/scripts/xdb-create.sql

Testing database

Login as the user oracle and run export ORACLE_SID="yourSID" etc., ie:

export ORACLE_SID=xdb
export ORACLE_HOME=/oracle/product/db
export PATH=$PATH:$ORACLE_HOME/bin

Running oraenv should confirm the exported configuration:

oraenv
ORACLE_SID = [xdb] ? 
The Oracle base for ORACLE_HOME=/oracle/product/db 
is /oracle

Check if the database is shutting down or starting:

sqlplus '/as sysdba'
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;

ORACLE instance started.

Total System Global Area  385003520 bytes
Fixed Size		    1300100 bytes
Variable Size		  234883452 bytes
Database Buffers	  142606336 bytes
Redo Buffers		    6213632 bytes
Database mounted.
Database opened.

Type "quit" when you want to leave SQL prompt:

SQL> quit

Starting oracle during the boot

If you want to start with your oracle SID, replace ":N" with ":Y" in /etc/oratab:

<your sid>:<oracle home>:N
<your sid>:<oracle home>:Y

Example from Scripted database creation (/etc/oratab):

xdb:/oracle/product/db:Y

To start the oracle database daemon during boot, add "oracledb" in your /etc/rc.conf:

DAEMONS=(oracledb syslog-ng dbus !network netfs crond ntpd alsa hal wicd fam)

Note: If the daemon doesn't start, please check that the ORACLE_HOME path matches your current oracle directory in /etc/rc.d/oracledb:

export ORACLE_HOME=/oracle/product/db
$ pwd
/oracle/product/db

Test starting the daemon as root:

/etc/rc.d/oracledb start
Starting Oracle: 
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 27-FEB-2009 23:14:45
...
The command completed successfully
Processing Database instance "archlinux": log file 
/oracle/product/db/startup.log
OK

Now you'll login to your oracle database each time you reboot:

su oracle
export ORACLE_SID=xdb
oraenv
sqlplus '/as sysdba'

Install Method 2:

su oracle
export ORACLE_SID=archlinux
oraenv
sqlplus '/as sysdba'

Setting permissions for normal users

Since there is only one user(oracle) that has access to the oracle database, you need to add your normal user to the group "dba". In this case "joe" is the normal user:

# gpasswd -a joe dba

The group changes will take effect after you logout and login again. The user oracle has the permissions to access the oracle home directory, ie /home/oracle:

drwx------ 6 oracle dba 4096 2009-02-27 23:27 oracle

You need to grant the group "dba" permission to execute the binary files in the oracle home directory:

chmod -R g+x /home/oracle

Now you'll be able to run the oracle database as the normal user.

Transfer existing Oracle installation

Moving or transferring Oracle can be quite useful in the following conditions:

  • replacing hardware
  • setting up several dev machines
  • running lean system (no desktop manager, java, etc)

The installation of Oracle requires several packages. However, just running an Oracle database is much simpler and has far fewer requirements, as shown below.

In principle transferring Oracle should work across distros. Transferring from RHEL/Centos 5.2 to ARCH 2009.02 has been tested successfully.

To prep Oracle for a move shutdown database services

dbstop ${ORACLE_HOME}
lsnrctl stop

Optional: stop OEM if it is running

emctl stop dbconsole

If you are running other Oracle daemons stop them as well

This section assumes the following conditions about the existing Oracle installation:

  • oracle root is /oracle
  • oracle data is at /oracle/oradata/<sid>

Tar up entire Oracle installation and data.

cd /
tar czf oracle.tgz /oracle

Using ssh and sftp or your method of choice transfer oracle.tgz to the root (/) of the target system.

Login to target system as root and unpack the tar

cd /
tar xzf oracle.tgz
chmod 755 -R /oracle
chown -R oracle:dba /oracle

Update the system:

pacman -Syu python unzip sudo
pacman -U ftp://ftp.berlios.de/pub/aurbuild/aurbuild-1.8.4-1-any.pkg.tar.gz

Install required package run Oracle database and required daemons

aurbuild -s libaio
pacman -S sysstat

Configure server for oracle #Configuration

Setup OEM (optional) #Oracle Enterprise Manager installation (optional)

Execute appropriate/desired post installation steps #Post installation

Known issues

The Oracle Universal Installer (ie, in silent mode) seems create errors when installing on other paths than "../app/oracle/..".

Two consistent errors using the current libraries will occur. The first one can be ignored:

INFO: / usr/lib64/libstdc + + so.5:. Undefined reference to `memcpy@GLIBC_2.14 '
collect2: error: ld returned 1 exit status

Ignore this message by clicking the "Continue" button. Unfortunately,this has the consequence of the Lexical Compiler not working. The Lexical Compiler is used to generate the Chinese and Japanese dictionaries.


The second error needs to be fixed as it can cause the emconsole to fail eventually. Fortunately, the fix is easy:

su oracle
cd $ORACLE_HOME/sysman/lib
make -f ins_emagent.mk "agent"

The last gcc call fails, which is what is causing the error. We need to add the -lnnz11 flag after the -lcore11 flag for this to make successfully, therefore, enter the following into the terminal:

gcc -o $ORACLE_HOME/sysman/lib/emdctl -L$ORACLE_HOME/lib/ -L$ORACLE_HOME/sysman/lib/  -L$ORACLE_HOME/lib/stubs/       `cat $ORACLE_HOME/lib/sysliblist` -Wl,-rpath,$ORACLE_HOME/lib -lm    `cat $ORACLE_HOME/lib/sysliblist` -ldl -lm   -L$ORACLE_HOME/lib $ORACLE_HOME/sysman/lib//s0nmectl.o -lnmectl -lclntsh -L$ORACLE_HOME/lib  -L$ORACLE_HOME/sysman/lib/ -lnmemso -lcore11 -lnnz11 -Wl,-rpath,$ORACLE_HOME/lib/:$ORACLE_HOME/sysman/lib/:$ORACLE_HOME/jdk/jre/lib/amd64/server:$ORACLE_HOME/jdk/jre/lib/amd64 -L$ORACLE_HOME/jdk/jre/lib/amd64/server -L$ORACLE_HOME/jdk/jre/lib/amd64 -z lazyload -ljava -ljvm -lverify -z nolazyload -Wl,-rpath,$ORACLE_HOME/lib/:$ORACLE_HOME/sysman/lib/:$ORACLE_HOME/jdk/jre/lib/amd64/server:$ORACLE_HOME/jdk/jre/lib/amd64 -Wl,--allow-shlib-undefined    `cat $ORACLE_HOME/lib/sysliblist` -ldl -lm

The make will succeed and you can now choose continue in the Oracle installer.

See also

Most of the steps are based on this oracle installation guide for ubuntu users. This guide includes step by step graphical examples: http://www.pythian.com/blogs/1355/installing-oracle-11gr1-on-ubuntu-810-intrepid-ibex