02 - Oracle Server Installation
02 - Oracle Server Installation
O2
Oracle Server Installation
Installing the Oracle server software is really a simple affair. Installing all the software will probably not take you more than a couple of hours. All the real effort goes into the proper planning of such things as the operating system configuration and physical space you need for your Oracle databases to function optimally. You can save yourself a lot of grief during the installation process by carefully reviewing three sets of installation documents: Oracle Installation Guide for your operating system. Release Notes and Release Notes Addendums. README files.
Linux deserves a special mention. Oracle Corporation has made a huge commitment to Linux, and Linux is used as the development platform for many products (including database release 11g). Linux comes in several distributions. The most popular for Oracle servers are Red Hat and SUSE, but do not ignore the Oracle distribution: Enterprise Linux. This is very well packaged and fully supported by Oracle Corporation.
Mount Points
Mounting refers to attach a directory with a file system. This directory is the top-level directory of a file system. Oracle recommends that all your Oracle mount points be named according to the convention /pm,
33 where p is a string constant to distinguish itself from other mount points, and m is a two-digit number. This means you can name your mount points /u01, /u02, /u03, and so on. Oracle recommends that you have four mount points to fully comply with the OFA guidelines. The first of these is for locating the Oracle Database 10g server binaries, and the other three are for holding the database files. Lets say youre creating mount points for a database named prod. In this case, the three mount points designated for the data files can be clearly named as follows: /u01/oradata/prod, /u02/oradata/prod, and /u03/oradata/prod. This nomenclature makes it clear that these file systems are meant for Oracle databases and that the data for different databases is stored on separate mount points. In Linux and UNIX systems, a home directory is the directory that a user lands in when he or she first logs in. All home directories should follow the naming convention /pm/h/u, where pm is the mount point name, h is a standard directory name, and u refers to the directory owner. For example, the /u01/app/oracle directory could be the home directory for the user named oracle. Note that the entire home directory for each user (e.g., /u01/app/oracle) is denoted by the letter h for the purposes of the following discussion.
The default owner of the Oracle base directory is usually a user named oracle, and the standard directory is usually named app. Therefore, the Oracle base directory usually has the form of /pm/app/oracle (for example, /u01/app/oracle).
ORACLE_HOME Directory
The Oracle home directory, denoted by the ORACLE_HOME environment variable, is very important, since the Oracle server software executable files and other configuration files are located under this directory. For example, the $ORACLE_HOME/bin directory holds the executables for the Oracle products, and the $ORACLE_HOME/network directory holds the Oracle Net Services files. In order to comply with the OFA requirement of enabling the simultaneous running of multiple versions of Oracle software, you need to install Oracle software in a directory with the following path: /pm/h/u/product/v/type_[n], where: pm: The mount point name h: The standard directory name u: The owner of the directory, usually named oracle v: The version of the software type: The type of installation, such as database (db), client (client) or companion (companion) n: An optional counter, which enables you to install the same product multiple times under the same Oracle base directory In the preceding syntax for the Oracle home, /pm/h/u/product/v_type_[n], the first part, /pm/h/u, is nothing but the Oracle base directory. Thus the Oracle home directory is always located underneath the Oracle base directory, and it can also be specified as $ORACLE_BASE/product/v/type_[n]. Oracle supports multiple Oracle homes, but you cant install products from one release of Oracle into an Oracle home directory of a different release. You must install the Oracle Database 10.2 soft-ware into a new Oracle home directory. For example, you cant install release 10.2 software into an existing Oracle9i Oracle home directory.
34
Administrative Files
Every Oracle database has several administrative files associated with it. Among these files are configuration files, core dump files, trace files, export files, and other related log files. You need to store these files under separate directories for ease of maintenance. Oracle recommends the following directory structure for clarity: /h/admin/d/a, where: h is the Oracle base directory (e.g., /u01/app/oracle) admin indicates that this directory holds administration-related files (e.g bdump) d refers to the specific database, and a refers to the subdirectories for each specific type of administrative files
Following is the list of standard administrative directories that youll need in most cases. adhoc; Contains ad hoc SQL files arch; Contains archived redo log files adump; Contains any audit files bdump; Contains background process trace files create; Contains SQL scripts that you can use for creating your databases cdump; Contains core dump files dpdump; Contains the Data Pump Export files pfile; Contains instance parameter files (such as init.ora) udump; Contains SQL trace files for user processes
Product Files
Oracle recommends that you keep each version of the software in a separate directory distinguished by the naming convention /h/product/v, where h is the home directory, product indicates that the software versions are under this directory, and v is the version of the product. For example, I have a directory on my system called /u01/app/oracle/product/10.1.0.2.0 under which I save all the Oracle server software subdirectories during installation. If I decide to install the 10.2.0 version, Ill do so under the directory /u01/app/oracle/product/10.2.0. You can see that this type of naming convention makes it very easy to install and manage multiple versions of the Oracle software.
Database Files
These include the data files that contain the table and index data and certain operational files called control files and redo log files. Oracle recommends that all tablespaces be named with no more than eight characters, with the format tn, where t is a descriptive name for the tablespace and n is a two-digit number. For data files, the recommended notation is /pm/q/d/tn.dbf, where pm is the mount point; q is an indicator, usually oradata, d is the database name, t is the descriptive name for the tablespace that contains this data file, and n is a two-digit number. Thus, a typical data file under the OFA guidelines would have a name like /u20/oradata/prod/system01.dbf, which refers to a data file in the System table-space.
35 The recommendation for control and redo files is to follow the naming conventions /pm/q/d/controln.ctl and /pm/q/d/redon.log, respectively. In this notation, pm is the mount point; q is an indicator, such as oradata, denoting that the files contain Oracle-related data; d is the data-base name, and n is a two-digit number.
36
37
Performing Installation
To successfully install the Oracle 10g on RHEL 5.x, one must complete the following steps. 1. Checking Hardware Requirements 2. Checking Software Requirements 3. Checking Network Configuration 4. Configure Kernel Parameters 5. Changing Shell Limits 6. Creating Groups & Users 7. Creating Necessary Directories 8. Configure Oracle User's Environment 9. Running Oracle Universal Installer
Swap size should be 1.5 times of the RAM, if RAM size is between 1024MB and 2048MB, otherwise it should be equal to the size of RAM Check free space in /tmp directory
There must be 400MB of disk space in the /tmp directory Check free disk space
Oracle software requires 1.5GB to 3.5GB of disk space, while 1.2GB of disk space for a preconfigured database Determine whether the system architecture can run the oracle software
Verify that the processor architecture matches the Oracle software release that you want to install
38 Check OS distribution
Following distributions and versions are supported: RHEL AS/ES 3.0 (Update 4 or later) RHL 4.0 SUSE LES 9.0 with SP 2 or later Asianux 2.0 or later
Note; if RHEL version is not according to the specification, your installation will failed in first step, to avoid it, modify /etc/redhat-release file by replacing release information with redhat-4, before modification make a backup copy of it as # cp /etc/redhat-release /etc/redhat-release.original Now change the release information # echo "redhat-4" > /etc/redhat-release Don't forget to change it again after installation Determine whether the required kernel is installed
The system must be running the following kernel version (or a later version): RHEL 3.0 and Asianux 1.0: 2.4.21-27.EL RHEL 4.0 and Asianux 2.0: 2.6.9-5.EL SUSE LES 9.0: 2.6.5-7.201
Check the required packages installed # rpm -q package_name The following packages (or later versions) must be installed: RHEL 3.0 and Asianux 1.0: make-3.79.1 , gcc-3.2.3-34, glibc-2.3.2-95.20, compatdb-4.0.14-5, compat-gcc-7.3-2.96.128, compat-gcc-c++-7.3-2.96.128, compatlibstdc++-7.3-2.96.128, compat-libstdc++-devel-7.3-2.96.128 , openmotif21-2.1.30-8, setarch-1.3-1 RHEL 4.0 and Asianux 2.0: gcc-3.4.3-22.1.EL4, gcc-c++-3.4.3-22.1.EL44, glibc-2.3.42.9, glibc-common-2.3.4-2.9, compat-db-4.1.25-9, compat-libstdc++-296-2.96132.7.2, gnome-libs-1.4.1.2.90-44.1, libstdc++-3.4.3-22.1, libstdc++-devel-3.4.3-22.1, make-3.80-5, pdksh-5.2.14-30, sysstat-5.0.5-1, xscreensaver-4.18-5.rhel4.2, setarch-1.6-1, binutils-2.15.92.0.2-13.EL4, control-center-2.8.0-12, SUSE LES 9: gcc-3.3.3-43.24, gcc-c++-3.3.3-43.24, glibc-2.3.3-98.28, gnome-libs-1.4.1.7671.1, libstdc++-3.3.3-43.24, libstdc++-devel-3.3.3-43.24, make-3.80-184.1, pdksh-5.2.14780.1, sysstat-5.0.1-35.1, xscreensaver-4.16-2.6, binutils-2.15.90.0.1.1-32.5
39 Verify that the /etc/hosts file is used for name resolution. You can do this by checking the hosts file entry in the nsswitch.conf file as follows:
The output of this command should contain an entry for files. Check hostname
The output of this command should be similar to the output shown above Check that the domain name has not been set dynamically
This command should not return any results. Check that the hosts file contains the fully qualified host name by using the following command:
The output of this command should contain an entry for the fully qualified host name and for localhost.
# /sbin/sysctl -a | grep parameter_name Note; Oracle recommends that you tune these values to optimize the performance of the system. Refer to your operating system documentation for more information about tuning kernel parameters If the value of any kernel parameter is different from the recommended value, then using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:
40
Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
41 Create OSDBA group (dba); identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege), OSOPER group (oper); optional group. Create this group if you want a separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege), Orcale Inventory group (oinstall); create this group the first time you install Oracle software on the system To determine whether the Oracle Inventory group exists, enter the following command: # more /etc/oraInst.loc If the output of this command shows the oinstall group name, then the group already exists # /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba # /usr/sbin/groupadd oper Create an Oracle software owner user (oracle), to determine whether an Oracle software owner user named oracle exists, enter the following command: # id oracle If the oracle user exists, then the output from this command is similar to the following: uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper) To create the oracle user, enter a command similar to the following: # /usr/sbin/useradd oracle1 oracle In the preceding command, g denotes the primary group of the oracle user, which is the oinstall group G is the secondary group, which is the dba group d denotes the home directory for the new user p is the password for the oracle user -g oinstall -G dba -d /home/oracle -p
The following command can also be used for setting password: # /usr/bin/passwd oracle
42 # mkdir /u01/app/oracle/flash_recovery # mkdir /u01/app/oracle/flash_recovery/db_1 # chown -R oracle:oinstall /u01/app/oracle/flash_recovery/db_1 # chmod -R 775 /u01/app/oracle/flash_recovery/db_1 Similarly create /u01/app/oracle/admin/db_1 and other directories within db_1, refer OFA for details Create directories for database files as # mkdir /u02/oradata # mkdir /u02/oradata/db_1 Change owner and permissions # chown -R oracle:oinstall /u02/oradata/db_1 # chmod -R 775 /u02/oradata/db_1
Open the oracle users shell startup file in any text editor, on bourne shell , bash shell, or korn shell it will be .bash_profile while on c shell it will be .login and enter the following lines
Depending on the oracle user's default shell, make the following changes to the default shell start-up file: For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE systems) /etc/profile.local:
43
For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file (or the file on SUSE systems)/etc/csh.login.local: if ( $USER == "oracle" ) then limit maxproc 16384 limit descriptors 65536 endif Run the shell script $ . ./.bash_profile
44
Navigate the OUI pages and specify your preinstallation settings according to your installation plan as shown in the screen shots given below:
45
46