在Oracle VirtualBox 安装 Oracle 10g For Oracle Linux 5
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
在Oracle VirtualBox 安装 Oracle 10g For Oracle Linux 5详细图文教程下载
下载在安科网的1号FTP服务器里,下载地址:
密码:www.muu.cc
下载方法见 http://www.linuxidc.net/thread-1187-1-1.html
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