目录

环境

  • 系统

    • RHEL6
  • 软件
    • Oracle 10g
    • VMWare 12
    • JDK 1.8

RHEL6 Configuration

Step1:Setup hostname & Close the selinux

[root@jmilkfan Desktop]# hostname
jmilk.fan.com

vim /etc/sysconfig/selinux

SELINUX=permissive

立即生效关闭防火墙

[root@jmilk ~]# setenforce 0

Step2:Setup Static IP

vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:F2:C6:8D"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f129f448-7aa6-43bd-bf68-699774b0a553"
IPADDR=192.168.1.222
NETMASK=255.255.255.0

Re-start network service

Step3:Edit /etc/hosts

vim /etc/hosts

192.168.1.222 jmilk.fan.com

Step4:创建用户和用户组

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
useradd -g oinstall -G dba oracle
(echo fanguiju;echo fanguiju) | passwd --stdin oracle

Step5:创建安装路径目录

[root@jmilk Desktop]# mkdir -p /u01/app/oracle
[root@jmilk Desktop]# chown -R oracle:oinstall /u01/app/oracle
[root@jmilk Desktop]# chmod -R 775 /u01/app/oracle
[root@jmilk Desktop]# ll -d /u01/app/oracle/
drwxrwxr-x. 2 oracle oinstall 4096 May 24 22:22 /u01/app/oracle/

Step6:配置内核参数

vim /etc/sysctl.conf

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 2147483648 # Controls the maximum number of shared memory segments, in pages
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

刷新配置

sysctl -p

Step7:修改limits.conf配置文件

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

Step8:修改login配置文件

vim /etc/pam.d/login

#Use for Oracle
session required pam_limits.so

Step9:配置Oracle用户环境变量

[root@jmilk Desktop]# su - oracle

vim .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin
export PATH
export ORACLE_SID=gsp
export ORACLE_BASE=/u01/app/oracle #ORACLE_BASE是最重要的,代表Oracle的安装路径
export ORACLE_HOME=$ORACLE_BASE/product/dbhome_1
export ORACLE_OWNER=oracle
export PATH=$ORACLE_HOME/bin:$PATH
umask 022

刷新用户环境变量

source .bash_profile
DISPLAY=local_host:0.0 ; export DISPLAY

Step10:修改/etc/profile文件

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Update JDK

卸载OpenJDK并更新JDK,下载JDK1.8 点这里

Step1:rpm安装JDK1.8

[root@jmilk Desktop]#  rpm -qa |grep java
tzdata-java-2012j-1.el6.noarch
java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64
java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64
[root@jmilk Desktop]# rpm -e --nodeps tzdata-java-2012j-1.el6.noarch
[root@jmilk Desktop]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64
[root@jmilk Desktop]# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64
[root@jmilk Desktop]# cd /opt/jdk1.8/
[root@jmilk jdk1.8]# ls
jdk-8u91-linux-x64.rpm
[root@jmilk jdk1.8]# rpm -ivh jdk-8u91-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8.0_91 ########################################### [100%]
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...
jfxrt.jar...
[root@jmilk jdk1.8]# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

配置JDK环境变量

vim /etc/profile

JAVA_HOME=/usr/java/jdk1.8.0_91
JRE_HOME=/usr/java/jdk1.8.0_91/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH

加载配置

source /etc/profile
alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_91/bin/java 1
alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_91/bin/javac 1
alternatives --config java
alternatives --config javac

配置Oracle安装环境

硬件检测

官方安装文档对硬件额要求

#At least 512 MB of physical RAM

内存要大于512M

#The following table describes the relationship between installed RAM and the configured swap space requirement.

内存和Swap分区的大小要求

RAM Swap Space
Up to 512 MB 2 times the size of RAM
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM

#400 MB of disk space in the /tmp directory

必须被/tmp目录留下400MB

#Between 1.5 GB and 3.5 GB of disk space for the Oracle software, depending on the installation type

需要预留1.5G到3.5G的磁盘空间

#1.2 GB of disk space for a preconfigured database that uses file system storage

Step1:查看内存大小

[root@jmilk Desktop]# grep MemTotal /proc/meminfo
MemTotal: 8046852 kB

Step2:查看Swap空间大小

[root@jmilk Desktop]# grep SwapTotal /proc/meminfo
SwapTotal: 4194296 kB

Step3:查看/tmp分区的大小

[root@jmilk Desktop]# df -m /tmp
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/sda3 36088 5907 28349 18% /

软件检测

因为在安装Oracle的过程中,要重新编译安装许多内置软件程序。所以Oracle的安装环境需要软件依赖包的支撑,Oracle官方安装文档提供了需要预安装的软件包列表:

  • Red Hat Enterprise Linux 4.0:

    • binutils-2.15.92.0.2-10.EL4
    • compat-db-4.1.25-9
    • control-center-2.8.0-12
    • gcc-3.4.3-9.EL4
    • gcc-c++-3.4.3-9.EL4
    • glibc-2.3.4-2
    • glibc-common-2.3.4-2
    • gnome-libs-1.4.1.2.90-44.1
    • libstdc++-3.4.3-9.EL4
    • libstdc++-devel-3.4.3-9.EL4
    • make-3.80-5
    • pdksh-5.2.14-30
    • sysstat-5.0.5-1
    • xscreensaver-4.18-5.rhel4.2

注意:因为Oracle 10g官方推荐在RHEL4上安装,所以提供的软件包列表版本会偏低。我们在RHEL6中安装Oracle时,无论是检测还是安装的过程中都需要忽略软件包的版本问题。

rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel

Step1:配置光盘YUM源

vim /etc/yum.repos.d/local.repo

[local]
name=local
baseurl=file:///media
enabled=1
gpgcheck=0

Step2:安装依赖软件包

yum install -y gcc-*
yum install -y binutils-*
yum install -y openmotif-*
yum install -y compat-db-*
yum install -y compat-gcc-*
yum install -y compat-gcc-c++-*
yum install -y setarch*
yum install -y compat-libstdc++*
yum install -y compat-libstdc++-devel*
yum install -y compat-libstdc++-33
yum install -y glibc*
yum install -y libstdc++*
yum install -y make*
yum install libXt.i686
yum install libXtst.i686
yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
yum install -y compat-gcc* compat-glibc* compat-libstd*
rpm -ivh --force libXp-1.0.0-15.1.el6.x86_64.rpm #需要到Package目录下强制安装

编辑配置文件

Step1:配置系统版本

注意:因为Oracle默认只支持到RHEL4,所以我们需要修改系统版本来欺骗Oracle安装程序。

vim /etc/redhat-release

Red Hat Enterprise Linux Server release 4.0 (Santiago)

安装Oracle Database

Step1:解压Oracle Database安装软件

mkdir /mnt/hgfs/DataBase/
cd /mnt/hgfs/DataBase/
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv < 10201_database_linux_x86_64.cpio

Step2:重启并使用oracle用户账号登陆

注意:不能使用su - oracle

Step3:执行安装脚本

[oracle@jmilk Desktop]$ cd /mnt/hgfs/Database/database/
[oracle@jmilk database]$ ./runInstaller

注意:安装过程中如果报“ORA-27125:unable to create shared memory segment”这个错误,一般原因是操作系统用户权限不足的问题,可以通过下面的方式来解决

id oracle
echo vm.hugetlb_shm_group=501 > /etc/sysctl.conf
sysctl -p

输入Oracle最高级管理员orcl的密码

忽略这个错误,点击Continue

完成安装

Linux安装Oracle 10g的更多相关文章

  1. Linux安装oracle 10g常见问题之——ORA-01078,LRM-00109,ORA-01102

    [oracle@toughhou database]$ sqlplus /nolog SQL> conn / as sysdba SQL> startup ORA-01078: failu ...

  2. Linux安装oracle 10g常见问题之——OUI-25031

    OUI-25031:Some of the configuration assistants failed/cancelled. 这是安装过程中常见的错误之一. 引起此错误的原因:/etc/hosts ...

  3. 在虚拟机上安装红帽Linux.5.5.for.x86.服务器版系统(按针对安装oracle 10g作的配置)

    在虚拟机上安装红帽Linux.5.5.for.x86.服务器版系统(按针对安装oracle 10g作的配置)   软件版本: 虚拟机版本:vmwareworkstation 7.11 build-28 ...

  4. CentOS 6.3(x86_64)下安装Oracle 10g R2

    目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sq ...

  5. linux安装oracle

    目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sq ...

  6. 【转】CentOS 6.3(x86_64)下安装Oracle 10g R2

    目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sq ...

  7. 【转】CentOS 6.3(x86_32)下安装Oracle 10g R2

    一.硬件要求 1.内存 & swap Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more 检查内存情况 # grep MemTotal / ...

  8. 在RedHat 5下安装Oracle 10g详解(转)

    在RedHat 5下安装Oracle 10g详解(转) Posted on 2012-09-14 13:26 疯狂 阅读(5075) 评论(0)  编辑  收藏 所属分类: database .uni ...

  9. CentOS 6.3(x86_32)下安装Oracle 10g R2

    一.硬件要求 1.内存 & swap Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more 检查内存情况 # grep MemTotal / ...

随机推荐

  1. vim中 E212:无法打开并写入文件 的解决办法

    因为centos7刚安装的时候是无法上网的,所以,需要去配置一下ifcfg-ens33文件,但实际上这个文件是只读的文件,root也无法去更改内容,这时候保存的时候需要使用 w ! sudo tee ...

  2. xstart使用方法

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/YABIGNSHI/article/det ...

  3. 对GridFS数据进行分片

    On this page files 集合 chunks 集合 在对 GridFS 存储进行分片时,需要注意以下的情况: files 集合 大多数情况下不需要对 files 集合进行分片,这个集合通常 ...

  4. shell查词典

    curl http://cn.bing.com/dict/search?q=spawn -s | sed -e '{s/<\/span>/&\n/g}' | sed -n '{/& ...

  5. 1381. 删除 (Standard IO)

    题目描述: Alice上化学课时又分心了,他首先画了一个3行N列的表格,然后把数字1到N填入表格的第一行,保证每个数只出现一次,另外两行他也填入数字1到N,但不限制每个数字的出现次数.Alice现在想 ...

  6. 继承Process类,run函数的简单使用

    #定义一个类 继承Process类 from multiprocessing import Process import os import time class Download(Process): ...

  7. python介绍(变量,if,while)

    python介绍(变量,if,while): python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹 打发时间,决心开发一个新 ...

  8. SSH远程管理服务实战

    目录 SSH远程管理服务实战 1.SSH基本概述 2.SSH相关命令 3.Xshell连接不上虚拟机 4.scp命令 5.sftp命令 6.SSH验证方式 7.SSH场景实践 8.SH安全优化 9.交 ...

  9. springboot解决跨域

    @Configuration public class WebMvcConfiguration implements WebMvcConfigurer { @Bean public CorsFilte ...

  10. Python向方法中传递自定义类型参数

    定义类型 class Fish: def __init__(self,x): self.num = xclass Turtle: def __init__(self,y): self.num = yc ...