Install the Oracle database in Linux
Http://download.csdn.net/detail/jaune161/9312775 (PDF)
Note
Because there are too many images, only the main part is written in this article. For installation steps and subsequent settings, see PDF.
This document applies to and installs Oracle11gR2. Other versions can be used as a reference, but the official documents shall prevail.
Related Materials
Oracle11gR2 documentation:Http://docs.oracle.com/cd/E11882_01/
Installation Tutorial:Http://docs.oracle.com/cd/E11882_01/nav/portal_11.htm
Installation tutorial under Linux_x86_64:Http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm
I. Check the necessary conditions 1.1, check the memory and swap Partition
Oracle requires 2 GB memory or more
# View memory size grep MemTotal/proc/meminfo # view swap zone size grep SwapTotal/proc/meminfo # You can also use the following command to view memory size free-m
Requirements for swap partitions
| Memory size |
Requirements for swap partitions |
| 1 GB ~ 2 GB |
1.5 times of memory |
| 2 GB ~ 16 GB |
Equal to memory size |
| Larger than 16 GB |
16 GB |
1.2 confirm the number of operating system digits[root@FSWWOA /]# uname -mx86_64
X86_64: indicates that an Intel processor is used and the operating system is 64-bit.
I386: 32-bit
1.3 check hard disk space# View the temporary directory space [root @ FSWWOA/] # df-h/tmp # view the total disk space [root @ FSWWOA/] # df-h
Oracle Installation requires the/tmp directory to have at least 1 GB space.
The following figure shows the space required for installing Oracle versions.
| Version |
Required Space |
| Enterprise Edition (Enterprise Edition) |
4.7 GB |
| Standard Edition (Standard Edition) |
4.6 GB |
Ii. install necessary softwareFirst, check the system version and find the corresponding Linux version from the Oracle official documentation.
[root@FSWWOA /]# cat /proc/versionLinux version 2.6.32-71.el6.x86_64 (root@CentOS6064.localdomain) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Wed Feb 29 15:21:16 CST 2012
The official Oracle documents contain the following versions:
On Red Hat Enterprise Linux 6
2.6.32-71.el6.x86_64 or later
Find the necessary software for installation based on the Linux version, as shown below:
The following or later version of packages for Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4 must be installed:
binutils-2.20.51.0.2-5.11.el6 (x86_64)compat-libcap1-1.10-1 (x86_64)compat-libstdc++-33-3.2.3-69.el6 (x86_64)compat-libstdc++-33-3.2.3-69.el6.i686gcc-4.4.4-13.el6 (x86_64)gcc-c++-4.4.4-13.el6 (x86_64)glibc-2.12-1.7.el6 (i686)glibc-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6.i686kshlibgcc-4.4.4-13.el6 (i686)libgcc-4.4.4-13.el6 (x86_64)libstdc++-4.4.4-13.el6 (x86_64)libstdc++-4.4.4-13.el6.i686libstdc++-devel-4.4.4-13.el6 (x86_64)libstdc++-devel-4.4.4-13.el6.i686libaio-0.3.107-10.el6 (x86_64)libaio-0.3.107-10.el6.i686libaio-devel-0.3.107-10.el6 (x86_64)libaio-devel-0.3.107-10.el6.i686make-3.81-19.el6sysstat-9.0.4-11.el6 (x86_64)
Check whether the above software is installed in the system. If not, install the software.
yum install -y binutils.x86_64 binutils-devel.x86_64yum install -y compat-libcap1.x86_64yum install -y compat-libstdc++-33.x86_64yum install -y compat-libstdc++-33.i386yum install -y gcc.x86_64 gcc-c++.x86_64yum install -y glibc.x86_64 glibc.i686 glibc-devel.x86_64 glibc-devel.i386yum install -y ksh.x86_64yum install -y libgcc.i386 libgcc.x86_64yum install -y libstdc++.i386 libstdc++.x86_64 libstdc++-devel.i386 libstdc++-devel.x86_64yum install -y libaio libaio-develyum install -y make.x86_64yum install -y sysstat.x86_64yum install -y pdksh.x86_64/*-------------------------------------*/yum install -y unixODBC.x86_64 unixODBC.i386 unixODBC-devel.i386 unixODBC-devel.x86_64
3. Create Oracle users and groups[Root @ FSWWOA/] # groupadd dba [root @ FSWWOA/] # groupadd oinstall # Add User [root @ FSWWOA/] # useradd-g oinstall-G dba oracle # Set Oracle password [root @ FSWWOA/] # pwd oracle # password used here: oracle
4. Modify system parameter 4.1 and modify the user's SHELL restrictionsModify the/etc/security/limits. conf file
vi /etc/security/limits.conf
Add the following content to the file:
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536
4.2 modify the/etc/pam. d/login filevi /etc/pam.d/login
Add the following content to the file:
session required /lib/security/pam_limits.sosession required pam_limits.so
4.3 modify system core parametersModify the/etc/sysctl. conf file vi/etc/sysctl. conf and add
fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576
If sysctl-p is executed, the configuration takes effect immediately. Use sysctl-a to view all system parameters.
5. Create an Oracle installation directory 5.1 create an Oracle Installation Directorycd /u01mkdir -p app/oracle/product/11.2.0/dbhome_1mkdir app/oradata
5.2 modify directory owner[Root @ FSWWOA u01] # chown-R oracle: oinstall app [root @ FSWWOA u01] # ll total usage 20drwxr-xr-x. 4 oracle oinstall 4096 08:46 appdrwx ------. 2 root 16384 November 24 14:29 lost + found
6. Modify system environment variablesUse vi ~ /. Bash_profile open the environment variable configuration file. Add the following content
export ORACLE_BASE=/u01/appexport ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1export ORACLE_SID=orclexport PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Then use source ~ /. Bash_profile indicates that the configuration takes effect immediately. Use env | grep ORACLE to view environment variable configurations.
7. Install Oracle7.1 and decompress the Oracle Installation FileCopy Oracle to the Linux server and decompress
unzip linux.x64_11gR2_database_1of2.zipunzip linux.x64_11gR2_database_2of2.zip
If the disk is installed, mount-t iso9660/dev/dvd/mnt/dvd to the disk.
7.2 set the installation environmentIf the character encoding in Linux is Chinese, the Oracle Installation interface will be garbled during installation. You can use export LANG = en_US to change the session character set to the English character set, and then install it without garbled characters.
In addition, the graphical interface is required for Oracle installation.
For the remaining parts, see the PDF document (too many subsequent images will not be uploaded one by one). The remaining parts are as follows:
7.3 start Oracle Installation
VIII. test installation results
9. Modify the firewall configuration and add the Oracle port to the exception
10. Set Oracle to self-start
11. Setting the Oracle user name and password is case insensitive