First, prepare 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]] #cd/usr/local/oracle[[email protected]] #unzip linux_11gr2_database_1of2.zip[[email protected]]# 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.
Ii. preparing the installation target directory for Oracle
[[Email protected] Oracle] #mkdir-P/u01/app/oracle[[email protected] Oracle] #chown-R oracle:oinstall/u01/app/oracle[ [Email protected] Oracle] #chmod-R 755/u01/app/oracle
The installation target directory is the directory where the user wants to install Oracle, and this time we will install Oracle to/ U01/app /oracle Directory, the following is the directory Creation command.
Iii. creating 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]] #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]] #useradd-G oinstall-g dba Oracle[[email protected]] #passwd Oracle
changing password Foruser Oracle.
New UNIX password:[Type the password here]
Bad Password:it isbased on a dictionary word
Retype new Unixpassword: [Retype password here]
Passwd:allauthentication 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/u01/app/oracle
Iv. checking the installation of Oracle-dependent RPM packages
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, 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]] #rpm -ivh binutils-2.20.51.0.2-5.11.el6 (x86_64) rpm -ivh compat-libcap1-1.10-1 (x86_64) rpm -ivh compat-libstdc++-33-3.2.3-69.el6 (x86_64) RPM -IVH compat-libstdc++-33-3.2.3-69.el6.i686rpm -ivh gcc-4.4.4-13.el6 (x86_64) RPM -IVH gcc-c++-4.4.4-13.el6 (x86_64) rpm -ivh glibc-2.12-1.7.el6 (i686) rpm -ivh glibc-2.12-1.7.el6 (x86_64) rpm -ivh glibc-devel-2.12-1.7.el6 (x86_64) rpm -ivh glibc-devel-2.12-1.7.el6.i686rpm -ivh kshrpm -ivh libgcc-4.4.4-13.el6 (i686) rpm -ivh libgcc-4.4.4-13.el6 (x86_64) rpm -ivh libstdc++-4.4.4-13.el6 (x86_64) rpm - Ivh libstdc++-4.4.4-13.el6.i686rpm -ivh libstdc++-devel-4.4.4-13.el6 (x86_64) rpm -ivh libstdc++-devel-4.4.4-13.el6.i686rpm -ivh libaio-0.3.107-10.el6 (x86_64) rpm -ivh libaio-0.3.107-10.el6.i686rpm -ivh Libaio-devel-0.3.107-10.el6 (x86_64) rpm -ivh libaio-devel-0.3.107-10.el6.i686rpm -ivh make-3.81-19.el6rpm -ivh sysstat-9.0.4-11.el6 (x86_64)
Five, set the 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 = 25032000 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
Execute the following command to change the current kernel parameters:
#/sbin/sysctl-p
Vi. Modification of/etc/security/limits.conf
Modify/etc/security/limits.conf, add content
Oracle Soft nproc2047
Oracle Hard nproc16384
Oracle Soft nofile1024
Oracle Hard nofile65536
Seven, 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-n65536
Fi
Fi
VIII. Setting Oracle Environment variables
Set the default Mask values:
[email protected] oracle]# umask 022
Set remote login variables DISPLAY :
exportdisplay=local_host:0.0
Modify the environment variable profile ~/.bash_profile for the Oracle User home directory (/home/oracle). Use the following command
[Email protected]oracle] #vi/home/oracle/.bash_profile
Add the following to the configuration file
EXPORTORACLE_SID=ORCL (Note that this value is the same as the database instance name created below)
Exportoracle_base=/opt/oracle/app
Exportoracle_home= $ORACLE _base/product/11.2.0/dbhome_1
Exportpath= $PATH: $HOME/bin: $ORACLE _home/bin
Exportld_library_path= $ORACLE _home/lib:/usr/lib
Nine, 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
There are two options for the desktop class and server class, where server classes (servers)are selected.
You can choose to install only the database software, that is, do not create the usual DB instance and database files
If you install only the database software, you can configure the listener after the installation is complete .
$ORACLE _HOME/BIN/NETCA
Installing an instance or database
$ORACLE _HOME/BIN/DBCA
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]] $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
Closed with
Sql>shutdownimmediate
X. Other Notes
Verify Monitoring
$ tnspingsid/servicename
Monitoring Configuration
$netca
This article is from the "Night Rain" blog, please be sure to keep this source http://peenboo.blog.51cto.com/2865551/1688520
Linux 6 under Install oracle11g (64bit)