oracle 11g   for redhat 64
admin
2023-05-07 08:01:59
0

环境:  

        (1)  Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41                EST 2013 x86_64 x86_64 x86_64 GNU/Linux

        (2)  内存:2G

        (3)  硬盘容量:30G

        (4)  系统必须为有桌面

        (5)  YUM自己提前配好哦

        (6)  如果在虚拟机上操作,提前先做镜像,在执行以下步骤之前。

步骤:

cat 1.txt

 binutils gcc gcc-c++ gcc-32bit gcc43 gcc43-32bit glibc glibc-32bit glibc-devel glibc-devel-32bit ksh libaio libaio-devel libaio-devel-32bit libelf0 libelf1 libgcc43 libgcc43-32bit libstdc++33 libstdc++33-32bit libstdc++43 libstdc++43-32bit libstdc++43-devel libstdc++43-devel-32bit libstdc++-devel libgomp43-32bit make sysstat libcap unixODBC

然后:

执行脚本: sh install.sh

以下是脚本内容:

#!/bin/bash

for i in `cat 1.txt`;

do

yum install -y $i

done

#

groupadd oinstall

groupadd dba

#

mkdir -p /opt/app

useradd -g oinstall -G dba -d /opt/app/u01 oracle

#

sh mkdi.sh

#useradd -g oinstall -G dba -d /opt/app/u01 oracle

#

echo "123456"|passwd --stdin oracle

#

cp /etc/sysctl.conf /etc/sysctl.conf.bak

#

for i in `cat 2.txt`;

do

echo $? >> /etc/sysctl.conf

done

#

sysctl -p

#

cp /etc/security/limits.conf /etc/security/limits.conf.bak

#

echo "oracle              soft    nproc   2047" >>/etc/security/limits.conf

echo "oracle              hard    nproc   16384" >>/etc/security/limits.conf

echo "oracle              soft    nofile  1024" >>/etc/security/limits.conf

echo "oracle              hard    nofile  65536" >> /etc/security/limits.conf

echo "oracle              soft    stack   10240" >>/etc/security/limits.conf

#

echo "export ORACLE_BASE=/opt/app/product" >>/opt/app/u01/.bash_profile

echo "export ORACLE_HOME=/opt/app/product/software" >>/opt/app/u01/.bash_profile

echo "export ORACLE_SID=keyman" >>/opt/app/u01/.bash_profile

echo "PATH=$PATH:$ORACLE_HOME/bin">>/opt/app/u01/.bash_profile

#

chown oracle:oinstall /opt/*


注意:以上可以写在一个脚本内,一次性执行完毕。


完成以上以后,重启到oracle桌面用户,解压2个oracle的文件


      oracle 11g   for  redhat 64

#unzip linux.x64_11gR2_database_1of2

#unzip linux.x64_11gR2_database_2of2

在完成以上动作后,得到一个database的文件夹,进入到database里面:

#./runInstaller     执行里面这个文件

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

注意: 把Oracle Base:  /opt/app/product

         Software Location:  /opt/app/product/software


剩下的全部默认即可,下一步,下一步即可。

到了检查软件包的那一步,就ignore all,在前面的步骤中,我们已经全部安装了,

即使它还是说没有安装,不用管它,是版本不一样而已,其实已经安装了。

最后finished,结束,退出即可。

到目前,为止,歇一口气,我们只是把oracle软件安装上了,还没有安装oracle数据库和监听listener.


完成上述步骤,继续做:

  #netca     配置监听,一步一步做,全部默认。

 完成之后:

  #dbca      配置数据库 ,如果这个命令不识别,那就/opt/app/product/software/bin/dbca就可以

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

下一步,下一步的做就行,配置密码时,可以写123qweQWE,继续下一步。

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

oracle 11g   for  redhat 64

等待35之后,数据库完成,接下来测试一下:

简单验证

[oracle@powerlong4 ~]$ sqlplus "/ as sysdba"

 

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 24 14:51:10 2015

 

Copyright (c) 1982, 2009, Oracle. All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> create table z_test(id number,name varchar(20));

 

Table created.

 

SQL> insert into z_test select 1,'a' from dual;

 

1 row created.

 

SQL> select * from z_test;

 

ID NAME

---------- ----------------------------------------

1 a

 

SQL> commit;

 

Commit complete.

 

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@powerlong4 ~]$


相关内容

热门资讯

Google在港推出AI代理G... 观点网讯:7月29日,Google在香港推出AI代理Gemini Spark,该代理可全天候在后台运...
5G+165Hz!联想新品官宣... 近两年来,小屏平板一直是比较有趣的一个品类。 不同于大平板注重效率、手机追求万能的特点,拯救者Y70...
原创 马... 马斯克又出来了。这次说2036年钱就没用了。 理由是人工智能加机器人,东西多到你用不完,还拿钱干嘛...
美的集团:我国智能家居互联互通... IT之家 7 月 30 日消息,美的集团今日发布公告,7 月 21 日至 23 日,智能家居互联互通...
华为新款MatePad Pro... 【CNMO科技消息】7月30日,@华为终端 官宣全新旗舰平板华为MatePad Pro。 新款华为...
从实验室到实景验证:6G光子太... 全息通信是第六代移动通信(6G)的典型应用场景之一,旨在通过融合无线传输与全息三维成像技术,实现超大...
从“能对话”到“能干活”——人... 【经济界面】 光明日报记者 刘坤 李晓东 周洪双 人工智能(AI)眼镜化身为个人“助理”,实时进行...
【全新发布】UminiP Pr... (来源:洲明科技)
日本通过“H3火箭8号”发射失... △H3火箭(资料图) 日本文部科学省30日召开关于去年“H3火箭8号”发射失败的会议。会议通过的最终...
互联网巨头抢滩健康硬件,上游芯... 封面新闻记者 付文超 当下,互联网巨头对健康硬件的押注,正在成为产业现实,加速拉动整个产业链步入新一...