#所需的所有包
-------------------------------
xscreensaver-4.18-5.rhel4.2
gnome-libs-1.4.1.2.90-44.1
compat-db-4.1.25-9
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
libstdc++-devel-3.4.3-22.1
pdksh-5.2.14-30
sysstat-5.0.5-1
-------------------------------
#下面是已有的包
binutils-2.15.92.0.2-13.EL4
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
libstdc++-3.4.3-22.1
make-3.80-5
xscreensaver-4.18-5.rhel4.2
-------------------------------
#打一些图形化依赖的包,可不执行。
yum groupinstall "GNOME Desktop Environment"
#图形化界面报错时(libXp.so.6: cannot open shared object file),执行如下语句。
yum install libXp
#系统环境如下
[root@oel u01]# uname -a
Linux oel 2.6.39-300.26.1.el5uek #1 SMP Thu Jan 3 18:31:38 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@oel u01]# cat /etc/issue
Oracle Linux Server release 5.9
Kernel \r on an \m
#创建用户
groupadd oinstall
groupadd dba
mkdir -p /u01/oracle
useradd -g oinstall -G dba -d /u01/oracle -m oracle
chown -R oracle:oinstall /u01
#因redhat5之后,创建用户不复制文件,所以手动复制oracle用户的profile等文件
cp /etc/skel/.bash_profile /u01/oracle
cp /etc/skel/.bashrc /u01/oracle
cp /etc/skel/.bash_logout /u01/oracle
passwd oracle
#输入密码两次
#导入数据库安装文件,并分配权限
chown -R oracle:oinstall /u01
[root@oel u01]# pwd
/u01
[root@oel u01]# ls -lh
total 725M
-rw-r--r-- 1 oracle oinstall 724M Jun 17 10:43 10201_database_linux_x86_64.cpio.gz #数据库安装文件
drwxr-xr-x 5 oracle oinstall 4.0K Jun 17 11:09 Disk1
#10.2.0.4升级包
drwxr-xr-x 2 oracle oinstall 4.0K Jun 17 11:17 oracle
#修改环境变量
vi /u01/oracle/.bash_profile
export ORACLE_BASE=/u01
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
stty erase ^h
su - oracle
cd /u01/
#解压10.2.0.1的安装文件
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv < 10201_database_linux_x86_64.cpio
#修改操作系统参数
[oracle@oel database]$ su - root
Password:
[root@oel ~]# vi /etc/redhat-release
#注释该行,放到后面,改为redhat-4
redhat-4
#Red Hat Enterprise Linux Server release 5.9 (Tikanga)
--------------------------------------------
vi /etc/sysctl.conf
#前两行可注释掉,如今大部分linux系统自带参数都比这两个值要大
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
#10.2.0.5升级需要fs.file-max = 101365,net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 101365
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
vi /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/csh.login
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif
#全部修改后最好reboot一下。
--------------------------------------------
cd /u01/database/
#开始安装
./runInstaller
#如果前面都做好了,安装应该不会报错。