How to install Oracle 11gr2 in OEL5.5, oel5.20.gr2

Source: Internet
Author: User

How to install Oracle 11gr2 in OEL5.5, oel5.20.gr2

Virtual Machine environment: Vmware Workstation 11.1.0 + Oracle Enterprise Linux 5.5 X86-64
1. Physical Machine memory settings
Minimum: 1 GB
Recommended: 2 GB or above
Memory size:
# Grep MemTotal/proc/meminfo
View available memory space:
Free

2. swap settings
Physical memory swap partition size
1 ~ 2G 1.5 times of the former
2G ~ 16G is equal to the former
> 16 GB 16 GB

View the swap partition size:
# Grep SwapTotal/proc/meminfo

3. view the operating system information (Here we mainly verify whether the operating system version supports Oracle 11gr2)
Operating system type:
# Uname-m
Operating system kernel version:
# Cat/proc/version
# Uname-r

4. Install the system package (note: the package version must be equal to or greater than the following)
Package installation method:
# Rpm-ivh Co., binutils-2.17.50.0.6 *
Check whether the package has been installed:
# Rpm-q binutils-2.17.50.0.6
Installation Package list (the following packages are all in the Server folder of the oel5.5 image file ):
Binutils-2.17.50.0.6
Compat-libstdc ++-33-3.2.3
Compat-libstdc ++-33-3.2.3 (32 bit)
Elfutils-libelf-0.125
Elfutils-libelf-devel-0.125
Gcc-4.1.2
Gcc-c ++-4.1.2
Glibc-2.5-24
Glibc-2.5-24 (32 bits)
Glibc-common-2.5
Glibc-devel-2.5
Glibc-devel-2.5 (32 bits)
Glibc-headers-2.5
Ksh-20060214
Libaio-0.3.106
Libaio-0.3.106 (32 bits)
Libaio-devel-0.3.106
Libaio-devel-0.3.106 (32 bits)
Libgcc-4.1.2
Libgcc-4.1.2 (32 bits)
Libstdc ++ 4.1.2
Libstdc ++-4.1.2 (32 bit)
Libstdc ++-devel 4.1.2
Make-3.81
Sysstat-7.0.2
UnixODBC-2.2.11 (32-bit) or later
UnixODBC-devel-2.2.11 (32-bit) or later
UnixODBC-devel-2.2.11 (64-bit) or later
UnixODBC-2.2.11 (64-bit) or later
5. Installation users and user groups
#/Usr/sbin/groupadd oinstall
#/Usr/sbin/groupadd dba
#/Usr/sbin/useradd-g oinstall-G dba oracle

6. Modify system kernel parameters
View parameter values:
#/Sbin/sysctl-a | grep parameter_name
List of parameters and recommended values:
/Proc/sys/kernel/sem250 32000 100 128
/Proc/sys/kernel/shmall2097152
/Proc/sys/kernel/shmmax536870912
/Proc/sys/kernel/shmmni4096
/Proc/sys/fs/file-max6815744
/Proc/sys/net/ipv4/ip_local_port_range9000 65500
/Proc/sys/net/core/rmem_defa26262144
/Proc/sys/net/core/rmem_max4194304
/Proc/sys/net/core/wmem_defa26262144
/Proc/sys/net/core/wmem_max1048576
/Proc/sys/fs/aio-max-nr1048576
Use the vi editor to modify the parameter file/etc/sysctl. conf and add or modify the following content:
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
Run the following command or restart the (reboot) operating system to make the above modification Kernel Parameter file take effect:
#/Sbin/sysctl-p

7. Check resource restrictions for Oracle software installation users
# Su-oracle
$ Ulimit-Sn
1024
$ Ulimit-Hn
65536
$ Ulimit-Su
2047
$ Ulimit-Hu
16384
$ Ulimit-Ss
10240
$ Ulimit-Hs
32786
Update the resource limit file/etc/security/limits. conf and add the following lines at the end.
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Oracle hard stack 32768

8. Create a directory required for Oracle Installation
View the mounting information of all file systems:
# Df-k
Directory required for creating software installation:
# Mkdir-p/u01/app/
# Chown-R oracle: oinstall/u01/app/
# Chmod-R 775/u01/app/

9. Configure the Oracle user environment
The following commands must be executed on the host. The following operations ensure that the operating system supports graphical interfaces.
# Xhost +
$ Su-oracle
$ Xhost +
$ Echo $ SHELL
$ ../. Bash_profile
$ W
$ Export DISPLAY = local_host: 0.0
$ Echo $ SHELL
$ Echo $ DISPLAY
$ Xclock
To use the ssh client tool to operate the graphical interface, run the following command:
$ Export DISPLAY = local_host: 0.0
$ Xclock
Set ORACLE_BASE and ORACLE_SID. The following settings are based on temporary session settings. The permanent settings will be described later.
$ ORACLE_BASE =/u01/app/oracle
$ ORACLE_SID = orcl
$ Export ORACLE_BASE ORACLE_SID
Use the default ORACLE_HOME and TNS_ADMIN
$ Unset ORACLE_HOME
$ Unset TNS_ADMIN

10. Prepare the Oracle Installation Software.
Install the vmware-tool. Otherwise, file sharing between the host and the physical machine will fail.
Use the shared feature of vmware to share the downloaded Oracle software package to virtual machines
Use the linux unzip tool to decompress the Oracle Installation Software to the/u01/directory. The specific command is as follows:

# Unzip/mnt/hgfs/share_file_dir/linux.x64_11gR2_database_1of2.zip/u01/

# Unzip/mnt/hgfs/share_file_dir/linux.x64_11gr2_databasesilicate f2.zip/u01/

11. Install Oracle database management software

# Su-oracle
$./RunInstaller

Note: during the installation process, only the oracle database software is installed, and the oracle database will be created and configured separately. The advantage of this is to understand the overall structure of oracle.

12. create and manage Oracle databases
$ Export ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1/
$ Cd $ ORACLE_HOME/bin
$./Dbca
Note: during the installation process, you may be prompted to install the listener. In another session, execute the following command to complete the Listener Configuration.
$ Export ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1/
$ Cd $ ORACLE_HOME/bin
$./Netca

13. Start and log on to the database
# Su-oracle
$ Export ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1/
Note: The ORACLE_SID environment variable is not set, and an error may occur during database connection.
$ Export ORACLE_SID = orcl
$ Cd $ ORACLE_HOME/bin
$./Sqlplus/nolog
SQL> conn/as sysdba
SQL> startup nomount;
SQL> alter database mount;
SQL> alter database open;
/*
Note:
When the database is started to the mount status
ORA-01102: cannot mount database in EXCLUSIVE mode
Cause analysis:
1. The "sgadef <sid>. dbf" or lk <db_name> file exists in ORACLE_HOME/dbs. These two files are used to lock the memory.
2. oracle processes such as pmon, smon, lgwr and dbwr are not properly shut down.
3. After the database is disabled, the shared memory or semaphore is still occupied.
Solution:
1. Shut down the database
SQL> shutdown immediate
2. Run fuser-u lk <db_name> to view the processes and users using the lk <db_name> file.
$/Sbin/fuser-u lkGLOBAL_ORCL
3. Use fuser-k lk <db_name> to kill the processes that are accessing lk <db_name>.
$/Sbin/fuser-k lkGLOBAL_ORCL
4. confirm that all processes are terminated
$/Sbin/fuser-u lkGLOBAL_ORCL
5. Start the database in sequence
SQL> startup nomount;
SQL> alter database mount;
SQL> alter database open;
*/

14. For ease of operation, the method for setting environment variables is described here, so that you can directly use the sqlplus command in the session.
# Su-oracle
$ Echo "export ORACLE_SID = orcl">/home/oracle/. bash_profile
$ Echo "export ORACLE_BASE =/u01/app/oracle">/home/oracle/. bash_profile
$ Echo "export ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1">/home/oracle/. bash_profile
$ Echo "export TNS_ADMIN = $ ORACLE_HOME/network/admin">/home/oracle/. bash_profile
$ Echo "export PATH = $ ORACLE_HOME/bin: $ PATH">/home/oracle/. bash_profile

15. official reference documents

  Https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#CEGHFFGG

Https://docs.oracle.com/cd/E11882_01/server.112/e25494/create.htm#ADMIN002

Https://docs.oracle.com/cd/E11882_01/server.112/e25494/start.htm#ADMIN004

 

Related Article

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.