系统要求
1. Linux安装Oracle系统要求
系统要求 说明
内存 必须高于1G的物理内存
交换空间 一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小
硬盘 5G以上
 2.修改操作系统核心参数
在Root用户下执行以下步骤:
1)修改用户的SHELL的限制,修改/etc/security/limits.conf文件
输入命令: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)修改/etc/pam.d/login 文件,输入命令:vi  /etc/pam.d/login,按i键进入编辑模式,将下列内容加入该文件。
session   required    /lib/security/pam_limits.so 
session   required    pam_limits.so
编辑完成后按Esc键,输入“:wq”存盘退出
3)修改linux内核,修改/etc/sysctl.conf文件,输入命令: vi  /etc/sysctl.conf ,按i键进入编辑模式,将下列内容加入该文件
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”存盘退出
4)要使 /etc/sysctl.conf 更改立即生效,执行以下命令。 输入:sysctl  -p 显示如下:
linux:~ # sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
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
5)编辑 /etc/profile ,输入命令: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”存盘退出
6)创建相关用户和组,作为软件安装和支持组的拥有者。
创建用户,输入命令:
groupadd  oinstall 
groupadd  dba
创建Oracle用户和密码,输入命令:
useradd -g oinstall -g dba -m oracle
passwd  oracle
然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认
此处密码gis123
7)创建数据库软件目录和数据文件存放目录,目录的位置,根据自己的情况来定,注意磁盘空间即可,这里我把其放到oracle用户下,例如:
输入命令:
mkdir /home/oracle/app
mkdir /home/oracle/app/oracle
mkdir /home/oracle/app/oradata
mkdir /home/oracle/app/oracle/product
8)更改目录属主为Oracle用户所有,输入命令:
chown -R oracle:oinstall /home/oracle/app
9)配置oracle用户的环境变量,首先,切换到新创建的oracle用户下,
输入:su – oracle  ,然后直接在输入 : vi .bash_profile
按i编辑 .bash_profile,进入编辑模式,增加以下内容:
umask 022
export ORACLE_BASE=/home/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”存盘退出
测试环境变量是否有效:
[gis@localhost ~]$ echo $ORACLE_HOME
 
发现为空。执行下面命令
[gis@localhost ~]$ . ./.bash_profile
再次测试,ok
[gis@localhost ~]$ echo $ORACLE_HOME
/home/oracle/app/oracle/product/11.2.0/dbhome_1
安装过程
1) 当上述系统要求操作全部完成后,注销系统,在图形界面以Oracle用户登陆。
目录/opt/database
输入命令:
cd  /opt/database
使用ls命令可以查看解压后database所包含的文件,如下:
[gis@localhost database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
2) 执行安装,输入命令:./runInstaller
[oracle@localhost database]$ ./runInstaller
bash: ./runInstaller: Permission denied
解决办法:
[oracle@localhost database]$ su root
Password: 
[root@localhost database]# chown -R gis:gis  /opt/database
[root@localhost database]# chmod -R 777 /opt/database
[root@localhost database]# su oracle
然后:
Starting Oracle Universal Installer...
 
Checking Temp space: must be greater than 120 MB.   Actual 25959 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-03-24_06-36-50PM. Please wait ...
 
 

上一张图可以看到缺失很多的rpm包,可以从安装linux的光盘或ISO中查找所缺的包,上传到linux中,

可以用右键菜单安装一部分rpm,如下。

如不能安装,则root用户下使用rpm  –ivh  xxx.rpm  --nodeps –force 来进行安装(其中加上--nodeps -- force 代表强制安装,是在直接使用rpm –ivh  xxx.rpm安装不成功的情况下用的)安装过程略。如 rpm -ivh libaio-0.3.105-2.i386.rpm --nodeps –-force。
如果一些rpm包一直缺失,可以点击查看下面的信息,i386,i686等+rpm包名称到网络搜索下载。
rpm  -ivh  compat-libstdc++-33-3.2.3-61.i386.rpm --nodeps --force
rpm  -ivh  gcc-c++-4.4.7-3.el6.x86_64.rpm  --nodeps -force
rpm  -ivh  gettext-0.18.3.2-1.fc21.x86_64.rpm  --nodeps --force
rpm  -ivh  glibc-2.3.4-2.54.i686.rpm  --nodeps --force
rpm  -ivh  glibc-2.18-4.4.1.x86_64.rpm  --nodeps --force
rpm  -ivh  libaio-0.3.105-2.i386.rpm  --nodeps --force
rpm  -ivh  libaio-devel-0.3.107-10.el6.i686.rpm  --nodeps --force
rpm  -ivh  libaio-devel-0.3.107-10.el6.x86_64.rpm  --nodeps --force
rpm  -ivh  libgcc-3.4.6-3.i386.rpm  --nodeps --force
rpm  -ivh  libstdc++-3.4.6-11.i386.rpm  --nodeps --force
rpm  -ivh  pdksh-5.2.14-36.el5.i386.rpm  --nodeps --force
rpm  -ivh  redhat-lsb-4.0-3.el6.x86_64.rpm  --nodeps --force
rpm  -ivh  unixODBC-2.2.11-7.1.i386.rpm  --nodeps --force
rpm  -ivh  unixODBC-2.2.14-12.el6_3.x86_64.rpm  --nodeps --force
rpm  -ivh  unixODBC-devel-2.2.11-7.1.i386.rpm  --nodeps --force 
rpm  -ivh  unixODBC-devel-2.2.14-12.el6_3.x86_64.rpm  --nodeps –force
root用户下执行以上语句,安装成功提示:
[root@localhost Downloads]# rpm  -ivh  unixODBC-2.2.11-7.1.i386.rpm  --nodeps --force
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 37017186: NOKEY
Preparing...                ########################################### [100%]
   1:unixODBC               ########################################### [100%]
 
检查通过时自动跳到Summary页。
 

点击finish开始安装。

安装完成后,系统会提示你需要用root权限执行2个shell脚本。按照其提示的路径,找到其所在的位置,如:我的就在/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

和 /home/oracle/app/oraInventory/orainstRoot.sh  新开启一个终端,输入命令:

su root

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

sh  root.sh

cd /home/oracle/oraInventory

sh  orainstRoot.sh

[oracle@localhost ~]$ su root

Password:

[root@localhost oracle]# cd  /home/oracle/app/oracle/product/11.2.0/dbhome_1

[root@localhost dbhome_1]# sh  root.sh

Running Oracle 11g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

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

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

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

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.sh script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@localhost dbhome_1]# cd /home/oracle/oraInventory

[root@localhost oraInventory]# sh  orainstRoot.sh

Changing permissions of /home/oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /home/oracle/oraInventory to dba.

The execution of the script is complete.

使用sqlplus测试下。

安装完成。

linux redhat6.4安装oracle11g的更多相关文章

  1. Redhat6.5安装oracle11g

    Redhat6.5安装oracle11g 一.    安装环境 linux服务器:Redhat 6.5 64位 oracle版本:oracle11gR2 远程windows服务器:已安装Xmanage ...

  2. 在Red Hat Enterprise Linux 5 64-bit安装oracle11g r2

    网上这种文档一搜就一堆,没别的目的,刚接触oracle为了加深理解记忆.只要是跟我的版本一样操作系统和oracle软件,按照步骤肯定可以成功安装 在虚拟机上安装Red Hat Enterprise L ...

  3. LINUX系统中安装ORACLE11g的安装文档,含部分问题解答

    1.无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色 在linux as5下安装oracle11g,环境都配置好了!等运行./runInstaller的时候无法弹出安装的图形界面我 ...

  4. 分享red hat linux 6上安装oracle11g时遇到的gcc: error trying to exec 'cc1': execvp: No such file or directory的问题处理过程

    安装环境:Red Hat Linux 6.5_x64.oracle11g 64bit 报错详情: 安装到68%时弹窗报错: 调用makefile '/test/app/Administrators/p ...

  5. Redhat6.8安装Oracle11g下遇到两个问题记录

    问题一: 刚刚安装完毕Oracle之后,尝试sqlplus登陆报错,TNS:net service name is incorrectly specified 参考文章:关于环境变量ORACLE_SI ...

  6. linux 环境下安装oracle11g方法及安装过程中遇上的问题解决方法

     Oralce安装教程 1.先安装需要的依赖包 找到哪个没有安装,直接yum install XX,直到所有的都安装完成.注意,可能一个包安装了,再次执行检查,还是提示没有安装,那么就不需要管他们了, ...

  7. 解决linux redhat6下安装git的问题

    今天用到linux上的git安装过程比较曲折,记录一下: 首先会报需要perl rpm -ivh git-1.7.1-14.2.x86_64.rpm warning: git-1.7.1-14.2.x ...

  8. RabbitMQ Linux(Redhat6.5)安装(二 )

    一.安装erlang 由于RabbitMq的linux运行环境需要erlang环境,所以需要先安装erlang: 1.erlang下载: http://erlang.org/download/(我下载 ...

  9. Linux图形界面安装Oracle11G(Centos7)

    以Centos7为列 创建运行Oracle数据库的系统用户和用户组 #切换root用户 [px@localhost /]$ su - root [px@localhost /]$ su - root ...

随机推荐

  1. Beta项目冲刺--第三天

    又找回熟悉的感觉.... 队伍:F4 成员:031302301 毕容甲 031302302 蔡逸轩 031302430 肖阳 031302418 黄彦宁 会议内容: 1.站立式会议照片: 2.项目燃尽 ...

  2. ubuntu14.04 安装配置JDK1.7

    1,下载jdk-7u45-linux-x64.tar.gz 网址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downlo ...

  3. [转]Spring——jar包详解

    原文地址:http://my.oschina.net/huhaoren/blog/300856?p=1 spring.jar是包含有完整发布的单个jar包,spring.jar中包含除了 spring ...

  4. 【BZOJ 2693】jzptab

    莫名其妙地又卡在long long上了,我果然又在同一个地方犯逗. 在“在路上,同梦行”群里闹了个大笑话QAQ #include<cstdio> #include<cstring&g ...

  5. puppet的配置

    1时间问题 agent与master端务必要保持时间的一致性,最好使用ntp服务 检查ntp服务是否安装 [root@master-elk ~]# rpm -qa|grep ntp ntpdate-. ...

  6. js类型转换的坑

    JS的灵活 说好听是说JS灵活, 说不好听就是JS的坑太多, JS类型转换就是一个大坑, JS的类型包括了原始类型的[null, undefined, String ,Number, Boolean] ...

  7. 实在没想到系列——HashMap实现底层细节之keySet,values,entrySet的一个底层实现细节

    我在看HashMap源码的时候发现了一个没思考过的问题,在这之前可以说是完全没有思考过这个问题,在一开始对这个点有疑问的时候也没有想到居然有这么个语法细节存在,弄得我百思不得其解,直到自己动手做实验改 ...

  8. bzoj4401: 块的计数

    首先,块的大小确定的话,可以发现方案最多只有1种 然后就可以O(nsqrt(n))搞,不过会TLE 接着我们又发现,一个节点可以作一个块的根,当且仅当该节点的size能被块的大小整除 然后就可以O(n ...

  9. WebClient 使用

    --post  请求 public static string PostMsg(Guid orgid, int page, int rows)        {            System.N ...

  10. 【BZOJ-3956】Count ST表 + 单调栈

    3956: Count Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 173  Solved: 99[Submit][Status][Discuss] ...