Reference article:
Http://www.cnblogs.com/lightnear/archive/2012/10/07/2714247.html
Http://www.cnblogs.com/xqzt/p/5456401.html
Http://www.cnblogs.com/anzerong2012/p/7528311.html
First, installation environment
CentOS Linux release 7.2.1511 (Core)
Oracle Database 11g Release 2 (11.2.0.4)
Second, before the installation of 2.1 modify host name
Modify the hostname variable in the/etc/sysconfig/network configuration file
set-~] #vi/etc/sysconfig/networknetworking=yeshostname=~]# Hostnameoracledb
2.2 Add host name and IP correspondence record
[Email protected] ~]# vi/etc/hosts172.17. 22.70 OracleDB
2.3 Turn off SELinux
" s/selinux=enforcing/selinux=disabled/ " /etc/selinux/config 0
2.4 Firewall open 1521 port and OEM console port
[Email protected] ~]# firewall-cmd--permanent--zone= public --add-port=1521/TCP Success
[Email protected] ~]# firewall-cmd--permanent--zone=public--add-port=1588/TCP Success
~]# Firewall-cmd--Reload Success
2.5 Downloads
Oracle 11g
Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
2.6 Checking hardware configuration requirements
Minimum memory 1 GB of RAM
Virtual Memory capacity
Available RAM |
Swap Space Required |
Between 1 GB and 2 GB |
1.5 times the size of RAM |
Between 2 GB and GB |
Equal to the size of RAM |
More than GB |
+ GB |
Hard disk space requirements
Database software hard disk space requirements:
Installation Type |
Requirement for Software Files (GB) |
Enterprise Edition |
3.95 |
Standard Edition |
3.88 |
Data file hard disk space requirements:
Installation Type |
Requirement for Data Files (GB) |
Enterprise Edition |
1.7 |
Standard Edition |
1.5 |
command to check
/proc//proc/-ah
2.7
Install the required packages
You can view the packages that are required on different platforms by looking at the package requirements listed in the Oracle installation documentation.
Packages for Oracle Linux 7
Yum-y Install binutils compat-libcap1 compat-libstdc++.i686 compat-libstdc++.x86_64 elfutils-libelf Elfutils-libelf-devel gcc gcc-c++ glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libxext libxtst libX11 libxau libxcb libxi make Sysstat unixodbc-devel.i686 UnixODB c-devel.x86_64 unixodbc.i686 unixodbc.x86_64 compat-libstdc++-. i686 compat-libstdc++-
2.8 Creating the user and user groups required to install Oracle
Root User: Create Oracle Installation Group Oinstall, DBA for DB Administrators group, and Oracle user
201-G oinstall-g dba-d/home/~]# passwd oracle
2.9 Changing the kernel parameter
[Email protected] ~]# vi/etc/Add the following Net.ipv4.ip_local_port_range at the end of sysctl.conf#=9000 65500Fs.file-max =6815744Kernel.shmall=10523004Kernel.shmmax=6465333657Kernel.shmmni=4096Kernel.sem= - 32000 - -Net.core.rmem_default=262144Net.core.wmem_default=262144Net.core.rmem_max=4194304Net.core.wmem_max=1048576Fs.aio-MAX-NR =1048576
Execute the following command to make the change effective
[Email protected] ~]# sysctl-p
2.10 Modifying system resource limits
[Email protected] ~]# vi/etc/security/limits.conforacle soft nproc 2047Oracle Hard nproc 16384oracle soft nofile 1024x768 Oracle hard nofile 65536
[[email protected] ~]# vi/etc/if"oracle" ]; Then if"/bin/ksh" ]; Then 1638465536 else 1638465536 Fifi
[Email protected] ~]# vi/etc/pam.d/login #下面添加一条pam_limits. So session required pam_limits.so
2.11 Creating the installation directory and setting permissions
[Email protected]/]$ tree/u01//u01/└──oracle ├──app └──oradata
Root creation
[Email protected] ~]# mkdir/777 /u01
[[email protected] ~]$ chmod 755/u01/oracle[[email protected] ~]$ mkdir/u01/oracle/app[[email protected] ~]$ chmod 755/ U01/oracle/app/[[email protected] ~]$ mkdir/u01/oracle/oradata[[email protected] ~]$ chmod 755/u01/oracle/oradata/[[ Email protected] ~]$ vi./.bash_profile# add umask 022export Oracle_base=/u01/oracle/app at the end of the file
2.12 Setting Oracle Environment variables
[Email protected] ~]$ VI ~/bash_profile export oracle_base=/u01/oracle/appexport oracle_home=$ oracle_base/product/11.2. 0/dbhome_1export PATH= $PATH: $ORACLE _home/binexport oracle_sid=~]$ source. Bash_profile #立即生效复制代码
2.13 Installing the Gnome graphical desktop
" GNOME Desktop " " Graphical administration Tools " #安装startx #进入图形桌面
+
Third, install Oracle Database
Use FileZilla to upload Linux.x64_11gR2_database_1of2.zip, linux.x64_11gR2_database_2of2.zip to CentOS
Unzip Linux.x64_11gR2_database_1of2.zipunzip Linux.x64_11gR2_database_2of2.zip
CD/database. /runinstaller #运行安装程序
Enter your email address and password (Oracle user) to receive information such as security updates from Oralce
Choose to install the database software and create the data, or select the second item to install only the database software
Select Server version
Select Install Single instance database in this example
Advanced mode Installation
Select language
Select the version you want to install, select "Enterprise Edition" here
Specify the Oracle Base and software location, we have set this environment variable in the Oracle user profile file, where it remains the default
Specify inventory Directory, this example remains the default
Select Database usage
Database name and service name
Turn on automatic memory management
Set the default encoding to UTF8
Sample Scenario
Enable Oracle Enterprise Management Console OEM
Select Database File directory
Automatic Backup settings
Set database user name and password [Note: Do not start with a number, or you will get an error ORA-00922: The option is missing or invalid]
Specify the Oralce privileged Users group, this example keeps the default
Next, the Oralce installer checks the installation environment,
After installing the missing package, recheck
The installation information is displayed below. Direct finish to start the installation.
Wait for Oracle Installation
When the following window appears, open another terminal, log in as root and execute the following command. When you are done, click OK
[Email protected] oracle]#/usr/oracle/orainventory/orainstroot.sh
[Email protected] oracle]#/usr/oracle/app/product/11.2.0/dbhome_1/root.sh
This completes the Oracle 11g R2 database installation.
Environment variable Configuration
[Email protected] oracle]$ vi ~/. bash_profile# Add export oracle_base =/usr/oracle/appexport Oracle_ at the end of the file HOME= $ORACLE _base/product/11.2. 0/dbhome_1export PATH= $PATH: $ORACLE _home/binexport oracle_sid=ORCL
Iv. Oracle Startup
Start Oracle
su oraclesql> Startup
Start listener
Lsnrctl Start Lsnrctl Status View state
Start Emctl
Emctl Start Dbconsole
V. Encountering problems (resolving links)
http://blog.csdn.net/ljunjie82/article/details/49404481
Http://www.voidcn.com/article/p-ftlwoyby-gn.html
CentOS 7 installs Oracle Database 11g Release 2 (11.2.0.4)