一、CentOS4.7系统安装
因为是实验环境,CentOS的系统安装过程只需要注意三点:
1、swap分区一般是物理内存的两倍。在Oracle11g的安装文档中有详细建议和说明,现摘录如下:
RAM Swap Space
Between 1 GB and 2 GB 1.5 times the size of RAM
Between 2 GB and 16 GB Equal to the size of RAM
More than 16 GB 16 GB
2、IP地址不要采用DHCP,需要固定的IP地址。
3、选择软件包的时候一定要把一下两个软件开发包选中:Development Tools 和 Legacy Software Development.
二、Oracle11gR1的安装过程
Oracle11gR1的安装文档中已经非常明白的写清楚了Oracle11g的安装过程,现在把最主要的步骤写在下面。
1、Check Operating System packages--这一部分具体的安装包根据各个版本的Linux Operating System而定,详细请参照Oracle11g的安装文档。
#rpm -q package_name //查询是否安装了package_name的软件包
#rpm -ivh package_name.rpm //安装缺失的软件包
2、创建目录、组和用户:
create directory:# mkdir -p /u01/oracle
create groups oinstall and dba:# groupadd oinstall
# groupadd dba
create user oracle:# useradd -g oinstall -G dba -d /u01/oracle oracle
# passwd oracle //设置oracle用户密码
改变/u01目录的属主:# chown -R oracle:oinstall /u01
检查nobody用户是否存在:# id nobody
3、解压Oracle安装文件。
把oracle11gR1的压缩包放在/root中:运行unzip命令进行解压缩,解压缩完成以后,在/root目录中会出现一个database的文件夹,该文件夹为安装文件。把该目录中的所有安装文件拷贝到/u01/oracle中。
4、配置内核参数
在oracle安装文档中有详细参数和说明,直接拷贝到相关文件中即可,步骤如下:Using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:
fs.file-max = 512 * PROCESSES(改为6553600) //这一行需要修改,否则会出现这样的错误;su: /bin/bash: Too many open
files in system
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
然后使用:# /sbin/sysctl -p 命令是参数立即生效
5、其他相关参数的设置
这部分在oracle中的安装文档中也是写的相当的清楚,具体如下:
(1)、Add the following lines to the /etc/security/limits.conf file:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
(2)、Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so
(3)、Depending on the oracle user's default shell, make the following changes to the default shell start-up
file:
For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE
Linux Enterprise Server systems /etc/profile.local):
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
6、设置Oracle用户的环境变量
以oracle用户登录系统,编辑.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=node1
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
7、安装Oracle11gR1
以Oracle用户登录系统,启动图形界面($ startx),进入database目录。运行./runInstaller,进入安装界面。然后就可以一步一步按照要求来选择安装了。
在开始的时候会弹出几个警告窗口。第一个OUI-10035和OUI-10033错误,是告诉我们没有权限,这个可以忽略,我们的安装目录是/u01/oracle,但软件默认的安装目录是根目录(/),根目录对于oracle用户当然是没有安装的权限的,我们只需要在安装目录前面加一个/u01/oracle/即可。
还有一个是可能会出现的警告,如果你的swap分区(一般为内存的两倍)符合oracle文档中的规定的话就不会出现该警告窗口。不过即使出现了,只需要点击Ok即可,是可以成功安装的。
在进行检测系统配置的时候,内核参数可能需要按照要求来改动,这个需要切换到root权限中修改/etc/sysctl.conf文件中的相关内容即可,修改完以后别忘了执行:/sbin/sysctl -p命令,是修改立即生效。然后回到oracle用户中重新进行检查即可。在这之中也会出现swap的“warning”,这个可以点击手动验证即可。
在安装过程中可以选择“create database”, 也可以选择“Install Software Only” 。如果选择“Install Software Only”的话,安装完Oracle软件后需要运行netca创建监听器后,才能开始创建数据库。创建数据库用:dbca
在安装后期中,会弹出一个对话框,需要在root权限下运行两个脚本。
以上都需要在图形界面中那个安装,安装完以后,就可以把系统的图形界面给关掉。
--good luck--
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7351078/viewspace-620257/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7351078/viewspace-620257/