环境设置

挂载CentOS_5.4_Final.iso

# mount -o loop -t iso9660 /export/home/soft/CentOS_5.4_Final.iso /mnt/

修改更新源

# cat /etc/yum.repos.d/CentOS-Base.repo

[CentOS]

name=CentOS

baseurl=file:///mnt/

gpgcheck=1

gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-5

# yum clean all

Loaded plugins: fastestmirror

Cleaning up Everything

Cleaning up list of fastest mirrors

然后就可以从光盘镜像上安装程序了

# yum install compat-gcc-34-c++

Loaded plugins: fastestmirror

Determining fastest mirrors

CentOS                                                   | 2.1 kB     00:00    

CentOS/primary_db                                        | 2.0 MB     00:00    

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package compat-gcc-34-c++.x86_64 0:3.4.6-4 set to be updated

--> Finished Dependency Resolution

 

Dependencies Resolved

 

================================================================================

 Package                   Arch           Version          Repository      Size

================================================================================

Installing:

 compat-gcc-34-c++         x86_64         3.4.6-4          CentOS          13 M

 

Transaction Summary

================================================================================

Install      1 Package(s)        

Update       0 Package(s)        

Remove       0 Package(s)        

 

Total download size: 13 M

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : compat-gcc-34-c++                                        1/1

 

Installed:

  compat-gcc-34-c++.x86_64 0:3.4.6-4                                           

 

Complete!

 

查询所需安装包是否完整

rpm -q binutils compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 control-center gcc gcc-c++ gdbm glibc glibc-common glibc-devel libgcc libgnome libstdc++-devel libXp make sysstat util-linux

root用户在终端中执行以下命令:#yum install l binutils compat-db control-center gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make libaio libXp

提示warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6……无法继续安装更新,可用以下方法解决:运行:rpm -import /etc/pki/rpm-gpg/RPM*再更新,

OS参数要求

编辑 /etc/sysctl.conf  (vi或文本编辑器都可以), 在行末添加以下内容

设置内核参数
# vi /etc/sysctl.conf
kernel.shmall = 2097152  //单个共享内存段的最小尺寸

kernel.shmmax = 2147483648           // shmmax 的含义是单个共享内存段的最大     尺寸,一般为内存一半,SGA的分配不应大于此值。如果该参数设置小于Oracle SGA设置,那么SGA就会被分配多个共享内存段。这在繁忙的系统中可能成为性能负担,带来系统问题。

kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
# /sbin/sysctl -p

再运行sysctl -p应用以上参数

[root@mp-bill ~]# /sbin/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

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

编辑 /etc/security/limits.conf 行末添加以下内容

#use for oracle

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024 

* hard nofile 65536

 

编辑 /etc/pam.d/login 行末添加以下内容

     session required pam_limits.so

编辑 /etc/selinux/config 确保以下内容

  SELINUX=disabled

  关闭SELIINUX

 编辑 /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

修改操作系统版本标识
# vi /etc/redhat-release
#CentOS release 5.2 (Final)
redhat-4

创建oracle用户,和一些安装目录

groupadd dba
useradd -G dba -d /home/oracle -s /bin/bash –m oracle

passwd oracle

mkdir –p /opt/oracle  安装目录
chown -R oracle:dba /opt/oracle

chmod   -R 755 /opt/oracle

gzip -dc 10201_database_linux_x86_64.cpio.gz|cpio –div

配置环境变量

su oracle 
vi ~/.bash_profile 
修改以下是配置文件的内容
export ORACLE_BASE=/opt/oracle/
export ORACLE_HOME=/opt/oracle/product/10g
export ORACLE_SID=ge01(可随意定义)
export PATH=$ORACLE_HOME/bin:$PATH
开始安装

进入安装程序所在目录

$ ./runInstaller

 

 

选择以后创建数据库 按【next

 

 

 

 

 

 

 

 

 

 

root用户下执行这2sh文件

 

至此Oracle软件安装完毕


oracle10g 安装补丁

  1  将补丁上传至服务器上

  2 解压缩 [root@localhost Soft]# unzip p6810189_10204_Linux-x86.zip

  3 停止数据库和数据库监听

      [oracle@localhost ~]$ dbshut

      [oracle@localhost ~]$ lsnrctl stop

      LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-SEP-2009 15:38:36

      Copyright (c) 1991, 2005, Oracle.  All rights reserved.

      Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

      The command completed successfully

  4 安装

[oracle@localhost Disk1]$ pwd

/home/Soft/Disk1

[oracle@localhost Disk1]$ ./runInstaller

Starting Oracle Universal Installer...