`
zhangbo_on
  • 浏览: 2374 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

Linux64位安装oracle11g过程

阅读更多

Linux64位安装oracle11g过程

<!--[if !supportLists]-->1.   <!--[endif]-->安装环境

Linux版本:Linux Redhat 5.5 64

Oracle版本:Oracle11gR2 64

<!--[if !supportLists]-->2.   <!--[endif]-->系统要求

2.1 Linux安装Oracle系统要求

系统要求

说明

内存

必须高于1G的物理内存

交换空间

一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小

硬盘

5G以上

2.2修改操作系统核心参数

Root用户下执行以下步骤:

2.2.1     修改用户的SHELL的限制

Oracle 建议对每个 Linux 帐户可以使用的进程数和打开的文件数设置限制

输入命令:vi /etc/security/limits.conf

i键进入编辑模式,将下列内容加入该文件末尾。

oracle   soft    nproc    2047
oracle   hard    nproc    16384
oracle   soft    nofile     1024
oracle   hard    nofile    65536

编辑完成后按Esc键,输入“:wq”存盘退出

2.2.2     修改/etc/pam.d/login 文件

输入命令:vi /etc/pam.d/logini键进入编辑模式,将下列内容加入该文件末尾。

session   required    /lib/security/pam_limits.so
session   required    pam_limits.so

编辑完成后按Esc键,输入“:wq”存盘退出

2.2.3     修改linux内核,修改/etc/sysctl.conf文件

输入命令: vi /etc/sysctl.confi键进入编辑模式,将下列内容加入该文件末尾

fs.file-max = 6815744

fs.aio-max-nr = 1048576

 

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

 

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

编辑完成后按Esc键,输入“:wq”存盘退出

2.2.4     使 /etc/sysctl.conf 更改立即生效

输入:sysctl -p

2.2.5     修改 bash ksh 的默认配置文件以及 cshell 的默认登录脚本

输入命令:vi /etc/profile,按i键进入编辑模式,将下列内容加入该文件。

if [ $USER = "oracle" ]; then

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

        ulimit -p 16384

        ulimit -n 65536

    else

        ulimit -u 16384 -n 65536

    fi

fi

编辑完成后按Esc键,输入“:wq”存盘退出

2.2.6     创建相关用户和组

作为软件安装和支持组的拥有者。

创建用户,输入命令:

groupadd  oinstall

groupadd  dba

创建Oracle用户和密码,输入命令:

useradd -g oinstall -g dba -m oracle

passwd  oracle

然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认

2.2.7     创建数据库软件目录和数据文件存放目录

目录的位置,根据自己的情况来定,注意磁盘空间即可,这里我把其放到oracle用户下,例如:

输入命令:

mkdir /oracle/app

mkdir /oracle/app/oracle

mkdir /oracle/app/oradata

mkdir /oracle/app/oracle/product

2.2.8     修改Oracle目录属主

更改目录属主为Oracle用户所有,输入命令:

 chown -R oracle:oinstall /oracle/app

2.2.9     配置oracle用户的环境变量

首先,切换到新创建的oracle用户下,输入:su - oracle 

然后直接在输入 :vi .bash_profile

i编辑 .bash_profile,进入编辑模式,增加以下内容:

umask 022

export ORACLE_BASE=/oracle/app

export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1

export ORACLE_SID=orcl

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

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

编辑完成后按Esc键,输入“:wq”存盘退出

<!--[if !supportLists]-->3.   <!--[endif]-->安装过程

首先在linux主机使用root用户执行:

xhost local:oracle non-network local connections being added to access control list

3.1   导入Oracle安装包

当上述系统要求操作全部完成后,注销系统,在图形界面以Oracle用户登陆。首先将下载的Oracle安装包复制到linux中,推荐用Xmanager 或其他ftp工具拷贝。

   打开一个终端,运行unzip命令解压oracle安装文件,如:

输入命令:

unzip  linux.x64_11gR2_database_1of2.zip 

unzip  linux.x64_11gR2_database_2of2.zip

 解压完成后 cd 进入其解压后的目录database

输入命令:

cd  database

使用ls命令可以查看解压后database所包含的文件,如下图:

<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_120" o:spid="_x0000_i1064" type="#_x0000_t75" style='width:336.75pt;height:25.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title="clip_image001"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

3.2    执行安装

输入命令:./runInstaller

<!--[if gte vml 1]><v:shape id="图片_x0020_119" o:spid="_x0000_i1063" type="#_x0000_t75" style='width:432.75pt; height:324pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image002.jpg" o:title="clip_image003"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_118" o:spid="_x0000_i1062" type="#_x0000_t75" style='width:434.25pt; height:325.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image003.jpg" o:title="clip_image005"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_117" o:spid="_x0000_i1061" type="#_x0000_t75" style='width:434.25pt; height:324.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image004.jpg" o:title="clip_image007"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_116" o:spid="_x0000_i1060" type="#_x0000_t75" style='width:434.25pt; height:325.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image005.jpg" o:title="clip_image009"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_115" o:spid="_x0000_i1059" type="#_x0000_t75" style='width:435pt; height:327.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image006.jpg" o:title="clip_image011"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_114" o:spid="_x0000_i1058" type="#_x0000_t75" style='width:438pt; height:327pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image007.jpg" o:title="clip_image013"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_113" o:spid="_x0000_i1057" type="#_x0000_t75" style='width:437.25pt; height:327pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image008.jpg" o:title="clip_image015"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_112" o:spid="_x0000_i1056" type="#_x0000_t75" style='width:438pt; height:328.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image009.jpg" o:title="clip_image017"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

注意:

装到这一步,可以看到,可以查看到有很多的rpm包没有,我们可以从安装linux的光盘或ISO中查找所缺的包,使用ftp上传到linux中,然后使用rpm  ivh  xxx.rpm  --nodeps force 来进行安装(其中加上--nodeps -- force 代表强制安装,是在直接使用rpm ivh  xxx.rpm安装不成功的情况下用的)安装过程略。

   等到把包全部都安装好的情况下,再次在oracle图形界面中,执行安装过程2,下来在环境检查过程中,就通过了。

<!--[if gte vml 1]><v:shape id="图片_x0020_111" o:spid="_x0000_i1055" type="#_x0000_t75" style='width:439.5pt; height:328.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image010.jpg" o:title="clip_image019"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

3.3    安装完成后,系统会提示你需要用root权限执行2shell脚本

按照其提示的路径,找到其所在的位置,如:在/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh /oracle/app/oraInventory/orainstRoot.sh  新开启一个终端,输入命令:

su - root

cd  /oracle/app/oracle/product/11.2.0/dbhome_1

sh  root.sh

cd /oracle/app/oraInventory

sh  orainstRoot.sh

<!--[if !supportLists]-->4.   <!--[endif]-->数据库建库

1) 还是在oracle用户的图形界面oracle用户中,新开启一个终端,直接输入命令dbca会弹出如下界面。我们这里采用定制数据库。

<!--[if gte vml 1]><v:shape id="图片_x0020_110" o:spid="_x0000_i1054" type="#_x0000_t75" style='width:432.75pt; height:303pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image011.jpg" o:title="clip_image021"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_109" o:spid="_x0000_i1053" type="#_x0000_t75" style='width:433.5pt; height:304.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image012.jpg" o:title="clip_image023"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_108" o:spid="_x0000_i1052" type="#_x0000_t75" style='width:432.75pt; height:307.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image013.jpg" o:title="clip_image025"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_107" o:spid="_x0000_i1051" type="#_x0000_t75" style='width:432.75pt; height:305.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image014.jpg" o:title="clip_image027"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

输入统一密码(也可以分别设置其密码)

<!--[if gte vml 1]><v:shape id="图片_x0020_106" o:spid="_x0000_i1050" type="#_x0000_t75" style='width:6in; height:303pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image015.jpg" o:title="clip_image029"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

数据库存放位置,我这里采用默认

<!--[if gte vml 1]><v:shape id="图片_x0020_105" o:spid="_x0000_i1049" type="#_x0000_t75" style='width:430.5pt; height:303pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image016.jpg" o:title="clip_image031"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

不指定快速恢复和归档

<!--[if gte vml 1]><v:shape id="图片_x0020_104" o:spid="_x0000_i1048" type="#_x0000_t75" style='width:426pt; height:297.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image017.jpg" o:title="clip_image033"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

去掉不常用的模块

<!--[if gte vml 1]><v:shape id="图片_x0020_103" o:spid="_x0000_i1047" type="#_x0000_t75" style='width:426.75pt; height:300.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image018.jpg" o:title="clip_image035"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

内存分配及指定字符集

<!--[if gte vml 1]><v:shape id="图片_x0020_102" o:spid="_x0000_i1046" type="#_x0000_t75" style='width:429.75pt; height:298.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image019.jpg" o:title="clip_image037"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_101" o:spid="_x0000_i1045" type="#_x0000_t75" style='width:429pt; height:302.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image020.jpg" o:title="clip_image039"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_100" o:spid="_x0000_i1044" type="#_x0000_t75" style='width:423pt; height:296.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image021.jpg" o:title="clip_image041"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

经过漫长的等待,当看到此界面,说明oracle建库完成

<!--[if gte vml 1]><v:shape id="图片_x0020_99" o:spid="_x0000_i1043" type="#_x0000_t75" style='width:424.5pt; height:300pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image022.jpg" o:title="clip_image043"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

可以用sqlplus来检验下,新开启一个命令窗口,输入sqlplus,然后输入用户名和密码,可以测试下,这里就不做过多的介绍了。

<!--[if !supportLists]-->5.   <!--[endif]-->配置监听及本地网络服务

1) 在oracle用户的图形界面oracle用户中,新开启一个终端,输入命令netca 会弹出如下界面。

<!--[if gte vml 1]><v:shape id="图片_x0020_98" o:spid="_x0000_i1042" type="#_x0000_t75" style='width:423pt; height:279pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image023.jpg" o:title="clip_image045"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

2)创建监听服务(充当oracle服务器,让别的oracle客户端连接本oracle服务器)

<!--[if gte vml 1]><v:shape id="图片_x0020_97" o:spid="_x0000_i1041" type="#_x0000_t75" style='width:423pt; height:280.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image024.jpg" o:title="clip_image047"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_96" o:spid="_x0000_i1040" type="#_x0000_t75" style='width:418.5pt; height:278.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image025.jpg" o:title="clip_image049"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_95" o:spid="_x0000_i1039" type="#_x0000_t75" style='width:419.25pt; height:279.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image026.jpg" o:title="clip_image051"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_94" o:spid="_x0000_i1038" type="#_x0000_t75" style='width:420pt; height:279pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image027.jpg" o:title="clip_image053"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_93" o:spid="_x0000_i1037" type="#_x0000_t75" style='width:419.25pt; height:279pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image028.jpg" o:title="clip_image055"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_92" o:spid="_x0000_i1036" type="#_x0000_t75" style='width:423pt; height:283.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image029.jpg" o:title="clip_image057"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

3)配置本地网络服务名(充当oracle客户端,连接别的oracle服务器)

<!--[if gte vml 1]><v:shape id="图片_x0020_91" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:426pt; height:282.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image030.jpg" o:title="clip_image059"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_90" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:425.25pt; height:282.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image031.png" o:title="clip_image060"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

输入连接的oracle服务器的数据库的实例名

<!--[if gte vml 1]><v:shape id="图片_x0020_89" o:spid="_x0000_i1033" type="#_x0000_t75" style='width:430.5pt; height:287.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image032.png" o:title="clip_image061"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_88" o:spid="_x0000_i1032" type="#_x0000_t75" style='width:427.5pt; height:284.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image033.png" o:title="clip_image062"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

输入oracle服务器的ip地址

<!--[if gte vml 1]><v:shape id="图片_x0020_87" o:spid="_x0000_i1031" type="#_x0000_t75" style='width:423pt; height:279.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image034.jpg" o:title="clip_image064"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

选中测试

<!--[if gte vml 1]><v:shape id="图片_x0020_86" o:spid="_x0000_i1030" type="#_x0000_t75" style='width:418.5pt; height:279pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image035.jpg" o:title="clip_image066"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

点击change Login 输入所连接oracle服务器的其中某一个用户名和密码,点击OK

<!--[if gte vml 1]><v:shape id="图片_x0020_85" o:spid="_x0000_i1029" type="#_x0000_t75" style='width:417pt; height:279pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image036.jpg" o:title="clip_image068"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

看到此界面说明测试成功(如果不成功,请查看网络是否畅通,所连接的oracle服务器是否启动,监听是否启动等原因)

<!--[if gte vml 1]><v:shape id="图片_x0020_84" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:410.25pt; height:270.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image037.jpg" o:title="clip_image070"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

为你所设置的本地网络服务名起个名字

<!--[if gte vml 1]><v:shape id="图片_x0020_83" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:408.75pt; height:272.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image038.jpg" o:title="clip_image072"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 然后下一步,下一步即可

<!--[if gte vml 1]><v:shape id="图片_x0020_82" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:405pt; height:266.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image039.jpg" o:title="clip_image074"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_81" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:403.5pt; height:265.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\zhangbo\AppData\Local\Temp\msohtmlclip1\01\clip_image040.jpg" o:title="clip_image076"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

这样oracle服务器安装配置基本就完成了。

<!--[if !supportLists]-->6.      <!--[endif]-->配置oracle开机自启动

<!--[if !supportLists]-->1   <!--[endif]--> 

<!--[if !supportLists]-->2   <!--[endif]--> 

<!--[if !supportLists]-->3   <!--[endif]--> 

<!--[if !supportLists]-->4   <!--[endif]--> 

<!--[if !supportLists]-->5   <!--[endif]--> 

<!--[if !supportLists]-->6   <!--[endif]--> 

<!--[if !supportLists]-->6.1   <!--[endif]-->修改/etc/oratab

[root@oracle ~]# vi /etc/oratab

orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y(N 改为 Y)

<!--[if !supportLists]-->6.2   <!--[endif]-->修改oracle启停服务

需要修改两个文件:

$ORACLE_HOME/BIN/dbstart

$ORACLE_HOME/BIN/dbshut

[root@oracle ~]#vi /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart

[root@oracle ~]# vi /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbshut

 

ORACLE_HOME_LISTNER=$ORACLE_HOME  $1改为$ORACLE_HOME

<!--[if !supportLists]-->6.3   <!--[endif]-->建立启动脚本

[root@oracle ~]#vi /etc/rc.d/init.d/oracle

#!/bin/bash

# chkconfig: 2345 99 10

# description: Startup Script for oracle Databases

# /etc/rc.d/init.d/oracle

export ORACLE_BASE=/oracle/app/oracle

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

export ORACLE_SID=orcl

export PATH=$PATH:$ORACLE_HOME/bin

case "$1" in

start)

echo "-----startup oracle-----" >> /var/log/racle11log

su oracle -c "$ORACLE_HOME/bin/dbstart"

su oracle -c "$ORACLE_HOME/bin/emctl start dbconsole"

touch /var/lock/subsys/oracle

echo "-----startup oracle successful-----" >> /var/log/oraclelog

echo "OK"

;;

stop)

echo "-----shutdwn oracle-----" >> /var/log/oraclelog

su oracle -c "$ORACLE_HOME/bin/dbshut"

su oracle -c "$ORACLE_HOME/bin/emctl stop dbconsole"

rm -f /var/lock/subsys/oracle

echo "-----shutdown oracle successful-----" >> /var/log/oraclelog

echo "OK"

;;

*)

echo "Usage: 'basename $0' start|stop"

exit 1

esac

exit 0

<!--[if !supportLists]-->6.4   <!--[endif]-->给启动脚本设置权限

[root@oracle ~]#chmod 755 /etc/rc.d/init.d/oracle

<!--[if !supportLists]-->6.5   <!--[endif]-->建立服务

[root@oracle ~]#chkconfig --add oracle

 

[root@oracle ~]#chkconfig oracle on

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics