Академический Документы
Профессиональный Документы
Культура Документы
Oracle Database 11g Release 2 is not certified to run on Fedora 13 (Goddard) but I wanted to use
it to debug a problem with a particular application which used this database. I checked on the
Internet for details about how to install this version of the Oracle database on Fedora 13 but did
ly
not come across comprehensive instructions. I therefore decided to write this post as a guide for
others who may also wish to install this database on Fedora 13.
on
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. These are minimum required values
by the way; they can be higher.
se
fs.aio-max-nr = 1048576
fs.file-max = 6815744
lu
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
a
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
nn
net.core.wmem_max=1048586
rs
Compared to Sybase ASE which only requires kernel.shmmax, an Oracle database requires
significantly more kernel parameter tweeking.
pe
The current value of a kernel parameter can be displayed using the following command:
r
# /sbin/sysctl -a | grep
Fo
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
● libaio, libaio-devel
● ksh
● sysstat
● unixODBC, unixODBC-devel
● compat-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. Add the following line to /etc/pam.d/login if it does not
already exist:
ly
on
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
se
Note that this file may not currently exist on your system. You may have to create it.
groupadd asmadmin
You must disable Secure Linux (SELINUX) while installing the database. Edit /etc/selinux/config as
follows:
pe
SELINUX=disabled
r
Edit the /etc/redhat-release file replacing the current release information – Fedora release 13
(Goodwin) – with the following:
redhat release 5
You must create the directories in which the Oracle database software will be installed. In our
example, the directory is /app/oracle and the SID is 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. As user oracle, download Oracle
Database 11g R2 from 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. 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
ly
.bash_profile file, changing ORACLE_HOSTNAME, ORACLE_HOME, etc. as required to suit your
particular requirements:
on
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
se
ORACLE_HOSTNAME=ultra.xfpmurphy.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=dbhome_1; export ORACLE_UNQNAME
ORACLE_BASE=/app/oracle; export ORACLE_BASE
lu
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
a
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
nn
ulimit -p 16384
ulimit -n 65536
else
pe
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
Fo
NLS_LANG environmental variable to match your country, language and desired character set, e.g.
germany_germany.we8iso8859p1.
Oracle databases are installed using the Oracle Universal Installer (OUI) which is GUI-based and
uses the X Window system. 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. Start
OUI by issuing the runInstaller command in the ~oracle/tmp/database directory.
If OUI cannot determine your IP address because it is not in /etc/hosts then you will get the
following error:
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. 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:
ly
on
se
a lu
nn
Next OUI checks that the installed software development and runtime packages are correct:
rs
pe
r
Fo
Fedora 13 will fail all these checks. 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.
During the installation, OUI will popup a dialog window advising you that an error has occurred
with ins_emagent.mk. See below:
ly
on
se
a lu
o nn
This error is due to a change in the GCC linker in Fedora 13. The announcement is here. The fix is
to edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, search for the line
rs
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:
r
Fo
ly
on
se
lu
Do not ignore the Password Management button; press it and change the passwords for SYS and
SYSTEM.
a
At this stage I suggest you reboot your system and perform the following basic smoketest of the
installed database software.
nn
$ id
o
$ lsnrctl start
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)))
https://ultra.xxxxxxxxxxx.com:1158/em/console/aboutApplication
ly
$ sqlplus / as sysdba
on
Copyright (c) 1982, 2009, Oracle. All rights reserved.
se
SQL> startup
ORACLE instance started.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
o
$
rs
If you have got this far with your installation of Oracle 11g, all is well. The core Oracle 11g
database software is installed and working. You may have some tweaking to do for your particular
pe
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
r
each instance to Y:
Fo
DBHOME_1:/app/oracle/product/11.2.0/dbhome_1:Y
At this stage you should be able to invoke the Oracle sqldeveloper GUI by invoking
$ORACLE_HOME/sqldeveloper/sqldeveloper/bin/sqldeveloper. Once you have configured a valid
connection, you should see a screen similar to this:
ly
on
se
lu
If you configure listener.ora you can also access the Oracle Enterprise Console via the Web as
shown here:
a
o nn
rs
pe
r
Fo
$ 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 = dbhome_1)
)
)
ADR_BASE_LISTENER = /app/oracle
$
You will obviously have to use different values for HOST and possibly SID_NAME, ORACLE_HOME
ly
and GLOBAL_DBNAME.
on
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. Here is a script to start or stop the Oracle database using dbinit:
se
#!/bin/bash
#
lu
# init file for starting and stopping Oracle 11g database using dbstart/dbstop
#
# chkconfig: 35 80 30
# description: Oracle database startup and shutdown script
a
#
. /etc/rc.d/init.d/functions
nn
ORACLE_BASE=/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
ORACLE_SID=dbhome_1
case "$1" in
o
start)
echo -n $"Starting Oracle DB:"
rs
stop)
echo -n $"Stopping Oracle DB:"
su - oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
echo "OK"
;;
r
*)
echo $"Usage: $0 {start|stop}"
Fo
esac
and here is an alternative script to start and stop the Oracle database using Oracle Enterprise
Manager Database Control:
#!/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 consol
e
#
. /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
ly
I assume that you know how to install a new init script so I am not going to describe the process
on
here.
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.
se
a lu
o nn
rs
pe
r
Fo