The following procedure is a step-by-step guide (Cookbook) with tips and information for installing
Oracle Database 10g on SUSE Linux.
This guide shows how I installed:
- Oracle 10g Release 1 (10.1.0.3.0) on Novell SUSE Linux Enterprise Server 9 (SLES-9)
- Oracle 10g Release 1 (10.1.0.3.0) on SUSE Linux Professional 9.1 (SLP-9.1)
- Oracle 10g Release 1 (10.1.0.3.0) on SUSE Linux Professional 9.2 (SLP-9.2)
- Oracle 10g Release 1 (10.1.0.3.0) on SUSE Linux Professional 9.3 (SLP-9.3)
cksum ship.db.lnx32.cpio.gzUncompress the downloaded file(s):
gunzip ship.db.lnx32.cpio.gzUnpack ship.db.lnx32.cpio:
$ cpio -idmv < ship.db.lnx32.cpio Disk1/stage/Components/oracle.server/10.1.0.3.0/1 Disk1/stage/Components/oracle.server/10.1.0.3.0 Disk1/stage/Components/oracle.server Disk1/stage/Components/oracle.tg/10.1.0.3.0/1/DataFiles Disk1/stage/Components/oracle.tg/10.1.0.3.0/1 Disk1/stage/Components/oracle.tg/10.1.0.3.0 Disk1/stage/Components/oracle.tg Disk1/stage/Components/oracle.assistants.dbca/10.1.0.3.0/1/DataFiles/doc.3.1.jar Disk1/stage/Components/oracle.assistants.dbca/10.1.0.3.0/1/DataFiles/class.jar ...I executed the following command to burn the Disk1 directory on a CD:
# mkisofs -r Disk1 | cdrecord -v dev=0,0,0 speed=20 -(Drives' speed varies; you can get the dev numbers when you execute cdrecord -scanbus).
grep MemTotal /proc/meminfoTo check the size of swap space, execute:
grep SwapTotal /proc/meminfoYou can also add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:
su - root dd if=/dev/zero of=tmpswap bs=1k count=900000 chmod 600 tmpswap mkswap tmpswap swapon tmpswapTo disable the temporary swap space execute the following commands:
su - root swapoff tmpswap rm tmpswap
$ df -h /tmpIf you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:
su - root mkdir /<AnotherFilesystem>/tmp chown root.root /<AnotherFilesystem>/tmp chmod 1777 /<AnotherFilesystem>/tmp export TEMP=/<AnotherFilesystem> # used by Oracle export TMPDIR=/<AnotherFilesystem> # used by Linux programs like the linker "ld"When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:
su - root rmdir /<AnotherFilesystem>/tmp unset TEMP unset TMPDIR
kernel-2.6.5-7.5 gcc-3.3.3-43 gcc-c++-3.3.3-43 glibc-2.3.3-98 libaio-0.3.98-18 libaio-devel-0.3.98-18 make-3.80 openmotif-libs-2.2.2-519.1Even though it's not mentioned in Oracle's installation guide, the openmotif package is also required. In fact, OUI checks for openmotif-2.1.30-11 or a higher version.
uname -r # to get the kernel version rpm -q gcc gcc-c++ glibc libaio libaio-devel make openmotif openmotif-libsOn my SLES-9 system I had to install the following RPMs and dependencies to meet the above software requirements:
rpm -Uvh make-3.80-184.1.i586.rpm rpm -Uvh libaio-0.3.98-18.3.i586.rpm rpm -Uvh openmotif-libs-2.2.2-519.1.i586.rpm \ XFree86-libs-4.3.99.902-43.22.i586.rpm \ freetype2-2.1.7-53.5.i586.rpm \ fontconfig-2.2.92.20040221-28.13.i586.rpm \ expat-1.95.7-37.1.i586.rpmCD 3:
rpm -Uvh gcc-3.3.3-43.24.i586.rpm \ gcc-c++-3.3.3-43.24.i586.rpm \ libstdc++-devel-3.3.3-43.24.i586.rpm \ glibc-devel-2.3.3-98.28.i686.rpm rpm -Uvh openmotif-2.2.2-519.1.i586.rpm rpm -Uvh libaio-devel-0.3.98-18.3.i586.rpm
rpm -Uvh make-3.80-184.i586.rpm rpm -Uvh openmotif-libs-2.2.2-515.i586.rpm \ XFree86-libs-4.3.99.902-40.i586.rpm \ freetype2-2.1.7-53.i586.rpm \ fontconfig-2.2.92.20040221-28.i586.rpm \ expat-1.95.7-37.i586.rpm rpm -Uvh libaio-0.3.98-18.3.i586.rpmCD 3:
rpm -Uvh gcc-3.3.3-41.i586.rpm \ gcc-c++-3.3.3-41.i586.rpm \ libstdc++-devel-3.3.3-41.i586.rpm \ glibc-devel-2.3.3-97.i686.rpm rpm -Uvh openmotif-2.2.2-515.i586.rpmCD 5:
rpm -Uvh libaio-0.3.98-17.i586.rpm \ libaio-devel-0.3.98-17.i586.rpm
rpm -Uvh xorg-x11-libs-6.8.1-15.i586.rpm \ freetype2-2.1.9-3.i586.rpm \ fontconfig-2.2.96.20040728-9.i586.rpm \ expat-1.95.8-2.i586.rpmCD 2:
rpm -Uvh openmotif-libs-2.2.3-6.i586.rpm rpm -Uvh glibc-devel-2.3.3-118.i686.rpmCD 3:
rpm -Uvh gcc-3.3.4-11.i586.rpm \ gcc-c++-3.3.4-11.i586.rpm \ libstdc++-devel-3.3.4-11.i586.rpmCD 4:
rpm -Uvh openmotif-2.2.3-6.i586.rpmThe libaio RPMs don't come with the SUSE Pro CDs. The libaio RPMs are needed if you relink Oracle for async I/O.
rpm -Uvh libaio-0.3.98-21.i586.rpm \ libaio-devel-0.3.98-21.i586.rpm
rpm -Uvh xorg-x11-libs-6.8.2-30.i586.rpm \ freetype2-2.1.9-4.i586.rpm \ fontconfig-2.2.99.20050218-8.i586.rpmCD 2:
rpm -Uvh openmotif-libs-2.2.3-11.i586.rpm rpm -Uvh glibc-devel-2.3.4-23.i686.rpmCD 3:
rpm -Uvh gcc-3.3.5-5.i586.rpm \ gcc-c++-3.3.5-5.i586.rpm \ libstdc++-devel-3.3.5-5.i586.rpmCD 4:
rpm -Uvh openmotif-2.2.3-11.i586.rpmThe libaio RPMs don't come with the SUSE Pro CDs. The libaio RPMs are needed if you relink Oracle for async I/O.
shmmax = 2147483648 (To verify, execute: cat /proc/sys/kernel/shmmax) shmall = 2097152 (To verify, execute: cat /proc/sys/kernel/shmall) shmmni = 4096 (To verify, execute: cat /proc/sys/kernel/shmmni) semmsl = 250 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $1}') semmns = 32000 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $2}') semopm = 100 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $3}') semmni = 128 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $4}') file-max = 65536 (To verify, execute: cat /proc/sys/fs/file-max) ip_local_port_range = 1024 65000 (To verify, execute: cat /proc/sys/net/ipv4/ip_local_port_range)To see the above kernel parameters with one command, you can type:
su - root sysctl -a |egrep "shmmax|shmall|shmmni|sem|file-max|ip_local_port_range"For ip_local_port_range Oracle recommends to set the local port range for outgoing messages to "1024 65000" which is needed for high-usage systems. This kernel parameter defines the local port range for TCP and UDP traffic to choose from.
net.ipv4.ip_local_port_range=1024 65000 kernel.sem=250 32000 100 128 kernel.shmmax=2147483648 fs.file-max=65536Or simply run the following command to add new kernel settings:
su - root cat >> /etc/sysctl.conf << EOF kernel.shmmax=2147483648 kernel.sem=250 32000 100 128 fs.file-max=65536 net.ipv4.ip_local_port_range=1024 65000 EOFIn SLES-9 and SLP-9.1 you also have to instruct SUSE Linux to read the /etc/sysctl.conf file during the boot process. This is done by enabling the boot.sysctl system service:
su - root # chkconfig boot.sysctl boot.sysctl off # chkconfig boot.sysctl on # chkconfig boot.sysctl boot.sysctl on #To load the new kernel settings from the /etc/sysctl.conf file without reboot, execute the following command:
su - root # sysctl -p kernel.shmmax = 2147483648 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 #
$ du -m -s /u01 1963 /u01 $ du -m -s /u01/app/oracle/oradata 720 /u01/app/oracle/oradataIf you also install additional software from the Oracle Database 10g Companion CD, then add at least 1 GB of free disk space.
df -h /
su - root groupadd dba # group of users to be granted SYSDBA system privilege groupadd oinstall # group owner of Oracle files useradd -m -c "Oracle software owner" -g oinstall -G dba oracle passwd oracleFor more information on the "oinstall" group account, see When to use "OINSTALL" group during install of oracle.
nofile = 65536 (To verify, execute: ulimit -n) nproc = 16384 (To verify, execute: ulimit -u)The nofile option denotes the maximum number of open file descriptors, and nproc denotes the maximum number of processes available to a single user.
ulimit -aOracle's suggestions for setting these shell parameters grants those increased parameters to everyone which is not recommended in secure environments. The following links will show how you can increase these parameters for the oracle account only:
su - root mkdir -p /u01/app/oracle chown -R oracle.oinstall /u01But if you want to comply with Oracle's Optimal Flexible Architecture (OFA), then you don't want to place the database files in the /u01 directory but in another directory/filesystem/disk like /u02. This is not a requirement but if you want to comply with OFA, then you might want to create the following directories as well:
su - root mkdir -p /u02/oradata/orcl chown -R oracle.oinstall /u02In this example, "orcl" stands for the name of the database which will also be the name of the instance. This is typically the case for single instance databases.
su - oracle export ORACLE_BASE=/u01/app/oracle export ORACLE_SID=orclNOTE: If ORACLE_BASE is used, then Oracle recommends that you don't set the ORACLE_HOME environment variable but that you choose the default path suggested by the OUI. You can set and use ORACLE_HOME after you finished the Oracle installation.
unset ORACLE_HOME unset TNS_ADMIN
su - oracle cat >> ~oracle/.profile << EOF export ORACLE_BASE=/u01/app/oracle export ORACLE_SID=orcl EOF
$ ssh -X oracle@oracle_remote_server_nameNow when you run any GUI tools on the remote server, it should automatically be relinked to your local desktop. If this is not working, verify that forward X11 is not set to "no" in /etc/ssh/ssh_config on the remote server:
su - root grep ForwardX11 /etc/ssh/ssh_config # ForwardX11 no ForwardX11Trusted yesIf you are using telnet, however, you will have to set DISPLAY manually, see my other article about Starting runInstaller for more information.
su - root mount /media/cdromor
mount /media/dvdBefore you execute runInstaller, make sure the Oracle environment variables are set, see Setting Oracle Environments. You can verify the settings by running the set command:
su - oracle oracle$ setTo execute runInstaller from the mounted CD, run the following command as the oracle user:
oracle$ /media/cdrom/runInstalleror
oracle$ /media/dvd/runInstallerWhen I starteded runInstaller, the following error message was displayed:
Checking monitor: must be configured to display at least 256 colors Failed <<<< >>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set. Some optional pre-requisite checks have failed (see above). Continue? (y/n) [n] ySince my system is configured to display more than 256 colors I ignored the error message and said yes to continue.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2005-03-13_03-53-51PM. Please wait .../tmp/OraInstall2005-03-13_03-53-51PM/oui/lib/linux/libclntsh.so.9.0 bad CRC c0265abb (should be f138c206) Error in writing to directory /tmp/OraInstall2005-03-13_03-53-51PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.Simple try to restart runInstaller if you get this error message.
- Welcome Screen: - Basic Installation: Checked it which is the default - Oracle Home Location: Use default: /u01/app/oracle/product/10.1.0/Db_1 - Installation Type: I used the default: Enterprise Edition - UNIX DBA Group: Use default: dba - Create Starter Databases: I checked it for this example which is the default - Global Database Name: orcl - Database password: Type in the password for SYS, SYSTEM, SYSMAN, and DBSNMP accounts - Advanced Installation: For this example I did not check it Click Next - Specify Inventory directory and credentials: - Full path of the inventory directory: Use default: /u01/app/oracle/oraInventory - Specify Operating System group name: Use default: oinstall Click Next - A window pops up to run the orainstRoot.sh script: Run the script in another terminal: su - root # /u01/app/oracle/oraInventory/orainstRoot.sh Creating the Oracle inventory pointer file (/etc/oraInst.loc) Changing groupname of /u01/app/oracle/oraInventory to oinstall. # Click Continue - Product-specific Prerequisite Checks: Verify that all checks have been passed. Make sure that the status of each Check is set to "Succeeded". If a check failed, see Oracle10g Installation Errors on Linux. Note that the "Retry" button doesn't work after you fixed one of the failed checks. Click Next - Select Database Configuration: I selected "General Purpose". Click Next - Specify Database Configuration Options: - Global Database Name: I used "orcl". - SID: I used "orcl". Click Next - Select Database Management Option: I selected "Use Database Control for Database Management". Click Next - Specify Database File Storage Option: I selected "File System". - File System - Specify Database file location: /u01/app/oracle/oradata/ If you want to comply with OFA, you might want to select another mount point than '/u01', e.g. /u02/oradata. Click Next - Specify Backup and Recovery Options: For my test installation I selected "Do no enable Automated Backups". Click Next - Specify Database Schema Passwords: Make sure that the password(s) don't start with a digit number! Otherwise you will later get error message(s) like "ORA-00988 missing or invalid password". Click Next - Summary: Click Install If Enterprise manager configuration fails due to port allocation problems, check out Oracle10g/Linux Errors and Problems. When a window pops up to run the root.sh script, execute the script in another terminal as root: su - root # /u01/app/oracle/product/10.1.0/Db_1/root.sh Running Oracle10 root.sh script... \nThe following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.1.0/Db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... \nCreating /etc/oratab file... Adding entry to /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. /var/opt/oracle does not exist. Creating it now. /etc/oracle does not exist. Creating it now. Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Oracle Cluster Registry for cluster has been initialized Adding to inittab Checking the status of Oracle init process... Expecting the CRS daemons to be up within 600 seconds. CSS is active on these nodes. mars CSS is active on all nodes. Oracle CSS service is installed and running under init(1M) # Click OK - End of Installation: Click Exit
su - oracle $ cat >> ~oracle/.profile << EOF export ORACLE_HOME=\$ORACLE_BASE/product/10.1.0/Db_1 export PATH=$PATH:\$ORACLE_HOME/bin export LD_LIBRARY_PATH=\$ORACLE_HOME/lib EOF . ~oracle/.profileThis commmand will add the environment variables to the ~oracle/.profile and source in the file for the current shell by executing ". ~oracle/.profile".
oracle$ sqlplus /nolog SQL> connect / as sysdba SQL> startupTo shutdown the database:
oracle$ sqlplus /nolog SQL> connect / as sysdba SQL> shutdownThe slash connects you to the schema owned by SYS. In the above example you will be connected to the schema owned by SYS with the privilege SYSDBA. SYSDBA gives you the following privileges:
ps auxwwTo shutdown the Oracle background processes after an Oracle Database 10g installation, you can execute the following commands:
su - oracle isqlplusctl stop
su - oracle emctl stop dbconsoleIf you selected "Grid Control for Database Management" which is used for full "Grid Control" installations, then the Oracle Management Agent (standalone agent) for the Oracle Enterprise Manager Grid Control (Grid Control) can be stopped with the following command:
su - oracle emctl stop agent
su - oracle lsnrctl stop
su - root /etc/init.d/init.cssd stop
su - root export ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1 . $ORACLE_HOME/bin/localconfig delete # stops the Oracle CSS daemon and deletes configuration rm -rf /u01/app/oracle/* rm -rf /etc/oracle rm -f /etc/oraInst.loc /etc/oratab rm -f /etc/inittab.cssd rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenvMake also sure to unset and uncomment ORACLE_HOME from ~oracle/.profile.
Checking monitor: must be configured to display at least 256 colors Failed <<<< >>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set. Some optional pre-requisite checks have failed (see above). Continue? (y/n) [n]
rpm -q XFree86 xf86tools cabextract libpng libjpeg XFree86-MesaExample for installing these packages on SLES-9 (packages can be found on the 2nd CD):
su - root rpm -Uvh XFree86-4.3.99.902-43.22.i586.rpm \ XFree86-Mesa-4.3.99.902-43.22.i586.rpm \ xf86tools-0.1-955.5.i586.rpm \ cabextract-1.0-17.1.i586.rpm \ libpng-1.2.5-182.4.i586.rpm \ libjpeg-6.2.0-731.1.i586.rpm
Enterprise manager configuration failed due to the following error - Failed to allocate port(s) int the specified range for the following process(es): JMS [5540-5559], RMI [5520-5539], Database Control [5500-5519], EM agent [1830-1849]
emca -RMI_PORT <port> -JMS_PORT <port> -AGENT_PORT <port> -DBCONSOLE_HTTP_PORT <port>
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory or ORA-01034: ORACLE not available
ORA-01034: ORACLE not available ORA-27121: unable to determine size of shared memory segment Linux Error: 13: Permission denied
ls -l $ORACLE_HOME/bin/oracle -rwsr-s--x 1 oracle oinstall 72524978 Dec 26 13:12 /u01/app/oracle/OraHome_1/bin/oracle
ORA-00988 missing or invalid password(s).
X11 connection rejected because of wrong authentication. X connection to localhost:10.0 broken (explicit kill or server shutdown).
$ ssh -X oracle@oracle_remote_server_nameNow when you try to run any GUI tool on the remote server, it will automatically be relinked to your local desktop. If this is not working, verify that the ForwardX11 setting is not set to "no" in /etc/ssh/ssh_config on your remote server:
su - root grep ForwardX11 /etc/ssh/ssh_config # ForwardX11 no ForwardX11Trusted yesIf you are using telnet, however, you will have to set DISPLAY manually, see my other article Starting runInstaller for more information.
./runInstaller: line 67: 6275 Segmentation fault $CMDDIR/install/runInstaller -formCluster $*
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2005-03-13_03-53-51PM. Please wait .../tmp/OraInstall2005-03-13_03-53-51PM/oui/lib/linux/libclntsh.so.9.0 bad CRC c0265abb (should be f138c206) Error in writing to directory /tmp/OraInstall2005-03-13_03-53-51PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
$ which rman /usr/X11R6/bin/rman