Logo
Logo
Logo
Oracle Database
Quick Installation Guide 11g Release 2 (11.2) for Linux x86 E24324-03 September 2012 This guide describes how to quickly install Oracle Database 11g Release 2 (11.2) on Linux x86 systems. It includes information about the following:
Reviewing Information About This Guide Logging In to the System as root Checking the Hardware Requirements Checking the Software Requirements Creating Required Operating System Groups and Users Configuring Kernel Parameters Creating Required Directories Configuring the oracle User's Environment Mounting the Product Disc Installing Oracle Database Installing Oracle Database Examples What to Do Next? Additional Information Documentation Accessibility
Configure your system to support Oracle Database Install Oracle Database on a local file system by using the Typical Installation option Configure a general-purpose Oracle Database installation that uses the local file system for database file storage
The database that you created and the default Oracle Net listener process run on the system. Oracle Enterprise Manager Database Control run on the system and can be accessed by using a Web browser.
Using the Advanced Installation option to install the software Installing the software on a system that has an existing Oracle software installation Installing Oracle Clusterware and Oracle Real Application Clusters on a cluster Enabling Enterprise Manager e-mail notifications or automated backups Enabling core file creation Verifying UDP and TCP kernel parameters Using alternative storage options such as Oracle Automatic Storage Management Installing and configuring Oracle Grid Infrastructure
If you want to install the software on a single system, then refer to Oracle Database Installation Guide for Linux. If you want to install Oracle Grid Infrastructure for a standalone server, then refer to the "Oracle Grid Infrastructure" chapter in Oracle Database Installation Guide for Linux. If you want to perform an Oracle Real Application Clusters installation, then refer to Oracle Grid Infrastructure Installation Guide for Linux and Oracle Real Application Clusters Installation Guide for Linux and UNIX. These guides describe
how to install Oracle Clusterware and Oracle Real Application Clusters. Oracle clusterware is a prerequisite for Oracle Real Application Clusters installations. All these guides are available on the product disc. To access them, use a Web browser to open the welcome.htm file located in the top-level directory of the media. Platformspecific documentation is available in PDF and HTML formats in the Documentation section..
Following are the steps for installing the software from an X Window System workstation, or X terminal: 1. Start a local terminal session, for example, an X terminal (xterm). 2. If you are not installing the software on the local system, then enter the following command to enable the remote host to display X applications on the local X server:
3. $ xhost fully_qualified_remote_host_name
For example:
$ xhost somehost.us.example.com
4. If you are not installing the software on the local system, then use the ssh, rlogin, or telnet command to connect to the system where you want to install the software:
5. $ telnet fully_qualified_remote_host_name
6. If you are not logged in as the root user, then enter the following command to switch user to root:
7. $ sudo sh 8. password: 9. #
Following are the steps for installing the software from a PC or other system with X server software: Note:
If necessary, refer to your X server documentation for more information about completing this procedure. Depending on the X server software that you are using, you may have to complete the tasks in a different order.
1. Start the X server software. 2. Configure the security settings of the X server software to permit remote hosts to display X applications on the local system. 3. Connect to the remote system where you want to install the software and start a terminal session on that system, for example, an X terminal (xterm). 4. If you are not logged in as the root user on the remote system, then enter the following command to switch user to root:
5. $ sudo sh 6. password: 7. #
Minimum: 1 GB of RAM Recommended: 2 GB of RAM or more To determine the RAM size, enter the following command:
# grep MemTotal /proc/meminfo
If the size of the RAM is less than the required size, then you must install more memory before continuing.
The following table describes the relationship between installed RAM and the configured swap space recommendation: Note:
On Linux, the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. If you enable HugePages, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space.
Swap Space Required 1.5 times the size of the RAM Equal to the size of the RAM 16 GB
To determine whether the system architecture can run the software, enter the following command:
# uname -m
Note:
This command displays the processor type. Verify that the processor architecture matches the Oracle software release to install. If you do not see the expected output, then you cannot install the software on this system.
To determine the size of the configured swap space, enter the following command:
# grep SwapTotal /proc/meminfo
If necessary, refer to the operating system documentation for information about how to configure additional swap space. To determine the available RAM and swap space, enter the following command:
# free
IMPORTANT:
Oracle recommends that you take multiple values for the available RAM and swap space before finalizing a value. This is because the available RAM and swap space keep changing depending on the user interactions with the computer. Contact your operating system vendor for swap space allocation guidance for your server. The vendor guidelines supersede the swap space requirements listed in this guide.
Automatic Memory Management Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
To determine the amount of shared memory available, enter the following command:
# df -k /dev/shm/
Note:
and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.
MEMORY_MAX_TARGET
/tmp
directory.
/tmp
If there is less than 1 GB of free disk space available in the complete one of the following steps:
o o
/tmp
directory, then
Delete unnecessary files from the /tmp directory to meet the disk space requirement. Set the TMP and TMPDIR environment variables when setting the oracle user's environment. See Also:
"Configuring the oracle User's Environment" for more information about setting TMP andTMPDIR
Extend the file system that contains the /tmp directory. If necessary, contact the system administrator for information about extending file systems. To determine the amount of free disk space on the system, enter the following command:
o
# df -h
The following tables describe the disk space requirements for software files, and data files for each installation type on Linux x86:
Installation Type Enterprise Edition Requirement for Software Files (GB) 3.95
Additional disk space, either on a file system or on an Oracle Automatic Storage Management disk group is required for the fast recovery area if you choose to configure automated backups.
Operating System Requirements Kernel Requirements Package Requirements Compiler Requirements Additional Software Requirements
Note:
Oracle Universal Installer (OUI) performs checks on the system to verify that it meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer.
Asianux Server 3 SP2 Oracle Linux 4 Update 7 Oracle Linux 5 Update 2 Oracle Linux 6 Red Hat Enterprise Linux 4 Update 7 Red Hat Enterprise Linux 5 Update 2 Red Hat Enterprise Linux 6
Starting with Oracle Database 11g Release 2 (11.2), the Security Enhanced Linux (SE Linux) feature is supported for Oracle Linux 4, Red Hat Enterprise Linux 4, Oracle Linux 5, and Red Hat Enterprise Linux 5. Note:
For Asianux Server, Oracle Linux, and Red Hat Enterprise Linux, system requirements are identical by kernel version. Specifically:
Oracle Linux 4 and Red Hat Enterprise Linux 4 requirements are the same. Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 requirements are the same.
To determine the distribution and version of Linux installed, enter the following command:
# cat /proc/version
Note:
Only the distributions and versions listed in the earlier list are supported. Do not install the software on other versions of Linux.
For Oracle Linux 4 and Red Hat Enterprise Linux 4: 2.6.9 or later
For Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5: 2.6.18 or later
To determine whether the required kernel is installed, enter the following command:
# uname -r
The following is a sample output displayed by running this command on an Oracle Linux 5.0 system:
2.6.18-128.el5PAE
In this example, the output shows the kernel version (2.6.18) and errata level (128.el5PAE) on the system. If the kernel version does not meet the requirement specified earlier in this section, then contact the operating system vendor for information about obtaining and installing kernel updates.
Oracle recommends that you install your Linux operating system with the default software packages (RPMs), unless you specifically intend to perform a minimal installation, and follow the directions for performing such an installation to ensure that you have all required packages for Oracle software. Oracle recommends that you do not customize RPMs during a default operating system installation. A default installation includes most required packages, and helps you to limit manual checks of package dependencies. If you did not perform a default Linux installation, you intend to use LDAP, and you want to use the scripts odisrvreg, oidca, or schemasync, then install the Korn shell RPM for your Linux distribution. You must install the packages (or later versions) listed in the following table. Also, ensure that the list of RPMs and all the prerequisites for these RPMs are installed.
The following or later version of packages for Oracle Linux 4 and Red Hat Enterprise Linux 4 should be installed:
binutils-2.15.92.0.2 compat-libstdc++-33-3.2.3 elfutils-libelf-0.97 elfutils-libelf-devel-0.97 gcc-3.4.6 gcc-c++-3.4.6 glibc-2.3.4-2.41 glibc-common-2.3.4 glibc-devel-2.3.4 glibc-headers-2.3.4 libaio-devel-0.3.105 libaio-0.3.105 libgcc-3.4.6 libstdc++-3.4.6 libstdc++-devel-3.4.6 make-3.80 numactl-0.6.4.i386 pdksh-5.2.14 sysstat-5.0.5
The following or later version of packages for Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 should be installed:
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81 sysstat-7.0.2
The following or later version of packages for Oracle Linux 6, and Red Hat Enterprise Linux 6 should be installed:
binutils-2.20.51.0.2-5.11.el6.i686 compat-libcap1-1.10-1.i686 compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6.i686 gcc-c++-4.4.4-13.el6.i686 glibc-2.12-1.7.el6.i686 glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6.i686 libstdc++-4.4.4-13.el6.i686 libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6.i686 make-3.81-19.el6.i686 sysstat-9.0.4-11.el6.i686
The following or later version of packages for SUSE Linux Enterprise Server 10 should be installed:
binutils-2.16.91.0.5 compat-libstdc++-5.0.7 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.4-31.63 glibc-devel-2.4-31.63 ksh-93r-12.9 libaio-0.3.104 libaio-devel-0.3.104 libelf-0.8.5 libgcc-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.80 sysstat-8.0.4
The following or later version of packages for SUSE Linux Enterprise Server 11 should be installed:
binutils-2.19 gcc-4.3 gcc-c++-4.3 glibc-2.9 glibc-devel-2.9 ksh-93t libstdc++33-3.3.3 libstdc++43-4.3.3_20081022 libstdc++43-devel-4.3.3_20081022 libaio-0.3.104 libaio-devel-0.3.104 libgcc43-4.3.3_20081022 libstdc++-devel-4.3 make-3.81 sysstat-8.1.5
Note:
The kernel-headers-2.6.18 package is not mandatory for database installations on Linux x86. You can ignore the OUI or Cluster Verification Utility (CVU) warning to install this package. The numa package link for Linux x86 is /usr/lib.
To determine whether the required packages are installed, enter commands similar to the following:
# rpm -q package_name
If a package is not installed, then install it from the Linux distribution media or download the required package version from the Linux vendor's Web site.
Oracle XML Developer's Kit is supported with the same compilers as OCCI.
Oracle ODBC Drivers Oracle JDBC/OCI Drivers Linux-PAM Library Oracle Messaging Gateway Programming Languages Browser Requirements
4.5.1 Oracle ODBC Drivers You should install ODBC Driver Manager for UNIX. You can download and install the Driver Manager from the following URL:
http://www.unixodbc.org
To use ODBC, you must also install the following additional 32-bit ODBC RPMs, depending on your operating system:
On Oracle Linux 4 and Red Hat Enterprise Linux 4: o unixODBC-2.2.11 (32-bit) or later o unixODBC-devel-2.2.11 (32-bit) or later On Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5: o unixODBC-2.2.11 (32-bit) or later o unixODBC-devel-2.2.11 (32-bit) or later On Oracle Linux 6 and Red Hat Enterprise Linux 6:
unixODBC-2.2.14-11.el6.i686 or later unixODBC-devel-2.2.14-11.el6.i686 or later
On SUSE Linux Enterprise Server 10: or later unixODBC-devel-32bit-2.2.11 (32-bit) or later On SUSE Linux Enterprise Server 11: o unixODBC-32bit-2.2.12 (32-bit) or later o unixODBC-devel-32bit-2.2.12 (32-bit) or later
o o
unixODBC-32bit-2.2.11 (32-bit)
4.5.2 Oracle JDBC/OCI Drivers Use JDK 6 (Java SE Development Kit 1.6.0_21) or JDK 5 (1.5.0_24) with the JNDI extension with the Oracle Java Database Connectivity and Oracle Call Interface drivers. However, these are not mandatory for the database installation. IBM JDK 1.5 is installed with this release. 4.5.3 Linux-PAM Library Install the latest Linux-PAM (Pluggable Authentication Modules for Linux) library to enable the system administrator to choose how applications authenticate users. 4.5.4 Oracle Messaging Gateway Oracle Messaging Gateway supports the integration of Oracle Streams Advanced Queuing (AQ) with the following software:
IBM WebSphere MQ V6.0, client and server, with corrective service diskette 5 (CSD05) or later:
MQSeriesClient MQSeriesServer MQSeriesRuntime
If you require a CSD for WebSphere MQ, then refer to the following Web site for download and installation information:
http://www-947.ibm.com/support/entry/portal/Downloads/Software/WebSphere/WebSphere_MQ
4.5.5 Programming Languages The following products are certified for use with:
4.5.6 Browser Requirements Web browsers must support Java Script, and the HTML 4.0 and CSS 1.0 standards. The following Web browsers are supported for Oracle Enterprise Manager Database Control: Netscape Navigator 8.1 Netscape Navigator 9.0 Microsoft Internet Explorer Microsoft Internet Explorer Microsoft Internet Explorer Microsoft Internet Explorer Firefox 2.0 Firefox 3.0.7 Firefox 3.5 Firefox 3.6 Safari 3.0.4 Safari 3.1 Safari 3.2 Safari 4.0.x Google Chrome 3.0 Google Chrome 4.0 See Also:
Chapter 2, "Oracle Application Express Installation Requirements" and "Recommended Preinstallation Tasks" in Oracle Application Express Installation Guide
oinstall)
The OSDBA group (typically, dba) The Oracle software owner (typically, oracle) The OSOPER group (optional. Typically, oper)
To determine whether these groups and users exist, and if necessary, to create them, follow these steps: 1. To determine whether the
2. # more /etc/oraInst.loc oinstall
If the oraInst.loc file exists, then the output from this command is similar to the following:
inventory_loc=/u01/app/oraInventory inst_group=oinstall
The inst_group parameter shows the name of the Oracle Inventory group, oinstall. 3. To determine whether the
4. # grep dba /etc/group dba
5. If necessary, enter the following commands to create the oinstall and dba groups:
6. # /usr/sbin/groupadd oinstall 7. # /usr/sbin/groupadd dba
8. To determine whether the oracle user exists and belongs to the correct groups, enter the following command:
9. # id oracle
If the oracle user exists, then this command displays information about the groups to which the user belongs. The output should be similar to the following, indicating that oinstall is the primary group and dba is a secondary group:
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
10.If necessary, complete one of the following actions: o If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:
o
# /usr/sbin/usermod -g oinstall -G dba oracle
o o
If the it:
oracle
This command creates the oracle user and specifies primary group and dba as the secondary group. 11. Enter the following command to set the password of the
12. # passwd oracle
oinstall
as the
oracle
user:
File
/proc/sys/kernel/sem
Maximum: A value that is 1 byte less than 4 GB, or 4294967295 Recommended: More than half the physical memory See My Oracle Support Note 567506.1 for additional information about configuringshmmax.
shmmni
4096
/proc/sys/kernel/shmmni
Parameter
file-max ip_local_port_range
File
/proc/sys/fs/file-max /proc/sys/net/ipv4/ip_local_port_range
Maximum: 65500
rmem_default rmem_max wmem_default wmem_max aio-max-nr
Note: This value limits concurrent outstanding requests and should be set to avoid I/O subsystem failures.
Note:
If the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter.
To view the current value specified for these kernel parameters and to change them if necessary:
Enter commands similar to the following to view the current values of the kernel parameters: Note:
Make a note of the current values and identify any values that you must change. Parameter
semmsl, semmns, semopm,
Command
# /sbin/sysctl -a | grep sem
andsemmni
This command displays the value of the semaphore parameters in the order listed.
Parameter
shmall, shmmax, file-max ip_local_port_range rmem_default rmem_max wmem_default wmem_max
If the value of any kernel parameter is different from the recommended value, then complete the following steps: 1. Using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following: Note:
Include lines only for the kernel parameter values to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current values are larger than the minimum value, then specify the larger value.
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 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 = 1048576
By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system. However, on SUSE Linux Enterprise Server systems, enter the following command to ensure that the system reads the/etc/sysctl.conf file when it restarts:
# /sbin/chkconfig boot.sysctl on
2. Enter the following command to change the current values of the kernel parameters:
3. # /sbin/sysctl -p
Review the output from this command to verify that the values are correct. If the values are incorrect, edit the /etc/sysctl.conf file, then enter this command again. 4. Enter the command /sbin/sysctl -a to confirm that the values are set correctly. 5. On SUSE Linux Enterprise Server systems only, enter the following command to cause the system to read the/etc/sysctl.conf file when it restarts:
6. # /sbin/chkconfig boot.sysctl on
7. On SUSE Linux Enterprise Server systems only, you must enter the GID of the oinstall group as the value for the parameter /proc/sys/vm/hugetlb_shm_group. Doing this grants members of oinstall a group permission to create shared memory segments. For example, where the oinstall group GID is 501:
# echo 501 > /proc/sys/vm/hugetlb_shm_group
After running this command, use vi to add the following text to /etc/sysctl.conf, and enable the boot.sysctlscript to run on system restart:
vm.hugetlb_shm_group=501
Note:
Only one group can be defined as the vm.hugetlb_shm_group.
8. After updating the values of kernel parameters in the /etc/sysctl.conf file, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl.conf file available in the active kernel memory.
Hard Limit
Open file descriptors Number of processes available to a single user Size of the stack segment of the process
To check resource limits: 1. Log in as an installation owner. 2. Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range. For example:
3. 4. 5. 6. $ ulimit -Sn 4096 $ ulimit -Hn 65536
7. Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range. For example:
8. $ ulimit -Su 9. 2047 10. $ ulimit -Hu 11. 16384 12.
13.Check the soft limit for the stack setting. Ensure that the result is in the recommended range. For example:
14. $ ulimit -Ss 15. 10240 16. $ ulimit -Hs 17. 32768
18.Repeat this procedure for each Oracle software installation owner. If necessary, update the resource limits in the /etc/security/limits.conf configuration file for the installation owner. For example, add the following lines to the /etc/security/limits.conf file:
oracle oracle oracle oracle oracle soft hard soft hard soft nproc nproc nofile nofile stack 2047 16384 1024 65536 10240
Note:
The values mentioned in this example are illustrative and not actual values that must be added.
When the limits.conf file is changed, these changes take effect immediately. However, if thegrid or oracle users are logged in, then these changes do not take effect until you log these users out and log them back in. You must do this before you attempt to use these accounts to install.
The Oracle base directory must have 4 GB of free disk space, or 6 GB of free disk space if you choose not to create a separate Oracle data file directory. Note:
If you do not want to create a separate Oracle data file directory, then you can install the data files in a subdirectory of the Oracle base directory. However, this is not recommended for production databases.
To create the Oracle base directory: 1. Enter the following command to display information about all mounted file systems:
2. # df -h
This command displays information about all the file systems mounted on the system, including: The physical device name The total amount, used amount, and available amount of disk space The mount point directory for that file system 3. From the display, identify either one or two file systems that meet the disk space requirements mentioned earlier in this section. 4. Note the name of the mount point directory for each file system that you identified. 5. Enter commands similar to the following to create the recommended subdirectories in the mount point directory that you identified and set the appropriate owner, group, and permissions on them:
o o o 6. # mkdir -p /mount_point/app/ 7. # chown -R oracle:oinstall /mount_point/app/ 8. # chmod -R 775 /mount_point/app/
For example:
Set the default file mode creation mask (umask) to Set the DISPLAY environment variable.
oracle
022
To set the
user's environment:
1. Start a new terminal session, for example, an X terminal (xterm). 2. Enter the following command to ensure that X Window applications can display on this system:
3. $ xhost fully_qualified_remote_host_name
For example:
$ xhost somehost.us.example.com
4. If you are not logged in to the system where you want to install the software, then log in to that system as the oracleuser. 5. If you are not logged in as the oracle user, then switch user to oracle:
6. $ su - oracle
oracle
9. To run the shell startup script, enter one of the following commands: o Bash shell:
o o o o o
$ . ./.bash_profile
C shell:
% source ./.login
10. If you are not installing the software on the local computer, then run the following command on the remote computer to set the DISPLAY variable: o Bourne, Bash or Korn shell:
o o o
$ export DISPLAY=local_host:0.0
C shell:
% setenv DISPLAY local_host:0.0
In this example, local_host is the host name or IP address of the local computer to use to display Oracle Universal Installer.
Run the following command on the remote computer to check if the shell and the DISPLAY environmental variable are set correctly:
echo $SHELL echo $DISPLAY
Now to enable X applications, run the following commands on the local computer:
$ xhost + fully_qualified_remote_host_name
To verify that X applications display is set properly, run a X11 based program that comes with the operating system such as xclock:
$ xclock
In this example, you can find xclock at /usr/X11R6/bin/xclocks. If the DISPLAY variable is set properly, then you can see xclock on your computer screen. See Also:
PC-X Server or operating system vendor documents for further assistance
11. If you determined that the /tmp directory has less than 1 GB of free disk space, then identify a file system with at least 1 GB of free space and set the TMP and TMPDIR environment variables to specify a temporary directory on this file system: To determine the free disk space on each mounted file system use the following command:
a.
If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:
c. d. $ sudo mkdir /mount_point/tmp e. $ sudo chmod a+wr /mount_point/tmp f. # exit
b. # df -h /tmp
Enter commands similar to the following to set the variables: Bourne, Bash, or Korn shell:
g.
$ TMP=/mount_point/tmp $ TMPDIR=/mount_point/tmp $ export TMP TMPDIR
TMP
and
TMPDIR
environment
C shell:
% setenv TMP /mount_point/tmp % setenv TMPDIR /mount_point/tmp
2. Enter commands similar to the following to set the ORACLE_SID environment variables: o Bourne, Bash, or Korn shell:
o o o o o o
$ ORACLE_BASE=/u01/app/oracle $ ORACLE_SID=sales $ export ORACLE_BASE ORACLE_SID
ORACLE_BASE and
C shell:
% setenv ORACLE_BASE /u01/app/oracle % setenv ORACLE_SID sales
In this example, /u01/app/oracle is the Oracle base directory that you created or identified earlier and sales is the database name (typically no more than five characters). 12. Enter the following commands to ensure that the ORACLE_HOME and TNS_ADMIN environment variables are not set: o Bourne, Bash, or Korn shell:
o o o o o
$ unset ORACLE_HOME $ unset TNS_ADMIN
C shell:
% unsetenv ORACLE_HOME % unsetenv TNS_ADMIN
Note:
If the ORACLE_HOME environment variable is set, then Oracle Universal Installer uses the value that it specifies as the default path for the Oracle home directory. However, if you set theORACLE_BASE environment variable, then Oracle recommends that you unset the ORACLE_HOMEenvironment variable and choose the default path suggested by Oracle Universal Installer.
and
/media/dvd
3. To verify that the disc mounted automatically, enter a command similar to the following: o Asianux, Oracle Linux, and Red Hat Enterprise Linux:
o o o
# ls /mnt/dvd
4. If this command fails to display the contents of the disc, then enter a command similar to the following: o Asianux, Oracle Linux, and Red Hat Enterprise Linux:
o o o
# mount -t iso9660 /dev/dvd /mnt/dvd
and
/media/dvd
If Oracle Universal Installer does not start, then refer to Oracle Database Installation Guide for information about how to troubleshoot X Window display problems. 3. The following table describes the recommended action for each Oracle Universal Installer screen. Use the following guidelines to complete the installation: o If you need more assistance, or if you want to choose an option that is not a default, then click Help for additional information. o If you encounter errors while installing or linking the software, then refer to Oracle Database Installation Guide for information about troubleshooting. Note:
If you have completed the tasks listed previously, then you can complete the installation by choosing the default values on most screens. Screen Configure Recommended Action Enter your e-mail address, preferably your My Oracle Support e-mail
You can select the I wish to receive security updates via My Oracle Support check box to receive security updates. Enter your My Oracle Support password in the My Oracle Support Passwordfield. Click Next.
Starting with Oracle Database 11g Release 2 (11.2.0.2), you can use the Software Updates feature to dynamically download and apply latest updates. Select one of the following options and click Next:
Use My Oracle Support credentials for download: Select this option to download and apply the latest software updates. Click Proxy Settings to configure a proxy for Oracle Universal Installer to use to connect to the Internet. Provide the proxy server information for your site, along with a user account that has access to the local area network through which the server is connecting. Starting with Oracle Database 11gRelease 2 (11.2.0.3), you can enter the Proxy Realm information if required. The proxy realm information is case-sensitive. Click Test Connection to ensure that your proxy settings are correctly entered, and the installer can download the updates. o Use pre-downloaded software updates: Select this option to apply previously downloaded software updates. o Skip Software Updates: Select this option if you do not want to apply any updates.
o
This screen is displayed if you select to download the software updates or provide the pre-downloaded software downloads location.
If you selected Use My Oracle Support credentials for download in the previous screen, select Download and apply all updates, and then click Next. If you selected Use pre-downloaded software updates in the previous screen, select Apply all updates, and then click Next.
Select Create and configure a database from the following list of available options, then click Next:
o o o
Create and configure a database Install database software only Upgrade an existing database
System Class Select Server Class from the following options to install the database, and clickNext.
o
Screen
Recommended Action
or desktop class system. o Server Class: Choose this option if you are installing on a server class system, such as what you would use when deploying Oracle in a production data center.
Grid Installation Options Select Single instance database installation for the type of database installation you want to perform, and click Next.
Single instance database installation: This option installs the database and the listener. o Real Application Clusters database installation: This option installs Oracle Real Application Clusters. o Oracle RAC One Node database installation: This option installs the Oracle RAC One Node database. Note: Oracle RAC One Node is supported only with Oracle Clusterware.
o
Select Install Select Typical Install as the installation type from the following Type options, and clickNext:
Typical Install: This installation method is selected by default. It lets you quickly install Oracle Database using minimal input. o Advanced Install: This installation method enables to perform more complex installations.
o
Typical Enter the following information according to your requirements: Install Configuratio Oracle base: The Oracle base path appears by default. You can change the path based on your requirement. n
Software location: In the Software Location section, accept the default value or enter the Oracle home directory path in which you want to install Oracle components. The directory path should not contain spaces. Storage Type: Select File System, or Oracle Automatic Storage Management as the database storage option. Database file location: If you select File System as your storage type, then clickBrowse and specify a database file location. ASMSNMP Password: If you select Oracle Automatic Storage Management as your Storage Type, then specify the password for the ASMSNMP user. Database edition: Select the database edition to install. OSDBA Group: The OSDBA group is selected by default. You can also select the OSDBA group from the list. Global database name: Specify the Global Database Name using the following syntax:
database_name.domain
For example, sales.us.example.com Administrative password: Enter the password for the privileged database account. Confirm Password: Reenter, and confirm the password for the privileged database
Screen
Recommended Action
Specify the full path of the Oracle Inventory directory. Ensure that the operating system group selected is oinstall. Click Next to continue.
Perform Prerequisite Checks Verify that all the prerequisite checks succeed, and then click Next.
Oracle Universal Installer checks the system to verify that it is configured correctly to run Oracle software. If you have completed all the preinstallation steps in this guide, all the checks should pass. If a check fails, then review the cause of the failure listed for that check on the screen. If possible, rectify the problem and rerun the check. Alternatively, if you are satisfied that your system meets the requirements, then you can select the check box for the failed check to manually verify the requirement. Note: Oracle recommends that you use caution in checking the Ignore All option. If you check this option, then Oracle Universal Installer may not confirm if your system can install Oracle Database successfully.
Review the information displayed on this screen, and then click Install.
Summary
Note: Starting with Oracle Database 11g Release 2 (11.2), you can save all the installation steps into a response file by clicking Save Response File. Later, this file can be used for a silent installation.
Install Product This screen states the progress of a database installation. After the database is installed, you are prompted to execute some root configuration script for new inventory as the root user. Click Next.
This screen then displays the status information for the configuration assistants that configure the software and create a database. Finally, a message is displayed at the end of Database Configuration Assistant process, and click OK. Execute the root.sh script as the root user to complete the installation and clickOK.
Finish This screen is shown automatically when all the configuration tools are successful.
Click Close.
Oracle JDBC Development Drivers Oracle Database Examples Various Oracle product demonstrations
For information about installing software and various Oracle product demonstrations from the Oracle Database Examples media, refer to Oracle Database Examples Installation Guide.
12 What to Do Next?
To become familiar with this release of Oracle Database, it is recommended that you complete the following tasks:
Log in to Oracle Enterprise Manager Database Control using a Web browser. Oracle Enterprise Manager Database Control is a Web-based application that you can use to manage a single Oracle Database installation. The default URL for Database Control is similar to the following:
http://host.domain:1158/em/
To log in, use the user name SYS and connect as SYSDBA. Use the password that you specified for this user during the Oracle Database 11g installation.
Refer to Oracle Database Installation Guide for Linux for information about required and optional postinstallation tasks, depending on the products to use. Refer to Oracle Database Installation Guide for Linux for information about how to use Database Control to learn about the configuration of your installed database. To learn more about using Oracle Enterprise Manager Database Control to administer a database, refer to Oracle Database 2 Day DBA. This guide, designed for new Oracle DBAs, describes how to use Database Control to manage all aspects of an Oracle Database installation. It also provides information about how to enable e-mail notifications and automated backups, which you might not have configured during the installation.
13 Additional Information
Product Licenses Purchasing Licenses, and Version Updates Contacting Oracle Support Services Locating Product Documentation
Product Licenses
You are welcome to install and evaluate the products included in this media pack for 30 days under the terms of the Trial License Agreement. However, you must purchase a program license if you want to continue using any product after the 30 day evaluation period. See the following section for information about purchasing program licenses.
On the Oracle Database Documentation Library media: Use a Web browser to view or open the on the media.
index.htm
To view PDF documents, download the free Adobe Acrobat Reader from the Adobe Web site, if necessary:
http://www.adobe.com
14 Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website athttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc. Access to Oracle Support Oracle customers have access to electronic support through My Oracle Support. For information, visithttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Oracle Database Quick Installation Guide, 11g Release 2 (11.2) for Linux x86 E24324-03 Copyright 2006, 2012, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license
restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
So
what
are
these
parameters
SHMMAX
and
SHMALL?
SHMMAX is the maximum size of a single shared memory segment set in bytes.
silicon:~ # 536870912
cat /proc/sys/kernel/shmmax
SHMALL is the total size of Shared Memory Segments System wide set in pages. silicon:~ # 1415577 cat /proc/sys/kernel/shmall
The key thing to note here is the value of SHMMAX is set in "bytes" but the value of SHMMALL is set in "pages". Whats the optimal value for SHMALL?
As SHMALL is the total size of Shard Memory Segments System wide, it should always be less than the Physical Memory on the System and should also be less than sum of SGAs of all the oracle databases on the server. Once this value (sum of SGAs) hit the limit, i.e. the value of shmall, then any attempt to start a new database (or even an existing database with a resized SGA) will result in an out of memory error (below). This is because there wont be any more shared memory segments that Linux can allocate for SGA. ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device.
So above can happen for two reasons. Either the value of shmall is not set to an optimal value or you have reached the threshold on this server. Setting the value for SHMALL to optimal is straight forward. All you want to know is how much Physical Memory (excluding Cache/Swap) you have on the system and how much of it should be set aside for Linux Kernel and to be dedicated to Oracle Databases. For e.g. Let say the Physical Memory of a system is 6GB, out of which you want to set aside 1GB for Linux Kernel for OS Operations and dedicate the rest of 5GB to Oracle Databases. Then heres how you will get the value for SHMALL. Convert this 5GB to bytes and divide by page size. Remember SHMALL should be set in pages not bytes. So here goes the calculation.
Determine Page Size first, can be done in two ways. In my case its 4096 and thats the recommended and default in most cases which you can keep the same.
4096
or
silicon:~ # cat /proc/sys/kernel/shmmni 4096 Convert 5GB into bytes and divide by page size, I used the linux calc to do the math.
silicon:~ # echo "1310720" > /proc/sys/kernel/shmall silicon:~ # sysctl p Verify if the value has been taken into effect. silicon:~ # sysctl -a | grep shmall kernel.shmall = 1310720 Another way to look this up is silicon:~ # ipcs -lm ------ Shared Memory Limits -------max number of segments = 4096 max seg size (kbytes) = 524288 max total shared memory (kbytes) = 5242880 min seg size (bytes) = 1 /* SHMMNI /* SHMMAX */ /* SHMALL */ */
To keep the value effective after every reboot, add the following line to /etc/sysctl.conf
echo kernel.shmall = 1310720 >> /etc/sysctl.conf Also verify if sysctl.conf is enabled or will be read during boot. silicon:~ # chkconfig boot.sysctl boot.sysctl on If returns off, means its disabled. Turn it on by running silicon:~ # chkconfig boot.sysctl on boot.sysctl on Whats the optimal value for SHMMAX? Oracle makes use of one of the 3 memory management models to create the SGA during database startup and it does this in following sequence. First Oracle attempts to use the one-segment model
and if this fails, it proceeds with the next one which's the contiguous multi-segment model and if that fails too, it goes with the last option which is the non-contiguous multi-segment model. So during startup it looks for shmmax parameter and compares it with the initialization parameter *.sga_target. If shmmax > *.sga_target, then oracle goes with one-segment model approach where the entire SGA is created within a single shared memory segment. But the above attempt (one-segment) fails if SGA size otherwise *.sga_target > shmmax, then Oracle proceeds with the 2nd option contiguous multi-segment model. Contiguous allocations, as the name indicates are a set of shared memory segments which are contiguous within the memory and if it can find such a set of segments then entire SGA is created to fit in within this set.
But if cannot find a set of contiguous allocations then last of the 3 options is chosen non-contiguous multi-segment allocation and in this Oracle has to grab the free memory segments fragmented between used spaces. So lets say if you know the max size of SGA of any database on the server stays below 1GB, you can set shmmax to 1 GB. But say if you have SGA sizes for different databases spread between 512MB to 2GB, then set shmmax to 2Gigs and so on. Like SHMALL, SHMMAX can be defined by one of these methods.. Dynamically reset and reload it to the kernel..
silicon:~ # echo "536870912" > /proc/sys/kernel/shmmax silicon:~ # sysctl p -- Dynamically reload the parameters.
To permanently set so its effective in reboots silicon:~ # echo "kernel.shmmax=536870912" >> /etc/systctl.conf
Install doc for 11g recommends the value of shmmax to be set to "4GB 1byte" or half the size of physical memory whichever is lower. I believe 4GB 1byte is related to the limitation on the 32 bit (x86) systems where the virtual address space for a user process can only be little less than 4GB. As theres no such limitation for 64bit (x86_64) bit systems, you can define SGAs larger than 4 Gigs. But idea here is to let Oracle use the efficient one-segment model and for this shmmax should stay higher than SGA size of any individual database on the system.
4 0x0052e2c1 98304
Finally, I can see how much my postgres is claiming based on my configuration! These are baby steps towards understanding these settings I have questions: 1. Is all of shared memory shared across processes? Or is a single segment block completely reserved for a process? The name implies sharing then what happens as we reach the maximum and multiple processes have shared_memory settings? I assume it doesnt actually /consume/ memory, and each process can use up TO the amount available via your shared memory setting. 2. Do we start swapping into virtual memory if shmmall is too low even if we have ram? It sounds like shared memory is a certain subset of memory the system can allocate via the shmmall parameter, and that each process can consume up to the amount specified in its config files. So why have a limit on shmmax? A safeguard against individual process settings with huge default shared memory reservations?
Within the following procedure, the range of prescribed values for each kernel parameter is provided. Where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams).
Ideally, if the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter. In any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question. Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose. To set the kernel parameters for Linux Complete the following steps.
1. 2. 3.
Review the current semaphore parameters in the sem file (by entering cat sem , for example). The output provides the current value for the following parameters in the order listed: SEMMSL, SEMMNS, SEMOPM, and SEMMNI. For example: 250 32000 32 128 In this example, SEMMSL=250, SEMMNS=32000, SEMOPM=32, and SEMMNI=128
4.
Where required, replace each parameter variable with the appropriate value for the parameter. Be sure to use the following table to determine a value that falls within the prescribed range of values for the parameter. If the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter.
If '*" appears after the parameter name, this indicates that you can increment the value of the parameter ba number of desired streams by using the formula parameter value = 64 * number of desired streams as long as the "high-end" value of the range for the parameter is not exceeded. Parameter SEMMSL* Purpose Defines the minimum recommended semaphore value Defines the maximum semaphores in the system Possible Range of Values 1 2147483647 [MAXINT]
SEMMNS*
1 2147483647 [MAXINT]
SEMOPM
Defines the maximum number of operations for each semaphore call Defines the maximum number of shared memory segments in the entire system
100
SHMMNI* 6.
1 2147483647 [MAXINT]
7.
Review the current shared memory parameters (e.g., cat shmmax, etc.).
8. Where required, update the value for each shared memory parameter. Be sure to use the following table to determine a value that falls within the prescribed range of values for the parameter.
If '*" appears after the parameter name, this indicates that you can increment the value of the parameter ba number of desired streams by using the formula parameter value = 64 * number of desired streams as long as the "high-end" value of the range for the parameter is not exceeded.
9.
If a MediaAgent is included, be sure allocate no fewer than 100 additional streams per affected parameter.
Parameter
Purpose
Possible Range of Values 0 2147483648 [2 GB] (the high-end value is the recommended value)
SHMMAX
SHMMNI*
Defines the maximum number of shared memory segments in the entire system Defines the maximum total shared memory system-wide
1 2147483647 [MAXINT]
SHMALL
2097152
10.
For a non-Red Hat Linux system, reboot the system to allow the changes to take effect. For a Red Hat Linux system, edit the /etc/sysctl.conf file if necessary to make the changes permanent as follows: kernel.shmmax = value kernel.sem = value1 value2 value3 value4 (Be sure to include a space on either side of each "=" and also between each value.) Then run the sysctl -p command to allow these changes to take effect immediately.
rview
This guide is a short description how to install Oracle 10.2.0.x on Linux (32 or 64 Bit). The full Oracle installation guide can be found here: Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86.
In this guide we use the following ORACLE_BASE, ORACLE_HOME and ORACLE_SID. o o o ORACLE_BASE=/export/home/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0 export ORACLE_SID=GENTIC
Download
Download the following software from the Oracle Download or Metalink Site o o o 10201_database_linux32.zip (Base Software) 10201_companion_linux32.zip (Companion Software) p6810189_10204_Linux-x86.zip (Patchset)
After downloading check the CKSUM / MD5SUM as described on Oracle's Site. cksum 10201_database_linux32.zip md5sum p6810189_10204_Linux-x86.zip
Requirements
Checking Memory and Swap Space
Oracle says that the system must have at least 1GB of physical RAM and 1GB of swap space or twice the size of RAM. And for systems with more than 2 GB of RAM, the swap space can be between one and two times the size of RAM. You might also want to check out sizing swap space. To check the size of physical memory, execute: grep MemTotal /proc/meminfo MemTotal: 515700 kB To check the size of swap space, execute: grep SwapTotal /proc/meminfo SwapTotal: 1004052 kB You also can 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 cd /root dd if=/dev/zero of=/root/tmpswp bs=1k count=500000 500000+0 records in 500000+0 records out chmod 600 tmpswp mkswap tmpswp Setting up swapspace version 1, size = 511995 kB
Half the size of physical /proc/sys/kernel/shmmax memory (in bytes) 4096 /proc/sys/kernel/shmmni
File /proc/sys/fs/file-max
/proc/sys/net/ipv4/ip_local_port_range
We added the following lines to the /etc/sysctl.conf file which is used during the boot process: # Kernel Parameters for Oracle 10.2.0 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 262144 Adding these lines to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/init.d/bootmisc script which is invoked by /etc/inittab. But in order that these new added lines or settings in /etc/sysctl.conf become effective immediately, execute the following command: Configuring kernel parameters: su - root sysctl -p
The soft limit in the first line defines the number of file handles or open files that the Oracle user will have after login. If the Oracle user gets error messages about running out of file handles, then the Oracle user can increase the number of file handles like in this example up to 63536 (hard limit) by running the following command: ulimit -n 63536 Note that we do not recommend to set the hard limit for nofile for the oracle user equal to/proc/sys/fs/file-max. If you do that and the user uses up all the file handles, then the system would run out of file handles. This could mean that you won't be able to initiate new remote logins any more since the system won't be able to open any PAM modules which are required for performing a login. That's why we set the hard limit to 63536 and not to 65536. You also need to make sure that pam_limits is configured in the file /etc/pam.d/systemauth. This is the PAM module that will read the /etc/security/limits.conf file. The entry should read like: session required pam_limits.so session required pam_unix.so Now login to the oracle account again since the changes will become effective for new login sessions only. su - oracle ulimit -n 4096
Setup Environment
Before installing the Oracle software, set the environment in $HOME/admin/.GENTIC, this file will be sourced each time after login. In the example below, gentic is the SID of the database which we will create. cd $HOME . ./.gentic ls -l drwxr-xr-x 4 oracle dba 4.0K Sep 26 14:51 admin
1 oracle dba
15 Oct
unset TWO_TASK export export export export export export export export export export export export export ORACLE_SID=GENTIC LISTENER_NAME=$ORACLE_SID ORACLE_BASE=/export/home/oracle ORACLE_HOME=$ORACLE_BASE/product/10.2.0 ORACLE_DOC=$ORACLE_HOME/doc LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH TNS_ADMIN=/export/home/oracle/admin/sqlnet PATH=$ORACLE_HOME/bin:$PATH NLS_LANG=american_america.al32utf8 ORA_NLS10=$ORACLE_HOME/nls/data TEMP=/tmp TMPDIR=/tmp EDITOR=vi
1. Install Base Product (10.2.0.1) 2. Install Companion Disk to avoid NCOMP error 3. Install Patch (10.2.0.4) o o o Do not create a Database using Oracle installer, this is an extra step, install software only. Create the Oracle Inventory in $ORACLE_BASE/product. Choose Oracle Database 10g Products 10.2.0.1.0 option when installing companion
Start Installer
As Oracle10g is certified only on some Linux editions you may get the following error when you run Oracle'srunInstaller, and installation will stop:
Checking operating system version: must be redhat-2.1, UnitedLinux-1.0 or redhat-3 Failed <<<< Solution: Use the option -ignoreSysPrereqs or edit/create the file /etc/redhatrelease. cd <unpacked directory> DISPLAY=<my X-Window Host>:0.0 export DISPLAY ./runInstaller Create Inventory in: /export/home/oracle/product The location of the Oracle Inventory can always be checked in the file /etc/oraInst.loc cat /etc/oraInst.loc inventory_loc=/export/home/oracle/product inst_group=dba
Cleanup $ORACLE_HOME/bin
After the installation some non used files in $ORACLE_HOME/bin can be removed. cd $ORACLE_HOME/bin rm *O rm *0
Example of LISTNER.ORA
# -------------------------------------------------------------------------# File: listener.ora #
# # # # # #
Purpose: Location:
GENTIC = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DBHOST.EXAMPLE.COM)(PORT = 25000)) (ADDRESS = (PROTOCOL = IPC)(KEY = GENTIC.EXAMPLE.COM)) ) ) SID_LIST_GENTIC = (SID_LIST = (SID_DESC = (SID_NAME = GENTIC) (GLOBAL_DBNAME = GENTIC.EXAMPLE.COM) (ORACLE_HOME = /export/home/oracle/product/10.2.0) ) ) LOG_DIRECTORY_GENTIC = /export/home/oracle/admin/sqlnet TRACE_FILE_GENTIC = gentic.trc
Example of TNSNAMES.ORA
# # # # # # # # # -------------------------------------------------------------------------File: tnsnames.ora Purpose: Location: Configuration File for all Net Clients $TNS_ADMIN
GENTIC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DBHOST.EXAMPLE.COM)(PORT = 25000)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = GENTIC.EXAMPLE.COM) ) )
Example of SQLNET.ORA
# -------------------------------------------------------------------------# File: sqlnet.ora # # Purpose: Configuration File for all Net Clients #
Create Database
We recommend to generate the create scripts using Oracle DBCA. These scripts should be verified because they show man important issues - important to know for every DBA. Based on these scripts, we created our own initSID.sql and initSID.ora to create the database. In the subdirectory addons all optional parts of the database can be found and installed using install-addons.bash
1. Create a password file on each target database. 2. Enable remote logins for password file users. To create the password file, as the Oracle software owner or as a member of the DBA group: cd $ORACLE_BASE/admin/GENTIC/pfile orapwd file=orapwGENTIC password=xxxx entries=5 force=y After you create a password file, you need to enable remote logins. To do this, set the instance'sREMOTE_LOGIN_PASSWORDFILE initialization parameter in INIT.ORA to exclusive, as shown: remote_login_passwordfile = exclusive Setting this parameter to exclusive signifies that only one database can use the password file and that users other than SYS can reside in it. You can now use a network connection to connect to your target database as SYSDBA. sqlplus "sys/xxxx@<SERVICE> as sysdba"
If you do not want all additional products to be installed, uncomment them in installaddons.bash. cd $ORACLE_BASE/admin/GENTIC/scripts/addons ./install-addons.bash
1. 2. 3. 4.
Copy standard oracle scripts dbstart and dbshut to $ORACLE_BASE/admin Create start/stop script in /etc/init.d Activate this start/stop script with chkconfig Edit /etc/oratab to start/stop the desired Databases
Copy standard oracle scripts dbstart and dbshut to $ORACLE_BASE/admin cd $ORACLE_HOME/bin cp dbstart dbshut $ORACLE_BASE/admin Create start/stop script in /etc/init.d as user root. #!/bin/bash # # chkconfig: 12345 99 10 # description: Oracle auto start-stop script # -------------------------------------------------------------------------# File: oracle
# # Purpose: Oracle auto start-stop script # # Location: /etc/init.d # # Certified: Oracle 10.2.0.3 on Enterprise Linux 5 # -------------------------------------------------------------------------# Variables ORACLE_OWNER=oracle; export ORACLE_OWNER ORACLE_BASE=/export/home/oracle; export ORACLE_BASE ORACLE_SCRIPTS_DIR=$ORACLE_BASE/admin; export ORACLE_SCRIPTS_DIR ORACLE_HOME=$ORACLE_BASE/product/10.2.0; export ORACLE_HOME # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network RETVAL=0 prog="oracle" start() { echo -n $"Starting $prog: " if [ ! -f $ORACLE_SCRIPTS_DIR/dbstart ] then echo "Oracle not started (no dbstart script)" else # Start RDBMS su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbstart # Start Enterprise Manager Console # su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl start dbconsole # Start iSQL*Plus # su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl start fi RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/oracle return $RETVAL } stop() { echo -n $"Shutting down $prog: " if [ ! -f $ORACLE_SCRIPTS_DIR/dbshut ] then echo "Oracle not stopped (no dbshut script)" else # Stop iSQL*Plus # su - $ORACLE_OWNER $ORACLE_HOME/bin/isqlplusctl stop # Stop Enterprise Manager Console # su - $ORACLE_OWNER $ORACLE_HOME/bin/emctl stop dbconsole # Stop RDBMS su - $ORACLE_OWNER -c $ORACLE_SCRIPTS_DIR/dbshut fi RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oracle return $RETVAL } # See how we were called. case "$1" in start) start ;;
stop) *)
esac exit $RETVAL Activate this start/stop script with chkconfig as root as follows su - root chkconfig --add oracle chkconfig --list oracle Edit /etc/oratab to start/stop the desired databases su - root cat /etc/oratab # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: GENTIC:/export/home/oracle/product/10.2.0:Y