Install Oracle 11g R2 in RHEL 6

Source: Internet
Author: User

I installed it on rhel6 32-bit. Use the gnome GUI to install the development tools
Install the SDK, or install the local Yum source and then use the group. It is worth noting that
Swap requires at least 3 GB of physical memory.
The installation process consists of two steps: modifying system parameters and installing software and databases.
Modify system parameters
Step 1: Add the following parameters to VI/etc/sysctl. conf:
FS. AIO-max-Nr = 1048576
FS. File-max = 6815744
Kernel. Shmall = 2097152
Kernel. shmmax = 1073741824
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 = 1048586
Save and make it take effect
/Sbin/sysctl-P
If the following error message is displayed, ignore the error because the error message is displayed even if the parameter is not modified.
Error: "net. Bridge. bridge-nf-call-ip6tables" is an unknown key
Error: "net. Bridge. Bridge-NF-call-iptables" is an unknown key
Error: "net. Bridge. Bridge-NF-call-arptables" is an unknown key
Note: The value of kernel. shmmax's is half of the physical memory. My memory is 2 GB, so it is 1073741824
Step 2: VI/etc/security/limits. conf, add:
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Step 3: VI/etc/PAM. d/login. Add the following parameters:
Session required pam_limits.so step4: VI/etc/profile:
If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi
Step 4: VI/etc/CSH. login:
If ($ user = "oracle") then
Limit maxproc 16384
Limit descriptors 65536
Umask 022
Endif
Step 5: Change VI/etc/RedHat-release to the following values. After successfully installing the database, modify it back:
Red Hat Enterprise Linux Server Release 5.0 (tikanga)
Step 6: Add related users and user groups:
/Usr/sbin/groupadd oinstall
/Usr/sbin/groupadd DBA
/Usr/sbin/useradd-m-g oinstall-g dba Oracle
Echo "Oracle" | passwd-stdin Oracle (I am too lazy, pipeline command to change the Oracle password)
Step 6: Create the installation path and modify the permission:
Mkdir-P/opt/11g/Oracle
Chown-r ORACLE: oinstall/opt/11g/Oracle
Chmod-r 775/opt/11g/Oracle
Mkdir-P/opt/11g/orainventory
Chown-r ORACLE: oinstall/opt/11g/orainventory
Chmod-r 775/opt/11g/orainventory
Step 7: VI/home/Oracle/. bash_profile. You can set the value of oracle_sid to orcl.
TMP =/tmp; export TMP
Oracle_base =/opt/11g/Oracle; export oracle_base
ORACLE_HOME = $ oracle_base/product/11.2.0/dbhome_1; export ORACLE_HOME
Oracle_sid = orcl; export oracle_sid
Oracle_term = xterm; export oracle_term
Path = $ ORACLE_HOME/bin:/usr/sbin: $ path; export path LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib;
Export LD_LIBRARY_PATH
Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib;
Export classpath
If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi
Umask 022
Make environment variables take effect:
Source ~ /. Bash_profile

Open the command line window and switch to the root to execute xhost localhost.
Step 8: Switch to Oracle to decompress the 11g installation package, so that you do not need to modify the permissions.
Step 9: log on to Oracle to install the agent after restart.
The installation process is as follows:
[Oracle @ localhost database] $./runinstaller
Starting Oracle universal installer...
Checking temp space: must be greater than 120 mb. Actual 8288 MB passed
Checking swap space: must be greater than 150 mb. Actual 4095 MB passed
Checking monitor: Must be configured to display at least 256 colors. Actual 16777216 passed
Preparing to launch Oracle universal installer from/tmp/OraInstall2011-04-28_07-44-59AM.
Please wait... [Oracle @ localhost database] $ you can find the log of this install session:
/Opt/11g/orainventory/logs/installActions2011-04-28_07-44-59AM.log
Select the default option when the graphic interface appears. When you check the dependency package, the following prompt may appear:

If these packages are installed and the version is newer, this prompt may also appear. Ignore it and continue the installation.
Yes. To install Oracle software:


Create a database:

You can unlock some accounts and change passwords on them. Click OK and the following message appears:


Switch to the root node and run the command to complete the final installation.
[Oracle @ localhost ~] $ Su-
Password:
[Root @ localhost 11g] # sh/opt/11g/orainventory/orainstroot. Sh
Changing permissions of/opt/11g/orainventory.
Adding read, write permissions for group.
Removing read, write, execute permissions for world.
Changing groupname of/opt/11g/orainventory to oinstall.
The execution of the script is complete.
[Root @ localhost 11g] # sh/opt/11g/Oracle/product/11.2.0/dbhome_1/root. Sh
Running Oracle 11g root. Sh script...
The following environment variables are set:
Oracle_owner = Oracle
ORACLE_HOME =/opt/11g/Oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to/usr/local/bin...
Copying oraenv to/usr/local/bin...
Copying coraenv to/usr/local/bin...
Creating/etc/oratab file...
Entries will be added to the/etc/oratab file as needed by database configuration assistant when a database is created
Finished running generic part of root. Sh script.
Now product-specific root actions will be saved med.
Finished product-specific root actions.
[Root @ localhost 11g] #
Note: If you have installed it before, the prompt box will not be the same as above, as long as you
SH/opt/11g/orainventory/orainstroot. Sh.


Log on to the OEM browser and view:

Note: In this case, the database is not set to start at random. In Windows, the database is started at random as a service. Manual
Format:
Start the listener: LSNRCTL start
Start OEM: emctl start dbconsole

Reproduced from 1000seo
Link:
Install Oracle 11g R2 in RHEL 6

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.