目录

环境

  • 系统

    • 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. appium移动端自动化测试的一些感想

    花了一个多月的时间来复习,学习appium+python+android的UI层的自动化测试. 从最开始的环境搭建,都后面运行脚本报错各类错,到优化脚本结构,基本上问题不断. 相比,selenium做 ...

  2. python中6个序列的内置类型分别是什么,列表和元组的异同有哪些

    1.Python中6个序列的内置类型分别是什么? Python包含6中内建的序列,即列表.元组.字符串.Unicode字符串.buffer对象和 xrange 对象.序列通用的操作包括:索引.长度.组 ...

  3. 解决myeclipse validation验证javascript导致速度变慢的现象

    参考:https://jingyan.baidu.com/article/ca41422fe094251eae99ede7.html

  4. Appium移动端自动化:元素定位uiautomatorviewer

    一.启动uiautomatorviewer mac: 1.打开终端,进入Android/sdk/tools目录 2.打开uiautomatorviewer(我的路径是Android/sdk/tools ...

  5. PAT甲级【2019年3月考题】——A1158 TelefraudDetection【25】

    Telefraud(电信诈骗) remains a common and persistent problem in our society. In some cases, unsuspecting ...

  6. MySQL 同一字段匹配多个值

    delete from api_log WHERE curl LIKE '%.css' or curl LIKE '%.js' or curl LIKE '%.JPG'; 删除字段curl以 js,c ...

  7. Ptyhon 合并列表

    2019-08-25 list1 =  [91, 95, 97, 99] list2 =  [92, 93, 96, 98] 合并后得到:[91, 95, 97, 99 , 92, 93, 96, 9 ...

  8. hibernate 常用注解

    转自:http://blog.csdn.net/numbibi/article/details/7739441 @content ejb3注解的API定义在javax.persistence.*包里面 ...

  9. 安装双系统Windows+Centos安装完成之后提示双系统选项菜单!

    原因:在windows下安装centos系统完成之后重启无法显示windows系统菜单选项 1.安装Windows系统 2.安装Centos系统 3.在Centos系统中安装ntfs-3g yum i ...

  10. Python第一章概述与环境安装

    Python简介 Python是一种计算机程序设计语言.是一种动态的.面向对象的脚本语言,最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越来越多被用于独立的.大型项 ...