10个步骤在Centos5.3下成功安装oracle11g r2

制作:高进波
时间:2009-09-27

环境:
centos 5.3 x86
oracle 11g r2 for linux

vi /etc/hosts
127.0.0.1 oracle.hugwww.com oracle

服务器由于不在本地,本次安装使用vnc显示图形界面

1.安装依赖包
yum binutils compat-libstdc++-33-3.2.3 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++-4.1.2 libstdc++-devel-4.1.2 make sysstat unixODBC unixODBC-devel

wget ftp://ftp.pbone.net/mirror/ftp.centos.org/3.9/os/i386/RedHat/RPMS/pdksh-5.2.14-21.9.i386.rpm
yum remove ksh
rpm -ivh pdksh-5.2.14-21.9.i386.rpm

2.修改内核参数
vi /etc/sysctl.conf

#oracle
fs.file-max =6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

3.修改文件描述符
vi /etc/security/limit.conf
* – nofile 65535
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

4.添加用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

5.修改权限
chown -R oracle:oinstall /var/oracle11g
chmod -R 775 /var/oracle11g

6.修改环境变量
vi ~oracle/.bash_profile
ORACLE_BASE=/var/oracle11g/app
ORACLE_SID=hugwww
export ORACLE_BASE ORACLE_SID

7.安装配置并启动vncserver
yum install vnc-server

vi ~/.vnc/xstartup
twm &
xhost +

service vncserver start

8.解压文件
cd /var/oracle11g
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip

9.开始安装
export DISPLAY=localhost:2
su – oracle
cd /var/oracle11g/database
./runInstaller

10.使用vnc viewer连接vnc server
这时oracle安装界面已经出来,然后根据提示进行操作

完成!

附:

如何增加swap分区大小
cd /var
查看现在swap分区大小
free -m
设置大小4G
dd if=/dev/zero of=swapfile bs=1024 count=4000000
mkswap swapfile
swapon swapfile
free -m
如果需要一直保持这个swap,可以把它写入/etc/fstab
vi /etc/fstab
/var/swapfile swap swap defaults 0 0

你可能感兴趣的:(oracle11g)