在在Oracle VirtralBox 安装 Oracle 10g For Oracle Linux 5

正式Oracle Linux5.3安装数据库

1、检查操作系统版本

[root@ora10g ~]# uname -a

Linux ora10g.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 02:16:47 EDT 2009 i686 i686 i386 GNU/Linux

[root@ora10g ~]# lsb_release-a

LSB Version:   :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: EnterpriseEnterpriseServer

Description:   Enterprise Linux Enterprise Linux Serverrelease 5.4 (Carthage)

Release:       5.4

Codename:      Carthage

2、检查内存大小

[root@ora10g ~]# free

            total      used      free    shared   buffers    cached

Mem:      1035140    339916    695224         0     19824    267012

-/+ buffers/cache:     53080    982060

Swap:     2096440         0   2096440

3、 检查磁盘空间利用率,

我们打算在/orasoft安装数据库软件

我们打算在/oradata目录中存放数据文件和归档日志

[root@ora10g ~]# df -h

Filesystem           Size Used Avail Use% Mounted on

/dev/sda7            4.7G 3.0G 1.6G 66% /

/dev/sda6            2.0G  36M 1.9G  2% /tmp

/dev/sda3            4.9G 139M 4.5G  3% /orasoft

/dev/sda2            5.8G 141M 5.4G  3% /oradata

/dev/sda1            190M  12M 170M  7% /boot

tmpfs                506M    0 506M  0% /dev/shm

4、创建相关的用户及用户组和相关目录,并修改权限和所有者及所属组

[root@ora10g ~]# groupadd dba

[root@ora10g ~]# groupadd oinstall

[root@ora10g ~]# useradd -m -g oinstall -G dba -d /orasoft/home oracle

[root@ora10g ~]# passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

[root@ora10g ~]# chown -R oracle:oinstall /orasoft/ /oradata/

[root@ora10g ~]# chmod -R 755 /orasoft/ /oradata/

[root@ora10g ~]# cd/

-bash: cd/: No such file or directory

[root@ora10g ~]# cd /

[root@ora10g /]# ls -rtl

total 162

drwxr-xr-x 2 root  root     4096 Jan 9 2009 srv

drwxr-xr-x 2 root  root     4096 Jan 9 2009 opt

drwxr-xr-x 2 root  root     4096 Jan 9 2009 mnt

drwxr-xr-x 2 root  root     4096 Jan 9 2009 media

drwxr-xr-x 2 root  root     4096 Jan 9 2009 home

drwx------ 2 root  root    16384 Nov 16 22:40 lost+found

drwxr-xr-x 2 root  root     4096 Nov 16 22:41 selinux

drwxr-xr-x 14 root  root     4096 Nov 16 22:46 usr

drwxr-xr-x 3 root  root     4096 Nov 16 22:49 tftpboot

drwxr-xr-x 4 root  root     1024 Nov 16 22:52 boot

drwxr-xr-x 13 root  root     4096 Nov 16 22:53 lib

drwxr-xr-x 2 root  root     4096 Nov 16 22:53 bin

drwxr-xr-x 2 root  root    12288 Nov 16 22:53 sbin

drwxr-xr-x 23 root  root     4096 Nov 16 22:58 var

drwxr-xr-x 3 oracle oinstall 4096 Nov 16 23:00 oradata

dr-xr-xr-x 94 root  root        0 Nov 16 23:30 proc

drwxr-xr-x 11 root  root        0 Nov 16 23:30 sys

drwxr-xr-x 2 root  root        0 Nov 16 23:31 misc

drwxr-xr-x 2 root  root        0 Nov 16 23:31 net

drwxrwxrwt 7 root  root     4096 Nov 16 23:31 tmp

drwxr-xr-x 11 root  root     3580 Nov 16 23:31 dev

drwxr-x--- 6 root  root     4096 Nov 16 23:39 root

drwxr-xr-x 4 oracle oinstall 4096 Nov 16 23:46 orasoft

drwxr-xr-x 99 root  root    12288 Nov 16 23:46 etc

4、 修改内核参数

在文件最后添加如下内容,相关参数介绍将会在后期的oracle安装参数详解中进行介绍,有兴趣的朋友可以继续关注

[root@ora10g /]# vi /etc/sysctl.conf

--这部分为共享内存参数设置

kernel.shmall = 2097152       --共享内存段最大页数

kernel.shmmax = 2147483648  --单个共享内存段大小的上限字节数

kernel.shmmni = 4096        --共享内存段的最小长度

kernel.sem = 250 32000 100 128 --信号量四个值分别代表:semmsl,semmns,semopm,semmni

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

"/etc/sysctl.conf" 47L, 1280C written

[root@ora10g /]# /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.shmmax = 4294967295

kernel.shmall = 268435456

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

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

5、 修改安全限制参数

这两个参数是对linux用户可以使用的进程数和打开的文件数的设置限制

|'GITPUB个人空间MFyl L$k7KL
oxf%O l2UUsoft是软限制:用户可以超过这个设置的值,但一定不能超过hard的值。

hard是硬限制:一般soft比hard小。

如果用LV管理的话,还需要加上如下两行:
m^$P$D+yf^t/J,Y20674423M$K
c2C&[^doracle,db2,sqlserver,sybase,mysql,erp,scm,sap,java,.netoracle soft memlock 3145728
L.bsqZ20674423x2e_


hB_)sloracle hard memlock 3145728oracle,db2,sqlserver,sybase,mysql,erp,scm,sap,java,.net:}3y,Y6]-X0LY

[root@ora10g /]# vi /etc/security/limits.conf

oracle soft nproc 2047    --

oracle hard nproc 16384  --单用户可打开的最大进程数为16384

oracle soft nofile 1024    --

oracle hard nofile 65536  --可打开最大文件个数65536

"/etc/security/limits.conf" 56L, 1903C written

7、配置相关的限制

[root@ora10g /]# vi/etc/pam.d/login

session required/lib/security/pam_limits.so   ---设置可插入认证模块(PAM)限制

session required pam_limits.so             ---oracle设置Shell限制

"/etc/pam.d/login" 18L, 722C written

8、添加如下系统环境变量

[root@ora10g /]# vi /etc/profile

# /etc/profile

if [ $USER = "oracle" ]; then

   if [ $SHELL = "/bin/ksh" ]; then

       ulimit -p 1638

       ulimit -n 65536

   else

       ulimit -u 16384 -n 65536

   fi

fi

"/etc/profile" 68L, 1205C written

9、切换到oracle用户下,创建相关oracle安装的其它目录和配置环境变量

[root@ora10g /]# su - oracle

[oracle@ora10g ~]$ mkdir -p /orasoft/product/10.2.0/db_1

[oracle@ora10g ~]$ mkdir -p /oradata/archive /oradata/admin /oradata/flash_back /oradata/wwl

10、经过检查,目录已经创建好了。

[oracle@ora10g /]$ cd oradata/

[oracle@ora10g oradata]$ ls

admin archive flash_back lost+found wwl

[oracle@ora10g oradata]$ ls-rtl

total 32

drwxr-xr-x 2 oracle oinstall 16384 Nov 16 22:41 lost+found

drwxr-xr-x 2 oracle oinstall 4096 Nov 16 23:51 archive

drwxr-xr-x 2 oracle oinstall 4096 Nov 16 23:51 wwl

drwxr-xr-x 2 oracle oinstall 4096 Nov 16 23:51 flash_back

drwxr-xr-x 2 oracle oinstall 4096 Nov 16 23:51 admin

11、进入用户家目录,修改bash_profile,添加用户变量

[oracle@ora10g /]$ cd

[oracle@ora10g ~]$ vi .bash_profile

[oracle@ora10g ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

       . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_SID=wwl             ---指定ORACLE SID

export ORACLE_BASE=/orasoft/       ---指定ORACLE_BASE目录

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1  ---指定ORACLE_HOME目录

export PATH=$PATH:$ORACLE_HOME/bin                  ---指定对应的命令执行PATH

export LD_LIBARY_PATH=$ORACLE_HOME/lib              --指定库文件存放的路径

export LANG="zh_CN.GB18030";                        ---指定用户语言

export PATH

umask 022

[oracle@ora10g ~]$ source ~/.bash_profile   ---让刚添加的环境变量立即生效

12、关闭sendmail以及smb等无用的服务,并设置不自动启动,开启FTP服务,一会儿穿安装介质上来。

[root@ora10g ~]# chkconfig sendmail off

[root@ora10g ~]# chkconfig cups off

[root@ora10g ~]# service vsftpd restart

Shutting down vsftpd: [FAILED]

Starting vsftpd for vsftpd: [ OK ]

13、检查如下软件包是否都安装了:

libXp-1.0.0-8.i386.rpm

openmotif22-2.2.3-18.i386.rpm

compat-db-4.2.52-5.1.i386.rpm

compat-gcc-34-3.4.6-4.i386.rpm

compat-gcc-34-c++-3.4.6-4.i386.rpm

compat-libstdc++-33-3.2.3-61.i386.rpm

libaio-0.3.106-3.2.i386.rpm

[root@ora10g ~]# rpm -qa|grep libXp-*

libXpm-3.5.5-3

libXp-devel-1.0.0-8.1.el5

libXpm-devel-3.5.5-3

libXp-1.0.0-8.1.el5

[root@ora10g ~]# rpm -qa|grep openmoti*

[root@ora10g ~]# rpm -qa|grep openmoti

[root@ora10g ~]# rpm -qa|grep open*

openssl-0.9.8e-12.el5

openjade-1.3.2-27

nautilus-open-terminal-0.6-6.el5

cscope-15.5-15.1.el5_3.1

openldap-devel-2.3.43-3.el5

openssh-server-4.3p2-36.el5

openldap-2.3.43-3.el5

openssh-4.3p2-36.el5

openssh-askpass-4.3p2-36.el5

openssl-devel-0.9.8e-12.el5

opensp-1.5.2-4

openssh-clients-4.3p2-36.el5

[root@ora10g ~]# rpm -qa|grep openm*

openssl-0.9.8e-12.el5

openjade-1.3.2-27

nautilus-open-terminal-0.6-6.el5

openldap-devel-2.3.43-3.el5

openssh-server-4.3p2-36.el5

openldap-2.3.43-3.el5

openssh-4.3p2-36.el5

openssh-askpass-4.3p2-36.el5

openssl-devel-0.9.8e-12.el5

opensp-1.5.2-4

openssh-clients-4.3p2-36.el5

[root@ora10g ~]# rpm -qa|grep compat-db*

java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115

[root@ora10g ~]# rpm -qa|grep compat-db

[root@ora10g ~]# rpm -qa|grep compa

compat-libgcc-296-2.96-138

compat-gcc-34-3.4.6-4

compat-gcc-34-g77-3.4.6-4

compat-libstdc++-296-2.96-138

java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.115

compat-glibc-headers-2.3.4-2.26

java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115

avahi-compat-libdns_sd-0.6.16-6.el5

compat-libf2c-34-3.4.6-4

compat-libcom_err-1.0-7

compat-gcc-34-c++-3.4.6-4

compat-libstdc++-33-3.2.3-61

compat-glibc-2.3.4-2.26

[root@ora10g ~]# rpm -qa|grep compat-lib

compat-libgcc-296-2.96-138

compat-libstdc++-296-2.96-138

avahi-compat-libdns_sd-0.6.16-6.el5

compat-libf2c-34-3.4.6-4

compat-libcom_err-1.0-7

compat-libstdc++-33-3.2.3-61

14、挂载光盘,进行为未安装的软件包安装

[root@ora10g media]# mount -t iso9660 /dev/cdrom /mnt

mount: block device /dev/cdrom is write-protected, mounting read-only

[root@ora10g media]# cd /mnt

[root@ora10g mnt]# ls

blafdoc.css    eula.py   README-en.html        Server

Cluster        GPL       RELEASE-NOTES-en      supportinfo

ClusterStorage images    RELEASE-NOTES-en.html TRANS.TBL

EULA           isolinux  RPM-GPG-KEY           VT

eula.en_US     README-en RPM-GPG-KEY-oracle

[root@ora10g mnt]# cd Server/

[root@ora10g Server]# rpm -ivh openmotif22-2.2.3-18.i386.rpm

warning: openmotif22-2.2.3-18.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

  1:openmotif22           ########################################### [100%]

[root@ora10g Server]# rpm -ivh compat-gcc-34-

compat-gcc-34-3.4.6-4.i386.rpm     compat-gcc-34-g77-3.4.6-4.i386.rpm

compat-gcc-34-c++-3.4.6-4.i386.rpm

[root@ora10g Server]# rpm -ivh compat-gcc-34-3.4.6-4.i386.rpm

warning: compat-gcc-34-3.4.6-4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

       package compat-gcc-34-3.4.6-4.i386 is already installed

[root@ora10g Server]# rpm -ivh compat-gcc-34-c++-3.4.6-4.i386.rpm

warning: compat-gcc-34-c++-3.4.6-4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

       package compat-gcc-34-c++-3.4.6-4.i386 is already installed

[root@ora10g Server]# rpm -ivh compat-db-4.2.52-5.1.i386.rpm

warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

  1:compat-db             ########################################### [100%]

[root@ora10g Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

       package compat-libstdc++-33-3.2.3-61.i386 is already installed

[root@ora10g Server]# rpm -ivh compat-libstdc++-

compat-libstdc++-296-2.96-138.i386.rpm compat-libstdc++-33-3.2.3-61.i386.rpm

[root@ora10g Server]# rpm -ivh libaio-0.3.106-3.2.i386.rpm

warning: libaio-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...               ########################################### [100%]

       package libaio-0.3.106-3.2.i386 is already installed

15解压缩刚上传上来的介质

[root@ora10g Server]# su -oracle

[oracle@ora10g ~]$ ls

10201_database_linux32.zip

[oracle@ora10g ~]$ unzip 10201_database_linux32.zip

Archive: 10201_database_linux32.zip

  creating: database/

  creating: database/doc/

  creating: database/doc/dcommon/

…….中间过程太多,已经省略

creating: database/stage/fastcopy/

inflating: database/stage/fastcopy/setperms1.sh

inflating: database/stage/fastcopy/oracle.server_EE_1.xml

inflating: database/stage/fastcopy/oracle.server_EE_exp_1.xml

inflating: database/stage/fastcopy/oracle.server_EE_dirs.lst

inflating: database/stage/fastcopy/oracle.server_EE_filemap.jar

inflating: database/stage/fastcopy/oracle.server_SE_1.xml

inflating: database/stage/fastcopy/oracle.server_SE_exp_1.xml

inflating: database/stage/fastcopy/oracle.server_SE_dirs.lst

inflating: database/stage/fastcopy/oracle.server_SE_filemap.jar

inflating: database/stage/fastcopy/oracle.server_Custom_1.xml

inflating: database/stage/fastcopy/oracle.server_Custom_exp_1.xml

inflating: database/stage/fastcopy/oracle.server_Custom_dirs.lst

inflating: database/stage/fastcopy/oracle.server_Custom_filemap.jar

inflating: database/stage/fastcopy/racfiles.jar

inflating: database/stage/oracle.server.10_2_0_1_0_1120187896349.bak

inflating: database/stage/oracle.server.10_2_0_1_0_dep_default.properties

inflating: database/stage/oracle.server.10_2_0_1_0_1120187896411.bak

inflating: database/stage/fastcopy.xml

inflating: database/welcome.html 

16、配置显示终端:

[oracle@ora10g ~]$ export DISPLAY=192.168.5.1:0.0

[oracle@ora10g ~]$ xclock

Warning: Missing charsets in String to FontSet conversion

[oracle@ora10g ~]$ ls

c10201_database_linux32.zip database

[oracle@ora10g ~]$ rm -rf 10201_database_linux32.zip

[oracle@ora10g ~]$ cd database/

[oracle@ora10g database]$ ls

doc install response runInstaller stage welcome.html

17、开始正式安装,加上-ignoreSysPreReqs该参数的目的是忽略系统版本好检测。

[oracle@ora10g database]$ export LC_ALL=en_US

[oracle@ora10g database]$ ./runInstaller -ignoreSysPreReqs

Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

                                     Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-11-17_12-16-27AM. Please wait ...[oracle@ora10g database]$ Oracle Universal Installer, Version 10.2.0.1.0 Production

Copyright (C) 1999, 2005, Oracle. All rights reserved.

详细安装过程见连接

http://download.csdn.net/detail/wuweilong/3813009

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值