RedHat Linux Installation oracle11g (RPM)

Source: Internet
Author: User
Tags sqlplus

1. Preparing the Oracle installation files
The ORACLE11GR2 contains two files Linux_11gr2_database_1of2.zip and Linux_11gr2_database_2of2.zip, which uploads the two files to/usr/local/oracle via SSH.

Unzip the installation file to the current directory
[[email protected] root] #cd/usr/local/oracle
[[Email protected] Oracle] #unzip linux_11gr2_database_1of2.zip
[[Email protected] Oracle] #unzip linux_11gr2_database_2of2.zip
After executing the above command, a directory named database will be generated under/usr/local/oracle/, which is the directory of the Oracle installer.

2. Prepare the Oracle installation target directory
[[Email protected] Oracle] #mkdir –p/opt/oracle
The installation destination directory is the directory where users want to install Oracle, and this time we install Oracle into the/opt/oracle directory, which is the directory Creation command.

3. Create Oracle-related users and user groups
Oracle cannot install under the root account, so you need to create a dedicated user for the installation of Oracle, and you need to create DBA and Oinstall user groups.
[[Email protected] Oracle] #groupadd DBA
[[Email protected] Oracle] #groupadd Oinstall
The following command creates the DBA and the Oinstall user group:

The following command creates the Oracle user and sets the password
[[Email protected] Oracle] #useradd-G oinstall-g dba Oracle
[[Email protected] Oracle] #passwd Oracle
Changing password for user Oracle.
New UNIX Password: [Type password here]
Bad Password:it are based on a dictionary word
Retype new UNIX Password: [Retype password here]
Passwd:all authentication tokens updated successfully.

The following command assigns the Oracle installation directory (/opt/oracle) to the Oracle User Oinstall user Group
[[Email protected] Oracle] #chown –R oracle:oinstall/opt/oracle

4. Check the RPM package for installing Oracle Dependencies
Oracle's installation depends on the package, and some Linux is not installed. This requires that these not yet installed packages are installed before Oracle can be installed properly. These non-installed packages are available on the Linux installation CD and I
We install the packages directly on the Linux CD (or copy the required packages directly to the Linux local disk), first we need to mount the Linux CD and use the following command:
[[Email protected] Oracle] #mkdir/mnt/cdrom
[[Email protected] Oracle] #mount/dev/cdrom/mnt/cdrom

Install the missing packages and install only the packages that are missing from this Linux system. In the case of an Oracle installation, when the package is checked, it is found that the required package is not installed, you can install the missing package again according to the name of the package that is not installed. The following are the installation commands:
[[Email protected] Oracle] #rpm-IVH kernel-headers-2.6.18-164.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH glibc-headers-2.5-42.i386.rpm
[[Email protected] Oracle] #rpm-IVH glibc-devel-2.5-42.i386.rpm
[[Email protected] Oracle] #rpm-IVH libgomp-4.4.0-6.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH sysstat-7.0.2-3.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH libaio-devel-0.3.106-3.2.i386.rpm
[[Email protected] Oracle] #rpm-IVH libstdc++-devel-4.1.2-46.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH unixodbc-2.2.11-7.1.i386.rpm
[[Email protected] Oracle] #rpm-IVH unixodbc-devel-2.2.11-7.1.i386.rpm
[[Email protected] Oracle] #rpm-IVH gcc-4.1.2-46.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH gcc-c++-4.1.2-46.el5.i386.rpm
[[Email protected] Oracle] #rpm-IVH elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
After the package installation is complete,

5. Set Linux kernel parameters
Open Modify/etc/sysctl.conf and add the following at the end
#kernel. Shmall = 2097152
#kernel. Shmmax = 2147483648
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.core.rmem_default = 4194304
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Fs.file-max = 6815744
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.wmem_max = 1048576
FS.AIO-MAX-NR = 1048576

6, modify the/etc/security/limits.conf
Modify/etc/security/limits.conf, add content
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536

7, modify the system environment variable/etc/profile
To modify the environment variable/etc/profile, add the following:
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

8. Setting Oracle Environment variables
Modify the environment variable configuration file for the Oracle User home directory (/home/oracle). Bash_profile. Use the following command
[[Email protected] Oracle] #vi/home/oracle/.bash_profile

Add the following to the configuration file
Export ORACLE_SID=ORCL (Note that this value is the same as the database instance name created below)
Export Oracle_base=/opt/oracle/app
Export Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1
Export path= $PATH: $HOME/bin: $ORACLE _home/bin
Export Ld_library_path= $ORACLE _home/lib:/usr/lib

9. Start the installation process
After the above steps are set up, it is recommended that you restart the system so that all settings take effect. Now log in with the Oracle user and go to the Oracle installer directory. Each of the following steps is a step in the Oracle installation process (each step corresponds to an Installation interface).
[[Email protected] Oracle] # su Oracle
[[Email protected] Oracle] #cd/usr/local/oracle/database

Run the Install command
[[Email protected] database] #./runinstaller

If an error message occurs during installation [the display color cannot be automatically checked using the command/usr/bin/xdpyinfo. Check to see if the display variable is set. ], use the root account to execute the following command, and then switch to the Oracle user to run the Setup program (if there is a switchover or error, please exit the root account and log into the system directly with your Oracle account).
[[Email protected] Oracle] #su root
[[Email protected] Oracle] #xhost + [IP address, optional]
9.1 Configuring Security Updates
Now that the Oracle installer has been launched, the first interface can enter an e-mail address to receive critical error messages. Another option is to receive security updates through my Oracle support, which is not checked in the installation process.
9.2 Installation Options
Select "Install and configure database" here
9.3 System Classes
There are two options for the desktop class and server class, where the server class is selected.
9.4 Grid Options
Select single-Instance database installation
9.5 Installation Type
Select Advanced Installation
9.6 Product language
You can choose from a variety of runtime languages, where the system's default selection is used (Simplified Chinese)
9.7 Database Version
Select the Enterprise version here
9.8 mounting Position
Oracle Base directory is:/opt/oracle
Oracle home directory is:/opt/oracle/product/11.2.0/dbhome_1
9.9 Creating a Product List
The list of products for this installation is:/opt/oracle/orainventory
The Orainventory user group name is: Oinstall
9.10 Configuration Type
Select General purpose/transaction processing here
9.11 Database identifiers
The global database name and service identifier for this installation are: ORCL (default, note that this is the same as the configuration above)
9.12 configuration options
This step can be configured for Oracle's memory usage, character set, security, and example scenarios, and this installation will use Oracle's default configuration.
9.13 Management options
Using Oracle's default configuration
9.14 Database Storage
Select File system here, database file location using Oracle's default location
9.15 Backup and Recovery
Choose not to enable automatic backup here
9.16 Scheme password
Choose to use the same password for all accounts here
9.17 Operating System Groups
The database administrator (OSDBA) is a member of the user group: DBA
The database operator (Osoper) is a member of the user group: DBA
9.18 Prerequisite Checks
This step Oracle examines the operating system's user and user groups, memory, software packages, system cores, and other parameters. Where the discrepancies are listed (can be resolved individually according to the listed nonconformity), when fully complying with the requirements, click Next.
9.19 performing the installation
This is the final step, the Oracle program is in the process of installation, it takes twenty or thirty minutes, after the installation is completed click Finish. I'm here to congratulate you on the success of Oracle installation!

10. Start Oracle
When you are done, it is recommended that you restart it again to prevent certain settings from taking effect. After restarting with Oracle User login, open terminal, type the following command to run the following command

Start monitoring:

[[Email protected] Oracle] $LSNRCTL start

To start the database and instance:

[[Email protected] Oracle] $sqlplus/nolog

[[Email protected] Oracle] $conn/as SYSDBA
After entering Sqlplus, execute the start database command, and the following command will create, install, and open the Oracle instance. At this point, the database system is in a normal working state and can accept user requests.
Sql>startup

RedHat Linux Installation oracle11g (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.