| Home -> oracle -> Oracle 11g release 2 (11.2.0.1.0) on Fedora 11 |
Oracle 11g release 2 (11.2.0.1.0) on Fedora 11Please note that Oracle Database 11g is not certified to run on Fedora Linux, therefore you should not use this combination on a production server. You can examine Oracle certification matrix at Metalink
Contents
1. Downloading installation filesDownload Oracle Database 11gR2 from Oracle Technology Network. Two files are needed to install the database, Disk1 and Disk2 (2.1 GB total).2. Preparing your system2.1 Steps to perform as root userInstall following fedora packages usingyum:yum install compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel \ gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc \ libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel kshIf you are on a 64-bit system, you will also need to install some 32-bit packages: yum install compat-libstdc++-33.i586 glibc.i686 glibc-devel.i586 libaio.i586 \ libaio-devel.i586 libgcc.i586 libstdc++.i586 unixODBC.i586 unixODBC-devel.i586Change kernel parameters by adding the following lines in /etc/sysctl.conf:
kernel.sem = 250 32000 100 128 kernel.shmmax = 4294967295 kernel.shmmni = 4096 kernel.shmall=2097152 fs.file-max = 6815744 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 = 1048576 fs.aio-max-nr = 1048576Update kernel configuration: [root@n001914 ~]# sysctl -e -p /etc/sysctl.confAdd the following lines to /etc/security/limits.conf file: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536Add the following to /etc/profile:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
Create user and groups that will own oracle software. Normally we name this user oracle:
[root@n001914 ~]# groupadd oinstall [root@n001914 ~]# groupadd dba [root@n001914 ~]# useradd -g oinstall -G dba oracle [root@n001914 ~]# passwd oracleCreate Optimal Flexible Architecture Compliant directory structure which will hold Oracle software and database files: [root@n001914 ~]# mkdir -p /u01/app/oracle [root@n001914 ~]# chown -R oracle:oinstall /u01/appNow is good time to move the two zip files you downloaded to a directory writable by user oracle and to unpack them: [root@n001914 ~]# mkdir /home/oracle/install [root@n001914 ~]# mv linux.x64_11gR2_database_?of2.zip /home/oracle/install [root@n001914 ~]# chown -R oracle:oinstall /home/oracle/install 2.2 Steps to perform as oracle userUnzip both files while logged on as oracle user. They will both unzip in the same directory 'database':[oracle@n001914 install]$ unzip linux.x64_11gR2_database_1of2.zip [oracle@n001914 install]$ unzip linux.x64_11gR2_database_2of2.zip 3. Running the installerOracle installer needs to be run from GUI, so start your favorite window manager if you are still in CLI and logon as user oracle.Start the installer: [oracle@n001914 ~]$ /home/oracle/install/database/runInstallerNow the installer should be up and running. Remember the ORACLE_SID and path to ORACLE_HOME that you set at the installer file locations prompt, you'll need this later on.
If Oracle installer cannot determine your host's IP address i.e. you got IP address from DHCP but DNS doesn't know about you, then you'll get the following error:
127.0.0.1 n001914.local n001914 localhost.localdomain localhostand restart the installer.
Step 1: hit 'next' You will do fine without recieving security updates info. [root@n001914 ~]# /u01/app/oraInventory/orainstRoot.sh [root@n001914 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.shInstallation process is now finished. 4. Post-installation steps4.1. Setting up environmentLogin as user oracle and add the following variables in~/.bash_profile:
export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export NLS_LANG=croatian_croatia.ee8iso8859p2 export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_SID=ora11Note on NLS_LANG parameter: You should modify NLS_LANG parameter to match your country, language and desired character set, e.g. german_germany.we8iso8859p15, american_america.we8iso8859p1 etc.
Full listing of available locale data is available here.
Source profile to set the environment in current session:
[oracle@n001914 ~]$ source ~/.bash_profile 4.2. Configure Oracle NetBefore running netca (Oracle Net Configuration Assistant) on a system with enforcing SELinux we must first change the file context for libclntsh.so.11.1 to textrel_shlib_t. to avoid errors of type:
SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 which requires text relocation
[root@n001914 ~]# chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1'You must also change the default file context files on the system in order to preserve them even on a full relabel: [root@n001914 ~]# semanage fcontext -a -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1'Run netca to set-up Oracle net: [oracle@n001914 ~]$ netcaChoose "Listener configuration", then "Add". Leave default Listener name "LISTENER", select TCP protocol, and use standard port 1521 (if available). Next, choose "Naming Methods configuration" and select "Local Naming" and "Easy Connect Naming". Oracle Net configuration is finished and TNS listener should be up and running: [oracle@n001914 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 09-LIS-2009 12:38:58 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=n001914.in2.hr)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 09-LIS-2009 12:38:52 Uptime 0 days 0 hr. 0 min. 6 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/n001914/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=n001914.in2.hr)(PORT=1521))) The listener supports no services The command completed successfully 4.3. Creating the databaseRun Database Configuration Assistant:[oracle@n001914 ~]$ dbcaStep 1: choose "Create a Database" Step 2: choose "Custom Database" Step 3: Choose Global Database Name and SID. We'll use "ora11" for both global name and SID in this example. Step 4: Leave "Configure Enterprise Manager" checked and "Enable Alert Notifications" and "Daily Disk Backup to Recovery Area" unchecked Step 5: choose passwords for database system accounts Step 6: Leave Storage Type on File System and choose "Use Database File Locations from Template" Step 7: Leave default values for everything Step 8: Select database components you want to use in your database. If in doubt, leave unchanged. Step 9: Memory tab: Choose available amount of memory Oracle and leave checked "Use Automatic Memory Management" Step 9: Sizing tab: leave default values Step 9: Character Sets tab: Choose the database character set. Oracle recommends that you use Unicode AL32UTF8 as the database character set. Also pick your Language and Territory. Step 9: Connection Mode: Leave at Dedicated server Mode Step 10: You can safely hit "Next". You can always add or modify these things later. Step 11: Leave "Create Database" checked. It won't hurt to save template and generate scripts, too. Hit "Finish" and enjoy. 4.4. Starting database servicesIn order to use provided dbstart and dbshut scripts to start and shut down Oracle instance, you should modify the/etc/oratab file.Find the line in /etc/oratab that looks similar to this:
ora11:/u01/app/oracle/product/11.2.0/dbhome_1:NChange the last field (N) to Y, and you will be able to start the database using dbstart utility. Start TNS Listener: [oracle@n001914 ~]$ lsnrctl startYou can start the database via dbstart utility: [oracle@n001914 ~]$ dbstartor via SQL*Plus: [oracle@n001914 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Pet Lis 23 13:12:18 2009 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 1252663296 bytes Fixed Size 2212936 bytes Variable Size 822086584 bytes Database Buffers 419430400 bytes Redo Buffers 8933376 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 [oracle@n001914 ~]$Start Enterprise manager server (optional): [oracle@n001914 ~]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. http://n001914.in2.hr:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ................ started. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/n001914.in2.hr_ora11/sysman/log [oracle@n001914 ~]$Now you cal log on to Enterprise manager console by entering the following URL in your favorite browser: http://your.server.name.here:1158/em
4.5. Stopping database servicesStop Enterprise manager server:[oracle@n001914 ~]$ emctl stop dbconsoleYou can stop the database via dbshut utility: [oracle@n001914 ~]$ dbshutor via SQL*Plus: [oracle@n001914 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Pet Lis 23 13:21:39 2009 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 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 [oracle@n001914 ~]$Stop TNS listener: [oracle@n001914 ~]$ lsnrctl stop 4.6 Automating oracle startup and shutdownTo automatically start/shut oracle database during system startup/shutdown you need to write a script in/etc/rc.d/init.d directory. You can view or
Download an example
script.This script is written for oracle 10g, but it is very simple to modify (and rename to let's say oracle11 :) Copy the script to /etc/rc.d/init.d as root user, edit
environment variables to match your settings and modify its
permissions:
[root@denisnb ~]# chown root:root /etc/rc.d/init.d/ora10 [root@denisnb ~]# chmod 755 /etc/rc.d/init.d/ora10This startup/shutdown script uses chkconfig utility to simplify
service management. It is configured to start oracle services in
runlevels 3 and 5,with start priority 95 and stop priority 1.Initialize new service: [root@denisnb ~]# chkconfig ora10 reset [root@denisnb ~]# chkconfig --list ora10 ora10 0:off 1:off 2:off 3:on 4:off 5:on 6:offNow oracle services will be automatically started when entering runlevels 3 and 5, and shut down when entering any other runlevel. For more information on chkconfig utility refer to its man page. To manually start/stop oracle services you can use [root@denisnb ~]# service ora10 startand [root@denisnb ~]# service ora10 stop |
| Home -> oracle -> Oracle 10g release 1 (10.1.0.2) on Fedora core 3 (FC3) |
|
|
|