现在的位置: 首页 > 综合 > 正文

Centos6.3下安装64bit oracle11gR2的过程记录

2013年04月13日 ⁄ 综合 ⁄ 共 2763字 ⁄ 字号 评论关闭

1.     首先使用su –
命令切换到root用户,然后创建一个oracle用户,分组,密码

        groupadd oinstall

        groupadd dba

        useradd –g oinstall –G dba oracle

        passwd oracle

2.     vim /etc/pam.d/login,登录认证配置pam模块。在文件末尾添加参数:

         session      required pam_limits.so

3.     oracle用户在bashksh中设定资源限制编辑文件/etc/profile。添加至末尾。vim/etc/profile:

         if [ $USER ="oracle" ]; then

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

                            ulimit -p16384

                            ulimit -n65536

                   else

                            ulimit -u16384 -n 65536

                   fi

           fi

4.     修改登录配置。 vim /etc/csh.login,末尾添加:

             if( $USER =="oracle" ) then

                    limit maxproc16384

                    limitdescriptors 65536

              endif

5.     解压下载的oracle11g的文件,两个压缩包解压在一起,完成之后使用rm命令删除掉压缩文件,解压出来后又一个database文件夹,进入到database文件夹中,运行         
runInstaller

       ./runInstaller

 

6.     在这个过程中可能会出现一些错误

        若出现 
Checking monitor:must be configured to display at least 256 colors

        切换到root用户下执行export DISPLAY=:0.0,再次运行这项检查通过

        若抛出java异常,就使用yum安装一个libXp这个包,因为oracle的这个安装界面是用java写的

7.     
出现了安装界面后,有一步是选择oracle数据库的安装路径,使用su –
切换到root用户,建议选择安装目录在/opt/下面,运行下面的命令建立安装的路径;

         mkdir /opt/oracle

         mkdir /opt/oracle/app

          mkdri /opt/oracle/app/oradata  
数据存放文件夹

          mkdir /opt/oracle/app/product  
oracle软件安装文件夹

           然后把创建的oracle文件夹的权限给oracle用户,使用下面的命令

           chown -R oracle:dba /opt/oracle

8.     
在安装的过程有一步是检查oracle必要的组件和核心文件修改(先决条件的检查),在这里我们可以根据提示安装相应的组件,另外在开启一个终端,su
换成root用户:

      1)     
编辑/etc/security/limits.conf

               # vim/etc/security/limits.conf    
加入以下四行

               oracle 
soft       nproc   2047

               oracle 
hard       nproc   16384

                oracle 
soft       nofile  1024

               oracle 
hard        nofile 65536

 

2)     
配置系统的核心参数

           vim /etc/sysctl.conf 在打开的文件的末尾添加下面内容:

          kernel.shmall = 4294967296    

          net.core.wmem_max=4194304

            net.core.wmem_default=262144

          net.core.rmem_max=4194304

          net.core.rmem_default=4194304

           net.ipv4.ip_local_port_range=9000 65500

          kernel.sem=250 32000 100 128

          fs.file-max = 6815744

          fs.aio-max-nr = 1048576

         使用命令sysctl –p执行使之生效

3)     
剩下不能通过的应该就只有一些必要的包里,我们可以使用yum –y install ….来根据提示安装相应的包,在安装的时候有些包可能提示系统已经安装了,但是oracle检查还通不过,这是包的版本问题,这些剩下不能通过的包我们就直接选择ignore
all
,直接下一步

 

 

9.     
在安装完成的时候,会弹出一个对话框,使用root用户运行这两个提示的脚本

 

 

10.  接下来就是配置oracle用户的环境变量了

使用su oracle 
切换到oracle用户,进入到oracle用户的目录中

使用vim .bash_profile命令编辑,在文件的末尾添加以下内容:

export ORACLE_SID=orcl

export ORACLE_HOME=/opt/oracle/app/product

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

export PATH

11.  到这里oracle11g的安装算是全部完成了

       1)     em
控制台启动 |
关闭

               emctl start | stop dbconsole

              访问 https://localhost:1158/em

        2)     netca   
创建配置监听器

        3)     dbca   
创建,配置数据库等

               lsnrctl      start | stop  
监听器的启动和关闭

抱歉!评论已关闭.