centos6.5 Install Oracle 11GR2 64-bit step description ____oracle

Source: Internet
Author: User
Tags chmod dba

CentOS 6.5_x64 Install Oracle 11g R2 installation Environment: Operating system: centos6.5_x64 Desktop Host Name: OracleDB Memory: 1G (official minimum requirements 1G) hard drive: 40G (4.29G and 1.7G data required for enterprise installation) File) Pre-installation System Preparation: #设置操作系统 system support Red Hat Enterprise Linux 6,centos 6 is actually RHEL6, but Oracle does not recognize, so to change the vim/etc/redhat-release #CentOS Release 6.3 (Final) This line is commented out, plus the following Red Hat Enterprise Linux 6


This is the most annoying. Countless people are dying on this, or they're wasting their energy on this.

But 11g.

It's very human, it adds a mechanism for checking,

And it's not like 10g.

That in

64-bit to install a lot of

32-bit package, you only need to install a

gcc-32bit-4.3 is



The following list must be installed:

Binutils- (x86_64)

Compat-libcap1-1.10-1 (x86_64)

Compat-libstdc++-33-3.2.3-69.el6 (x86_64)


Gcc-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.i686 Ksh libgcc-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.i686 libstdc++- Devel-4.4.4-13.el6 (x86_64) libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6 (x86_64)  libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6 (x86_64) libaio-devel-0.3.107-10.el6.i686 make-3.81-19.el6 Sysstat-9.0.4-11.el6 (x86_64)

Technique (The package name does not add the version number, that is, the first

Not after "-number", such as GCC)


Package name Yum List installed | grep ' ^ Package name

' Not fitted with a good network or configuration

DVD2 Yum Install

Package Name

Yum Install

Package Name

* Yum Search Package Name

Yum Whatprovides


Yum Install filename

Yum's not there.

Google found

RPM wgetxxxx.rpm


OK, install, before installing, update the system to the latest version first

Yum list Updates

Yum Upgrade

Reboot I have written the above package to install an order, unless the character is bad, otherwise should be a success

Yum-y install \

Binutils \



compat-libstdc++-33*.i686 \

Elfutils-libelf-devel \


gcc-c++ \

glibc*.i686 \


Glibc-devel \

glibc-devel*.i686 \

Ksh \

libgcc*.i686 \


libstdc++ \

libstdc++*.i686 \

Libstdc++-devel \

libstdc++-devel*.i686 \

Libaio \

libaio*.i686 \

Libaio-devel \

libaio-devel*.i686 \

Make \

Sysstat \


unixodbc*.i686 \

Unixodbc-devel \

unixodbc-devel*.i686 \



[Root@oracledb ~]# sed-i "s/hostname=localhost.localdomain/hostname=oracledb/"/etc/sysconfig/network

[Root@oracledb ~]# hostname



[Root@oracledb ~]# vi/etc/hosts OracleDB


[Root@oracledb ~]# sed-i "s/selinux=enforcing/selinux=disabled/"/etc/selinux/config [root@oracledb ~]# setenforce 0

1, install the dependent package

Yum Install elfutils-libelf-devel*

[root@oracledb ~]# yum-y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel BC Glibc-common glibc-devel Libaio libaio-devel libgcc libstdc++ libstdc++-devel unixodbc unixODBC-devel

2. Create users and Groups [Root@oracledb ~]# sysctl-p

[Root@oracledb ~]# groupadd-g Oinstall

[Root@oracledb ~]# groupadd-g 201 dba

[Root@oracledb ~]# useradd-u 440-g oinstall-g dba Oracle

[Root@oracledb ~]# passwd Oracle

3. Modify Kernel Parameters

[Root@oracledb ~]# vi/etc/sysctl.conf


Net.ipv4.ip_local_port_range= 9000 65500

Fs.file-max = 6815744

Kernel.shmall = 10523004

Kernel.shmmax = 6465333657

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100128





FS.AIO-MAX-NR = 1048576

FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 1200000000
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

4, modify the system resource constraints

[Root@oracledb ~]# vi/etc/security/limits.conf


Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

[Root@oracledb ~]# Vi/etc/pam.d/login

Session Required Pam_namespace.so

#下面添加一条pam_limits. So

Session Required Pam_limits.so

[Root@oracledb ~]# Vi/etc/profile #这个感觉没多大用

If ["$USER" = "Oracle"]; Then

If ["$SHELL" = "/bin/ksh"];then

Ulimit-p 16384

Ulimit-n 65536

else Ulimit-u 16384-n 65536



Causes the following problems to be resolved:

-bash:ulimit:open Files:cannot Modify limit:operation not permitted

I came today to look at the problem, after Google search found that the configuration problem is resolved as follows:

[Root@inner ~]# vi/etc/security/limits.conf

* Soft Nofile 65536

* Hard Nofile 65536

5. Create installation directory and set permissions

[Root@oracledb ~]# mkdir/opt/oracle/app/

[Root@oracledb ~]# mkdir/opt/oracle/oradata/

[Root@oracledb ~]# chmod 755/opt/oracle/

[Root@oracledb ~]# chmod 775/opt/oracle/app/

[Root@oracledb ~]# chown-r oracle:oinstall/opt/oracle/

6. Set Oracle Environment variables

[Oracle@oracledb ~]$ VI ~/.bash_profile

Export Oracle_base=/opt/oracle/app

Export Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1

Export path= $PATH: $ORACLE _home/bin




Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1


Export Oracle_base oracle_home Oracle_sid

Path= $PATH: $ORACLE _home/bin

Exprot PATH

[Oracle@oracledb ~]$ source. Bash_profile #立即生效

7. Install Oracle

Download and extract:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html [root@oracledb~]# Unzip/media /linux.x64_11gr2_database_1of2.zip

[root@oracledb~]# Unzip/media/linux.x64_11gr2_database_2of2.zip

[root@oracledb~]# Xhost + #使所有用户都能访问图形桌面

[root@oracledb~]# su–oracle


Enter the Installation interface


#选择安装数据库软件并创建数据, select the first item. You can also select the second item to install only the database software









#开启自动内存管理 $$ #设置默认编码为UTF8



#自动备份设置 does not



#检查Oracle一些安装要求, packages are already installed and are ignored directly



#安装完成后, a dialog box prompts you to execute both scripts using the root user

[Root@oracledb ~]$/opt/oracle/orainventory/orainstroot.sh

[Root@oracledb ~]$/opt/oracle/app/product/11.2.0/dbhome_1/root.sh

8. Oracle Common Commands

[Root@oracledb ~]# Su–oracle

[Oracle@oracledb ~]# sqlplus/as sysdba sql> startup #启动数据库实例

sql> Shutdown Immediate #关闭数据库实例

Sql> select * from tab; #查看所有表

Sql> select name from V$datafile #查看数据库存放目录

Sql> Show parameter Service #查看服务名

Sql> select * from V$instance; #查看实例名

Sql> select name from V$database; #查看数据库名

sql> SELECT * fromdba_users; #查看所有用户信息

Sql> select Username,password from Dba_users; #只查询用户和密码

sql> SELECT * fromv$pwfile_users; #查看具有sysdba权限的用户

sql> SELECT * FROMDBA_USTATS; #查看当前用户信息

Sql> SELECT * Fromuser_sys_privs #查看当前用户系统权限

Sql> SELECT * Fromuser_role_privs #查看当前用户角色

Sql> SELECT * Fromdba_sys_privs #查看指定用户所具有的系统权限

Sql> SELECT * Fromv$version #查看oracle版本

Sql> SELECT * Fromuser_views #查看视图信息

[Root@oracledb ~]# lsnrctl start #开启远程监听端口

# # #远程连接信息/opt/oracle/app/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

9. Oracle Users


1> Storage data importance different SYS store the base tables and views of the data dictionary, maintained by the database itself, no user can change manually, SYS user has DBA, SYSDBA, sysoper roles or permissions, is the highest user of Oracle permissions. The system user only holds some level of internal data, such as some Oracle features or management information for the tool. For database administration, the system user has the normal DBA role permissions.

2>. Different rights sys user has SYSDBA or sysoper system privileges, login em can only use these two identities, not normal. The system user can only log on to em with normal, unless you grant SYSDBA system privileges or syspoer system privileges.


Normal is a normal user

SYSDBA has the highest system privileges and is the SYS after login

Sysoper is mainly used to start and close the database, sysoper the user is public after login


Learn about the process of creating an Oracle service: Creating an instance--> starting an instance--> creating a database

Start process: Instance start--> Mount database--> Open Database

SYSDBA is the management Oracle instance, its existence does not depend on the entire database to start completely, as long as the instance starts, it already exists, log in as SYSDBA, mount the database, open the database. The DBA role has a basis only when the database is open, or when the entire database is fully booted.

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.