Redhat linux 6 update 4上安装oracle 11g R2
来源:互联网 发布:mysql创建学生信息表 编辑:程序博客网 时间:2024/06/07 02:15
1 系统环境准备
1.1 安装java
上传jdk-6u45-linux-x64.bin
[root@localhost java]Chmod 755 jdk-6u45-linux-x64.bin [root@localhost java]./jdk-6u45-linux-x64.bin
1.2 修改环境变量
JAVA_HOME=/opt/java/jdk1.6.0_45 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME PATH CLASSPATH
2 检查硬件配置
2.1 内存检查
最小内存:1G
建议内存:2G或以上
检查内存空间:
[root@localhost ora11g]# grep MemTotal /proc/meminfo MemTotal: 32801360 kB
2.2 检查swap交换区
oracle对swap交换区做了如下要求:
RAMSwap Space1G ~ 2GRAM的1.5倍2G ~ 16G与RAM相等大于16G16G
检查swap空间:
[root@localhost ora11g]# grep SwapTotal /proc/meminfo SwapTotal: 33551744 kB
2.3 检查可用内存和可用交换分区
[root@localhost ora11g]# free total used free shared buffers cached Mem: 32801360 7430944 25370416 0 89756 6445892 -/+ buffers/cache: 895296 31906064 Swap: 33551744 0 33551744
2.4 自动内存管理
Oracle从11g开始引入了“自动内存管理”的概念。对于“自动内存管理”来说,要求共享内存必须要大于“MEMORY_MAX_TARGET ”和“MEMORY_TARGET ”这两个参数。如果要知道共享内存的大小,可以用以下命令来查看:
df -h /dev/shm/
2.5 系统架构检查
[root@localhost ora11g]# uname -r 2.6.32-358.el6.x86_64
2.6 磁盘空闲空间检查
/tmp目录至少要有1G存储空间,查看命令:
[root@localhost ora11g]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/sda3 193G 8.6G 174G 5% /
查看系统空间:
[root@localhost ora11g]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 193G 8.6G 174G 5% / tmpfs 16G 224K 16G 1% /dev/shm /dev/sda1 494M 34M 435M 8% /boot
如果要在linux x86_64环境下安装oracle,则对磁盘空间有以下要求:
安装类型数据库软件文件所需空间(GB)企业版4.7标准版4.6
安装类型数据文件所需空间(GB)企业版1.7标准版1.5
2.7 显示要求
安装oracle数据库11g版本Release2(11.2)的最小显示分辨率为1024*768或者更高。
3 检查软件配置
3.1 操作系统要求
对于Linux x86_64环境下的安装,支持的redhat版本有:
Red Hat Enterprise Linux 5 Update 2 Red Hat Enterprise Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux) Red Hat Enterprise Linux 6 Red Hat Enterprise Linux 6 (with the Oracle Unbreakable Enterprise Kernel for Linux)
很明显,这里的环境符合要求。
3.2 内核要求
对于Red Hat Enterprise Linux 6,要求内核:
2.6.32-71.el6.x86_64或更高。
可以使用以下命令检测:
[root@localhost ~]# uname -r 2.6.32-358.el6.x86_64
3.3 检查系统安装包
对于Oracle Linux 6 和Red Hat Enterprise Linux 6版本的操作系统来说,需要安装以下(或更高)版本的包:
binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x86_64) compat-libstdc++-33-3.2.3-69.el6 (x86_64) compat-libstdc++-33-3.2.3-69.el6.i686 gcc-4.4.4-13.el6 (x86_64) gcc-c++-4.4.4-13.el6 (x86_64) glibc-2.12-1.7.el6 (i686) glibc-2.12-1.7.el6 (x86_64) glibc-devel-2.12-1.7.el6 (x86_64) glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6 (i686) libgcc-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6.i686 libstdc++-devel-4.4.4-13.el6 (x86_64) libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6 (x86_64) libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6 (x86_64) libaio-devel-0.3.107-10.el6.i686 make-3.81-19.el6 sysstat-9.0.4-11.el6 (x86_64)
需要特别说明的是:从Oracle Database 11g Release 2 (11.2.0.2)开始,如果要在Linux x86_64环境下安装oracle的情况,除了gcc-4.3的32位版本之外,以上列表中的所有32位安装包都不再是必须安装的了,而只需安装对应64位版本。但是对于11.2.0.2之前的版本则32位和64位版本都需要安装。
可以使用yum安装,很方便,如何配置yum源。。。(略,再整理)
3.4 其它软件需求
安装以下(或更高)版本oracle ODBC驱动:
unixODBC-2.2.14-11.el6 (x86_64) unixODBC-2.2.14-11.el6.i686 unixODBC-devel-2.2.14-11.el6 (x86_64) unixODBC-devel-2.2.14-11.el6.i686
4 配置系统核心参数
[root@localhost ora11g]# vi /etc/sysctl.conf
需要根据实际情况修改,参考:
fs.aio-max-nr=1048576 fs.file-max=6815744 kernel.shmall=2097152 kernel.shmmax=536870912 kernel.shmmni=4096 kernel.sem=25032000100128 net.ipv4.ip_local_port_range=900065500 net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586
由于系统已经配置了两个参数:
# 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.aio-max-nr=1048576 fs.file-max=6815744 kernel.shmmni=4096 kernel.sem=250 32000 100 128 net.ipv4.ip_local_port_range=9000 65500 net.core.rmem_default=1048576 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586
系统内存32G,所以将net.core.rmem_default调大了一点
修改完之后,执行命令以生效:
[root@localhost ora11g]# vi /etc/sysctl.conf
5 创建用户和用户组
5.1 创建用户组
创建OSDBA组,对于初次安装ORACLE数据库的服务器,本步为必须执行的操作,该组用来标记拥有SYSDBA权限的系统用户。在ORACLE内部编码中,该组名为dba。
使用groupadd命令创建组,操作如下:
[root@localhost ora11g]# groupadd -g 502 dba
然后创建OracleInventory组,该组组名通常定义为oinstall,创建命令如下:
[root@localhost ora11g]# groupadd oinstall
5.2 创建用户
创建ORACLE的owner用户,一般也命令为oracle,操作如下:
[root@localhost ora11g]# useradd -u 502 -g oinstall -G dba oracle
设置密码:
[root@localhost ora11g]# passwd oracleChanging password for user oracle.New password: BAD PASSWORD: it is based on a dictionary wordBAD PASSWORD: is too simpleRetype new password: passwd: all authentication tokens updated successfully.
5.3 配置shell limits
使用vi命令编辑/etc/security/limits.conf:
[root@localhost ora11g]# vi /etc/security/limits.conf
补充下列下列内容:
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536
使用vi命令编辑/etc/pam.d/login:
[root@localhost ora11g]# vi /etc/pam.d/login
补充下列内容。:
session required pam_limits.so
关于limits.so的作用见这里。
5.4 创建安装目录
[root@localhost ora11g]# mkdir -p /opt/ora11g/software [root@localhost ora11g]# cd /opt/ora11g [root@localhost ora11g]# mkdir oradata [root@localhost ora11g]# mkdir product
将下载的ORACLE安装文件:linux.x64_11gR2_database_1of2.zip和linux.x64_11gR2_database_2of2.zip都解压缩到/data/software目录下:
[root@localhost software]# unzip linux.x64_11gR2_database_1of2.zip [root@localhost software]# unzip linux.x64_11gR2_database_2of2.zip
最后使用chown命令修改目录的所有者为oracle用户:
[root@localhost software]# chown -R oracle:oinstall /opt/ora11g/ [root@localhost software]# cd /opt/ [root@localhost opt]# ll total 12 drwxr-xr-x. 3 root root 4096 Jul 8 17:28 java drwxr-xr-x. 5 oracle oinstall 4096 Jul 8 17:47 ora11g drwxr-xr-x. 2 root root 4096 Nov 12 2012 rh
5.5 配置oracle用户环境变量
使用vi命令编辑/home/oracle/.bash_profile:
[root@localhost ora11g]# vi /home/oracle/.bash_profile
补充下列内容:
############################################ export TMP=/tmp export TMPDIR=$TMP export ORACLE_BASE=/opt/ora11g export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_SID=orcl export ORACLE_TERM=xterm export PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64/ export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib umask 022 if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65535 else ulimit -u 16384 -n 65535 fi fi ############################################
注意上面“if”与“fi”之间脚本中,左中括号“[”,右中括号“]”,等号“=”,与前后的字母之间,都要有空格。
6 执行安装
6.1 安装
以上准备完成后,就进入到安装步骤了。使用OUI来安装ORACLE,需要在视图界面下操作。使用oracle用户启动到视图状态,打开终端:
[root@localhost ora11g]# su - oracle [oracle@localhost ~]$ export DISPLAY=192.168.16.22:0.0 [oracle@localhost ~]$ xhost + access control disabled, clients can connect from any host
由于是从远程执行图形界面,因此上面面的顺序不能变。
进入到oracle软件的安装目录下,执行./runInstaller:
[oracle@localhost ~]$ cd /opt/ora11g/software/database/ [oracle@localhost database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 175749 MB Passed Checking swap space: must be greater than 150 MB. Actual 32765 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-07-08_08-31-27PM. Please wait ...
出现界面:
取消选择,然后点击下一步:
只安装数据库软件:
单实例安装:
选择语言,这里选择英语:
选择企业版安装:
安装目录:
Inventtory目录:
点yes:
选择组:
这一切步是执行检查,会检查必要包是否安装,有错误可以修正之后再点“check again”。
下图中有几个缺失,显示是全部为i386的,由于我安装的是64的Linux操作,iso文件中没有 关于i386的包,而是i686的包,要保证没有检查通过的包的i686都已经安装,pdksh可不安装(这个包没有安装,Oracle也能安装成功),确保i686的包安装之后,选择右上角的Ignore All,Next:
点击“finish”:
进行安装,安装过程中会弹出脚本,登陆root执行:
[root@localhost ~]# /opt/ora11g/oraInventory/orainstRoot.shChanging permissions of /opt/ora11g/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /opt/ora11g/oraInventory to oinstall.The execution of the script is complete.[root@localhost ~]# /opt/ora11g/product/11.2.0/db_1/root.shRunning Oracle 11g root.sh script...The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /opt/ora11g/product/11.2.0/db_1Enter the full pathname of the local bin directory: [/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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.Finished product-specific root actions.
点击“Close”完成安装:
至此数据库软件就安装完成啦!
- Redhat linux 6 update 4上安装oracle 11g R2
- Redhat Linux安装Oracle 11g R2数据库
- Redhat Enterprise Linux 6.3 x86_64 安装oracle 11g R2
- Redhat Linux 下安装Oracle 11g R2
- redhat enterprise linux5.4 安装 oracle 11g R2
- 在RedHat Linux 5.5 (x32/x64)上安装Oracle 10g r2(10.2.0.5)
- 在RedHat Linux 5.5 (x32/x64)上安装Oracle 10g r2(10.2.0.5)
- Linux x64系统上安装 oracle 11g R2 x64
- Redhat Linux AS4 update 7 安装 Oracle 10g (10.2)
- 安装ORACLE 11G R2 +redhat es4遇到的问题
- Oracle 11g R2+RAC+ASM+redhat安装详解1
- Oracle 11g R2+RAC+ASM+redhat安装详解2
- redhat enterprise linux5.4 安装 oracle 10g R2(1)
- redhat enterprise linux5.4 安装 oracle 10g R2(2)
- Oracle 10g R2 RAC for Redhat Linux AS 4
- RedHat Linux 4 Update 6系统上安装CQ
- Linux安装 oracle 11g r2
- Linux安装 oracle 11g r2
- 开源网络库 GCDAsyncSocket
- jquery的一些入门实例
- Android四种操作模式
- TinyXml快速入门(二)
- 16、android开源框架之android-pullToRefresh详解
- Redhat linux 6 update 4上安装oracle 11g R2
- Linux GCC常用命令
- php图片压缩
- Java.lang.OutOfMemoryError是什么
- hdoj.1040 As Easy As A+B 20140722
- 暑期个人赛--第三场--E(待A....)
- Linux内核态抢占机制分析
- 【Leetcode长征系列】Remove Nth Node From End of List
- 逆序数 之 hdu 1394 Minimum Inversion Number