1. 更改新系统版本文件
更改 /etc/redhat-release (# vi /etc/redhat-release)文件 把 Red Hat Enterprise Linux Server release 5.1 (版本t不同可能这个地方不同)替换为: Red Hat EnterpriseLinux server release 4
2. 检查硬件需求
硬件要求:
■ At least 1024 MB of physical RAM //最少1G内存
■ 400 MB of disk space in the /tmp directory //tmp文件夹至少400M空间
■ Between 1.5 GB and 3.5 GB of disk space for the Oraclesoftware, depending
on the installationtype //1.5~3.5G 安装空间
■ 1.2 GB of disk space for a preconfigured database thatuses file system
storage //默认数据库
n 交换空间要求如下:
RAM Swap Space
Between 1024 MB and 2048 MB 1.5times the size of RAM
Between 2049 MB and8192 MB Equalto the size of RAM
More than 8192 MB 0.75times the size of RAM
1) 检查内存是否符合要求
# grep MemTotal/proc/meminfo
2) 交换空间
# grep SwapTotal/proc/meminfo
3) tmp目录空间不能低于 400M
# df -k /tmp
4) 检查硬盘空间
# df -k
5)CPU
# grep "model name"/proc/cpuinfo
3. 安装补丁
根据oracle10 help文件,linux4 上需安装以下补丁
binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1
使用命令 #rpm - qa |grep + 补丁名称
这些命令是linuxrh4 上安装oracle 10 所需要的补丁,有一些已经安装,有一些可以在linux rh5 安装盘上找或者网上找(https://zid-lux1.uibk.ac.at/linux/rpm2html/)。
4. 创建所需用户和组
# /usr/sbin/groupaddoinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -goinstall -G dba oracle
# passwd oracle
5. 配置内核参数
1) 修改/etc/sysctl.conf文件 (#vi /etc/sysctl.conf),在该文件中加入或修改以下参数
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100128
fs.file-max = 65536
net.ipv4.ip_local_port_range= 1024 65000
net.core.rmem_default =1048576
net.core.rmem_max = 1048576
net.core.wmem_default =262144
net.core.wmem_max = 262144
Add thefollowing lines in the /etc/security/limits.conf file:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
2) 在/etc/pam.d/login 文件中加入以下语句
session required/lib/security/pam_limits.so
sessionrequired pam_limits.so
3) 修改 /etc/pam.d/login 文件 (vi /etc/pam.d/login)
session required /lib/security/pam_limits.so
session required pam_limits.so
4) 在 /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
5) 在 /etc/csh.login 中加入以下语句
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif
6. 创建程序目录,并赋予oracle用户权限
# mkdir -p /opt/oracle/product/10g
# mkdir /opt/oracle/database
# chown -R oracle.oinstall /opt/oracle
# chmod -R 775 /opt/oracle
7. 设置环境变量
export ORACLE_BASE=/opt/oracle/
export ORACLE_HOME=/opt/oracle/product/10g
export ORACLE_SID=myorcl(此处可随便起个名字)
export PATH=$ORACLE_HOME/bin:$PATH
ESC(退出vi的编辑环境)
:wq(退出vi应用程序并保存修改)
配置好后用 source .bash_profile 命令使配置生效
8. 下载oracle
在oracle网站上下载 10201_database_linux32.zip 放到 tmp文件夹
下载地址:http://www.oracle.com/technetwork/database/10201linuxsoft-097986.html
在tmp文件夹下解压10201_database_linux32.zip
# unzip 10201_database_linux32.zip
9. 开始安装oracle
以oracle用户登录系统,进行Oracle的安装:
cd /tmp/database (或者你解压缩安装程序包的目录)
./runInstaller
过一会儿就会出现Oracle的安装界面
注意:
1) 选择advance install
2) 数据库home设置为/opt/oracle/product/10g
3) 数据库全局名称设置为myorcl
4) 数据库字符集选Simplified Chinese ZHS16GBK
其他用默认设置!
注意:安装过程中会提示以root用户登陆执行一些.sh脚本,执行后再按“ok”按钮继续安装。
9. 创建数据库实例
#cd %ORACLE_HOME%
#dbca
会启动dbca安装,按照提示安装即可。
以上安装过程,是我参照oracle help文件,以及播布客上小布老师的一个教学视频(http://www.boobooke.com/bbs/thread-196-1-1.html)以及网上下载的一些安装教程总结并依照按照成功。希望能给大家带来帮助。(写的不是很详细,或者有不对的地方,请大家谅解并指正。)