The oracle11gr2package contains two files: linux_11gr2_database_1of2.zipand linux_11gr2_database5of2.zip. These two files are uploaded to usrloca through SSH.
The oracle11gr2package contains two files: linux_11gr2_database_1of2.zipand linux_11gr2_database5of2.zip. These two files are uploaded to/usr/loca over SSH.
1. Prepare the Oracle Installation File
The oracle11gr2package contains two files: linux_11gr2_database_1of2.zipand linux_11gr2_database5of2.zip. These two files are uploaded to/usr/local/oracle over SSH.
Decompress the installation file to the current directory.
[Root @ localhostroot] # cd/usr/local/oracle
[Root @ localhostoracle] # unzip linux_11gR2_database_1of2.zip
[Root @ localhostoracle] # unzip linux_11gr2_database204 f2.zip
After the preceding command is executed, the directory named database is generated under/usr/local/oracle/, which is the directory of the oracle installer.
2. Prepare the target installation directory for oracle
[Root @ localhost oracle] # mkdir-p/u01/app/oracle
[Root @ localhost oracle] # chown-R oracle: oinstall/u01/app/oracle
[Root @ localhost oracle] # chmod-R 755/u01/app/oracle
The installation target directory is the directory where you want to install oracle. This time, we will install oracle in the/u01/app/oracle directory. The following is the Directory Creation command.
3. Create oracle users and user groups
Oracle cannot be installed under the root account. Therefore, you must create a user for oracle Installation and create user groups for dba and oinstall.
[Root @ localhostoracle] # groupadd dba
[Root @ localhost oracle] # groupadd oinstall
The following command creates the dba and oinstall user groups:
The following command creates an oracle user and sets the password
[Root @ localhostoracle] # useradd-g oinstall-G dba oracle
[Root @ localhostoracle] # passwd oracle
Changing password for user oracle.
New UNIX password: [enter a password here]
Bad password: it is based on a dictionary word
Retype new UNIX password: [enter the password again here]
Passwd: all authentication tokens updated successfully.
The following command assigns the oracle Installation Directory (/opt/oracle) to the oracle user oinstall User Group
[Root @ localhost oracle] # chown-R oracle: oinstall/u01/app/oracle
4. Check and install the RPM software package on which ORACLE depends
Some linux software packages on which oracle Installation depends are not installed. This requires that these uninstalled software packages be installed before oracle can be installed properly. These uninstalled software packages can be obtained on the linux installation CD. We can install these software packages directly on the linux Cd (or directly copy the required software packages to the linux local disk ), first, run the following command to mount the linux CD:
[Root @ localhost oracle] # mkdir/mnt/cdrom
[Root @ localhost oracle] # mount/dev/cdrom/mnt/cdrom
Install the missing software package. Here, only the software package missing for this linux system is installed. For example, when you check the software package during oracle Installation and find that the required software package is not installed, you can install the missing software package again based on the name of the software package that is not installed. The installation command is as follows:
[Root @ localhostoracle] #
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.i686
Rpm-ivh gcc-4.4.4-13.el6 (x86_64)
Rpm-ivh gcc-c ++-4.4.4-13. el6 (x86_64)
Rpm-ivh Co., 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.i686
Rpm-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.i686
Rpm-ivh libstdc ++ devel-4.4.4-13.el6 (x86_64)
Rpm-ivh libstdc ++ devel-4.4.4-13.el6.i686
Rpm-ivh libaio-0.3.107-10.el6 (x86_64)
Rpm-ivh libaio-0.3.107-10.el6.i686
Rpm-ivh libaio-devel-0.3.107-10.el6 (x86_64)
Rpm-ivh libaio-devel-0.3.107-10.el6.i686
Rpm-ivh make-3.81-19.el6
Rpm-ivh sysstat-9.0.4-11.el6 (x86_64)
5. Set Linux Kernel Parameters
Open/etc/sysctl. conf and add the following content 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
Run the following command to change the current kernel parameters:
#/Sbin/sysctl-p
6. Modify/etc/security/limits. conf
Modify/etc/security/limits. conf and add content
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
7. modify the system environment variable/etc/profile
Modify the environment variable/etc/profile and add the following content:
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
8. Set ORACLE environment variables
Set the default mask value:
[Root @ localhost oracle] # umask 022
Set the remote logon variable DISPLAY:
Export DISPLAY = local_host: 0.0
Modify the environment variable configuration file of the oracle user home directory (/home/oracle ~ /. Bash_profile. Use the following command
[Root @ localhost oracle] # vi/home/oracle/. bash_profile
Add the following content to the configuration file:
Export ORACLE_SID = orcl (note that this value must be the same as the name of the database instance 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 completing the preceding steps, we recommend that you restart the system to make all settings take effect. Now you can log on with an 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 ).
1
2
[Root @ localhost oracle] # su-oracle
[Oracle @ localhost oracle] # cd/usr/local/oracle/database
Run the installation command
1
[Oracle @ localhost database] #./runInstaller
There are two options: desktop and server. Select server ).
You can choose to install only the database software, that is, do not create common database instances and database files
If only the database software is installed, you can configure the listener after installation.
$ ORACLE_HOME/bin/netca
Install an instance or database
$ ORACLE_HOME/bin/dbca
When you complete the preceding operations, we recommend that you restart the system once to prevent some settings from taking effect. After the restart, log on to the oracle database, open the terminal, and enter the following command to run the following command:
Start the listener:
[Root @ localhostoracle] $ lsnrctl start
Start the database and instance:
[Root @ localhost oracle] $ sqlplus/nolog
[Root @ localhost oracle] $ conn/as sysdba
After entering sqlplus, run the database startup command. The following command creates, installs, and opens an ORACLE instance. In this case, the database system is in normal operation and can accept user requests.
SQL> startup
Disable
SQL> shutdown immediate
10. other instructions
Verify listening
$ Tnspingsid/serviceName
Listener Configuration
$ Netca
Quick Reference for installation, deployment, and configuration of a single Oracle 11g instance on Linux
Ubuntu 14.04 LTS 64-bit installation of Oracle 11g
This article permanently updates the link address: