Oracle 11g Linux 安装 redhat6.4

12 篇文章 0 订阅

Oracle 11g Linux 安装

 

安装环境:

操作系统 Red Hat Enterprise Linux Server release 6.4 (Santiago) 64

Oracle版本 11.2.0.3

 

安装步骤:

1、检查操作系统版本

Last login: Thu Jan 29 11:02:05 2015 from 10.100.116.83

[root@localhost ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.4 (Santiago)

 

2、关闭selinux

[root@localhost ~]# vi /etc/selinux/conf

SELINUX=disabled

SELINUXTYPE=targeted

 

3、关闭iptable防火墙

[root@localhost ~]# service iptables status

iptables:未运行防火墙。

[root@localhost ~]# service ip6tables stop

ip6tables:清除防火墙规则:[确定]

ip6tables:将 chains 设置为 ACCEPT 策略:filter [确定]

:正在卸载模块:[确定]

[root@localhost ~]# service ip6tables save

[root@localhost ~]# chkconfig iptables off

[root@localhost ~]# chkconfig ip6tables off

 

4、创建oracle系统用户

[root@localhost ~]# groupadd dba

[root@localhost ~]# groupadd oinstall

[root@localhost ~]# useradd -g oinstall -G dba oracle

[root@localhost ~]# id oracle

uid=501(oracle) gid=503(oinstall) =503(oinstall),502(dba)

[root@localhost ~]# passwd oracle

更改用户 oracle 的密码 。

新的 密码:

无效的密码: 它基于字典单词

重新输入新的 密码:

passwd: 所有的身份验证令牌已经成功更新。

 

5、修改系统参数文件:

[root@localhost ~]# vi /etc/sysctl.conf

 

# Controls the default maxmimum size of a mesage queue

kernel.msgmnb = 65536

 

# Controls the maximum size of a message, in bytes

kernel.msgmax = 65536

 

# Controls the maximum shared segment size, in bytes

kernel.shmmax = 68719476736

 

# Controls the maximum number of shared memory segments, in pages

kernel.shmall = 4294967296

fs.file-max=6815744

fs.aio-max-nr = 1048576

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 = 1048586

~

~

"/etc/sysctl.conf" 49L, 1406C written

[root@localhost ~]# sysctl -p  --应用新的参数

 

6、修改etc/security/limits.conf 限制用户对系统资源的使用

[root@localhost ~]# vi /etc/security/limits.conf

oracle              soft    nproc   2047

oracle              hard    nproc   16384

oracle              soft    nofile  1024

oracle              hard    nofile  65536

oracle              soft    stack   10240

"/etc/security/limits.conf" 56L, 2124C written

 

7、查看文件/etc/pam.d/login,确保写入下列信息

[root@localhost ~]# vi /etc/pam.d/login

session    required     pam_limits.so

"/etc/pam.d/login" 17L, 766C written

 

8、修改oracle安装目录的权限,切换到oracle用户,修改oracle环境变量

[root@localhost ~]# chown -R oracle:oinstall /app

[root@localhost ~]# chmod -R 775 /app

[root@localhost ~]# su - oracle

[oracle@localhost ~]$ vi .bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

ORACLE_BASE=/app/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

ORACLE_SID=ggdir

LD_LIBRARY_PATH=$ORACLE_HOME/lib

PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

~

~

".bash_profile" 18L, 400C 已写入                                                                                                           

[oracle@localhost ~]$ source .bash_profile

 

9、检查需要的包是否都已安装,命令rpm -q 包名

[oracle@localhost ~]$ rpm -q binutils

binutils-2.20.51.0.2-5.36.el6.x86_64

[oracle@localhost ~]$ rpm -q elfutils-libelf

elfutils-libelf-0.152-1.el6.x86_64

[oracle@localhost ~]$ rpm -q gcc

gcc-4.4.7-3.el6.x86_64

[oracle@localhost ~]$ rpm -q gcc-c++

gcc-c++-4.4.7-3.el6.x86_64

[oracle@localhost ~]$ rpm -q glibc

glibc-2.12-1.107.el6.x86_64

glibc-2.12-1.107.el6.i686

[oracle@localhost ~]$ rpm -q glibc-common

glibc-common-2.12-1.107.el6.x86_64

[oracle@localhost ~]$ rpm -q glibc-devel

glibc-devel-2.12-1.107.el6.x86_64

[oracle@localhost ~]$ rpm -q glibc-headers

glibc-headers-2.12-1.107.el6.x86_64

[oracle@localhost ~]$ rpm -q libaio

libaio-0.3.107-10.el6.x86_64

[oracle@localhost ~]$ rpm -q libgcc

libgcc-4.4.7-3.el6.x86_64

libgcc-4.4.7-3.el6.i686

[oracle@localhost ~]$ rpm -q libstdc++

libstdc++-4.4.7-3.el6.x86_64

[oracle@localhost ~]$ rpm -q libstdc++-devel

libstdc++-devel-4.4.7-3.el6.x86_64

[oracle@localhost ~]$ rpm -q make

make-3.81-20.el6.x86_64

[oracle@localhost ~]$ rpm -q sysstat

sysstat-9.0.4-20.el6.x86_64

[oracle@localhost ~]$ rpm -q elfutils-libelf-devel

elfutils-libelf-devel-0.152-1.el6.x86_64

[oracle@localhost ~]$ rpm -q pdksh

pdksh-5.2.14-30.x86_64

[oracle@localhost ~]$ rpm -q unixODBC

unixODBC-2.2.14-12.el6_3.x86_64

[oracle@localhost ~]$ rpm -q unixODBC-devel

unixODBC-devel-2.2.14-12.el6_3.x86_64

[oracle@localhost ~]$ rpm -q libaio-devel

libaio-devel-0.3.107-10.el6.x86_64

[oracle@localhost ~]$ rpm -q compat-libstdc++-33

compat-libstdc++-33-3.2.3-69.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.i686

 

10、上传安装文件,并解压

[oracle@localhost ~]$ cd /app/oracle

[oracle@localhost oracle]$ ls

p10404530_112030_Linux-x86-64_1of7.zip  p10404530_112030_Linux-x86-64_2of7.zip

[oracle@localhost oracle]$ unzip p10404530_112030_Linux-x86-64_1of7.zip   

[oracle@localhost oracle]$ unzip p10404530_112030_Linux-x86-64_2of7.zip

 

11、运行安装文件,安装oracle软件

[oracle@localhost oracle]$ mkdir -p $ORACLE_HOME

[oracle@localhost oracle]$ cd database

[oracle@localhost database]$ export DISPLAY=10.100.116

[oracle@localhost database]$ export DISPLAY=10.100.116.83:0.0

[oracle@localhost database]$ xhost +

access control disabled, clients can connect from any host

[oracle@localhost database]$ export LANG=c

[oracle@localhost database]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 9416 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-01-30_04-27-29PM. Please wait ...[oracle@localhost database]$ You can find the log of this install session at:

 /app/oraInventory/logs/installActions2015-01-30_04-27-29PM.log

 

12、安装完成后,根据提示以root身份运行两个脚本

[oracle@localhost oraInventory]$ su - root

Password: 

[root@localhost ~]# cd /app

[root@localhost app]# cd oraInventory

[root@localhost oraInventory]# ./orainstRoot.sh

Changing permissions of /app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /app/oraInventory to oinstall.

The execution of the script is complete.

 

[root@localhost oraInventory]# cd $ORACLE_HOME

[root@localhost ~]# cd /app/oracle

[root@localhost oracle]# cd product

[root@localhost product]# cd 11.2.0

[root@localhost 11.2.0]# cd dbhome_1

[root@localhost dbhome_1]# ./root.sh

Performing root user operation for Oracle 11g 

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /app/oracle/product/11.2.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/local/bin

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@localhost dbhome_1]# exit

 

13、切换oracle用户,调用DBCA创建数据库

[oracle@localhost oraInventory]$ cd

[oracle@localhost ~]$ export LANG=c

[oracle@localhost ~]$ export DISPLAY=10.100.116.83:0.0

[oracle@localhost ~]$ xhost +

access control disabled, clients can connect from any host

[oracle@localhost ~]$ dbca

 

14、调用netca配置监听

[oracle@localhost ~]$ netca

 

Oracle Net Services Configuration:

Configuring Listener:LISTENER

Listener configuration complete.

Oracle Net Listener Startup:

    Running Listener Control: 

      /app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER

    Listener Control complete.

    Listener started successfully.

Profile configuration complete.

Default local naming configuration complete.

    Created net service name: ggdir

Oracle Net Services configuration successful. The exit code is 0

[oracle@localhost ~]$ lsnrctl status

 

 

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值