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

Ok

Up.

The following list 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.i686

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)

Rpm-q

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

Filename

Yum Install filename

Yum's not there.

Google found

RPM wgetxxxx.rpm

rpm-ivhxxx.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-LIBCAP1 \

COMPAT-LIBSTDC++-33 \

compat-libstdc++-33*.i686 \

Elfutils-libelf-devel \

GCC \

gcc-c++ \

glibc*.i686 \

GLIBC \

Glibc-devel \

glibc-devel*.i686 \

Ksh \

libgcc*.i686 \

LIBGCC \

libstdc++ \

libstdc++*.i686 \

Libstdc++-devel \

libstdc++-devel*.i686 \

Libaio \

libaio*.i686 \

Libaio-devel \

libaio-devel*.i686 \

Make \

Sysstat \

UNIXODBC \

unixodbc*.i686 \

Unixodbc-devel \

unixodbc-devel*.i686 \

Libxp

#修改主机名

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

[Root@oracledb ~]# hostname

OracleDB

#添加主机名与IP对应记录

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

192.168.1.160 OracleDB

#关闭Selinux

[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

net.core.rmem_default=262144

net.core.wmem_default=262144

net.core.rmem_max=4194304

net.core.wmem_max=1048576

FS.AIO-MAX-NR = 1048576

Or:
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

Fi

Fi

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

Export ORACLE_SID=ORCL

Or:

Oracle_base=/opt/oracle/app

Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1

Oracle_sid=orcl

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

[Oracle@oracle~]#./media/database/runinstaller

Enter the Installation interface

#输入接受一些安全问题的邮件地址

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

#选择服务器版本

#单实例数据库

#高级模式安装

#添加支持的语言

#选择要安装的版本

#安装数据库目录/opt/oracle/app/opt/oracle/app/product/11.2.0/dbhome_1

#数据库用途

#数据库名及服务名

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

#启用Oracle企业管理控制台OEM

#选择数据库文件目录/opt/oracle/app/oradata

#自动备份设置 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

#sys和system用户区别

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.

#sysdba和sysoper两个系统权限区别

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

#dba和sysdba的区别

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.