OEL5.5 Installing Oracle 11GR2 detailed

Source: Internet
Author: User

Virtual machine Environment: Vmware Workstation 11.1.0 + Oracle Enterprise Linux 5.5 x86-64
1. Physical Machine Memory settings
Min.: 1GB
Recommended: 2GB or above
Detecting Memory Size:
# grep Memtotal/proc/meminfo
To view the available memory space:
Free

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

To view the size of the swap partition:
# grep Swaptotal/proc/meminfo

3. Check the operating system information (here to verify that 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 installed package version must be equal to or greater than the following version)
Package Installation Method:
# RPM-IVH binutils-2.17.50.0.6*
Verify that the package is installed:
# rpm-q binutils-2.17.50.0.6
The list of installation packages (these are all under 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 (+ 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 (+ bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (+ bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (+ bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (+ bit)
libgcc-4.1.2
libgcc-4.1.2 (+ bit)
libstdc++-4.1.2
libstdc++-4.1.2 (+ 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. Installing users and user groups
#/usr/sbin/groupadd Oinstall
#/usr/sbin/groupadd DBA
#/USR/SBIN/USERADD-G OINSTALL-G dba Oracle

6, modify the system kernel parameters
To 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_default262144
/proc/sys/net/core/rmem_max4194304
/proc/sys/net/core/wmem_default262144
/proc/sys/net/core/wmem_max1048576
/proc/sys/fs/aio-max-nr1048576
Use the VI Editor to modify the parameter file/etc/sysctl.conf, adding or modifying the following:
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
Execute the following command or restart (reboot) operating system to make the above modification of the kernel parameter file effective:
#/sbin/sysctl-p

7, for Oracle Software Installation user detection resource constraints
# su-oracle
$ ulimit-sn
1024
$ ulimit-hn
65536
$ ulimit-su
2047
$ ulimit-hu
16384
$ ulimit-ss
10240
$ ulimit-hs
32786
Update resource Limit file/etc/security/limits.conf, add the following line at the end
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Oracle Soft Stack 10240
Oracle Hard Stack 32768

8. Create the directory required for Oracle installation
To view mount information for all file systems:
# df-k
To create the required directory for the Software installation:
# mkdir-p/u01/app/
# Chown-r oracle:oinstall/u01/app/
# Chmod-r 775/u01/app/

9. Configure the Oracle user's environment
The following commands need to be performed on the host, following a series of actions to ensure that the operating system supports the graphical interface
# Xhost +
$ su-oracle
$ xhost +
$ echo $SHELL
$ . ./.bash_profile
$ w
$ Export display=local_host:0.0
$ echo $SHELL
$ echo $DISPLAY
$ xclock
If you need to manipulate the graphical interface with the SSH client tool, you need to execute the following command
$ Export display=local_host:0.0
$ xclock
Set Oracle_base and Oracle_sid, the following setting method is based on the settings of the temporary session, and the method of permanent setting is described later in this article
$ 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 Oracle Installation Software
Install the Vmware-tool tool, otherwise you will not be able to implement the host and physical machine file sharing
Share downloaded Oracle packages to virtual machines using VMware's sharing features
Use the Linux Unzip tool to extract the Oracle installation software into the/U01/directory with the following commands:

# unzip/mnt/hgfs/share_file_dir/linux.x64_11gr2_database_1of2.zip/u01/

# unzip/mnt/hgfs/share_file_dir/linux.x64_11gr2_database_2of2.zip/u01/

11. Installing Oracle Database management software

# su-oracle
$./runinstaller

Note: During the installation process, choose to install only Oracle database software, Oracle database we will then create and configure separately, the benefit 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 and execute the following command in another session to complete the listener configuration
$ Export oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1/
$ cd $ORACLE _home/bin
$./NETCA

13. Starting and logging into the database
# su-oracle
$ Export oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1/
Note: There may be an error connecting to the library because the ORACLE_SID environment variable is not set
$ 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;
/*
Attention:
When you boot a database to mount (Mount) state, it may appear
Ora-01102:cannot mount Database in EXCLUSIVE mode
Cause Analysis:
1. There are "sgadef<sid>.dbf" files or lk<db_name> files in oracle_home/dbs/. These two files are used to lock the memory.
2. Pmon of Oracle, Smon, LGWR and DBWR are not properly closed.
3, the database is closed, shared memory or semaphore is still occupied.
Solution:
1. Close the database
sql> shutdown Immediate
2. fuser-u lk<db_name> viewing processes and users using lk<db_name> files
$/sbin/fuser-u LKGLOBAL_ORCL
3. Use fuser-k lk<db_name> to kill these processes that are accessing lk<db_name>
$/sbin/fuser-k LKGLOBAL_ORCL
4. Confirm that the relevant process has been completely terminated.
$/sbin/fuser-u LKGLOBAL_ORCL
5. Start the database sequentially
sql> startup Nomount;
Sql> ALTER DATABASE Mount;
sql> ALTER DATABASE open;
*/

14, for the convenience of operation, here explains the method of setting environment variables, 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 Document

  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

OEL5.5 Installing Oracle 11GR2 detailed

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.