说明:VM虚拟机下linux环境进行安装的oracle 11g 数据库,若有欠缺请多多指教。
首先要参考原版的安装使用说明文档,根据上面的描述的要求进行安装操作。
如下是手动操作的方法:
一.检查linux环境RPM包的是否完全安装,并记录缺少的RPM包文件并进行安装。
[root@mylinux ~]# rpm -qa |grep binut
binutils-2.15.92.0.2-24
[root@mylinux ~]# rpm -qa |grep compat
compat-gcc-32-3.2.3-47.3
compat-libstdc++-33-3.2.3-47.3
compat-libgcc-296-2.96-132.7.2
compat-libcom_err-1.0-5
compat-gcc-32-c++-3.2.3-47.3
compat-db-4.1.25-9
java-1.4.2-gcj-compat-1.4.2.0-27jpp
compat-libstdc++-296-2.96-132.7.2
[root@mylinux ~]# rpm -qa |grep elfutils
elfutils-libelf-0.97.1-5
elfutils-0.97.1-5
[root@mylinux ~]# rpm -qa |grep gcc
libgcc-3.4.6-9
gcc-g77-3.4.6-9
compat-gcc-32-3.2.3-47.3
gcc-c++-3.4.6-9
gcc-java-3.4.6-9
compat-libgcc-296-2.96-132.7.2
compat-gcc-32-c++-3.2.3-47.3
gcc-3.4.6-9
[root@mylinux ~]# rpm -qa |grep glibc
glibc-common-2.3.4-2.39
glibc-headers-2.3.4-2.39
glibc-2.3.4-2.39
glibc-kernheaders-2.4-9.1.100.EL
glibc-devel-2.3.4-2.39
[root@mylinux ~]# rpm -qa |grep libaio
[root@mylinux ~]# rpm -qa |grep libaio
[root@mylinux ~]# rpm -qa |grep libgcc
libgcc-3.4.6-9
compat-libgcc-296-2.96-132.7.2
You have new mail in /var/spool/mail/root
[root@mylinux ~]# rpm -qa |grep libstdc
libstdc++-3.4.6-9
compat-libstdc++-33-3.2.3-47.3
libstdc++-devel-3.4.6-9
compat-libstdc++-296-2.96-132.7.2
[root@mylinux ~]# rpm -qa |grep make
make-3.80-6.EL4
automake17-1.7.9-5
automake14-1.4p6-12
automake-1.9.2-3
automake16-1.6.3-5
automake15-1.5-13
[root@mylinux ~]# rpm -qa |grep numactl
numactl-0.6.4-1.40
[root@mylinux ~]# rpm -qa |grep sysstat
[root@mylinux ~]# libgcclibgcc
-bash: libgcclibgcc: command not found
[root@mylinux ~]# rpm -qa |grep unix
dos2unix-3.1-21.2
unix2dos-2.2-24.1
[root@mylinux ~]# ls
anaconda-ks.cfg Desktop install.log.syslog rpm
batch install.log oracle trans
[root@mylinux ~]# cd rpm
[root@mylinux rpm]# ls
rpm
[root@mylinux rpm]# cd rpm
[root@mylinux rpm]# ls
elfutils-libelf-devel-0.97.1-5.i386.rpm
libaio-0.3.105-2.i386.rpm
libaio-devel-0.3.105-2.i386.rpm
sysstat-5.0.5-16.rhel4.i386.rpm
unixODBC-2.2.11-1.RHEL4.1.i386.rpm
unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
安装RPM包,一定要 保证安装正确:
[root@mylinux rpm]# rpm -ivh *.rpm
warning: elfutils-libelf-devel-0.97.1-5.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:unixODBC ########################################### [ 17%]
2:libaio ########################################### [ 33%]
3:elfutils-libelf-devel ########################################### [ 50%]
4:libaio-devel ########################################### [ 67%]
5:sysstat ########################################### [ 83%]
6:unixODBC-devel ########################################### [100%]
[root@mylinux rpm]#
-----------------------
二.LINUX创建oracle组用户说明以及环境设置修改系统内核参数
1.Creating Required Operating System Groups and Users
[root@mylinux u01]# groupadd oinstall
[root@mylinux u01]# groupadd dba
[root@mylinux u01]# cd /
[root@mylinux u01]# mkdir –p /u01/oracle
操作命令介绍:
# /usr/sbin/useradd -g oinstall -G dba[,oper] oracle
[root@mylinux u01]# useradd -g oinstall -G dba -d /u01/oracle oracle
[root@mylinux u01]# 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@mylinux u01]# cd /
[root@mylinux /]# ls -l
total 168
drwxr-xr-x 2 root root 4096 Apr 22 14:23 bin
drwxr-xr-x 3 root root 4096 Apr 22 12:44 boot
drwxr-xr-x 10 root root 6640 Apr 26 19:08 dev
drwxr-xr-x 81 root root 12288 Apr 26 19:20 etc
drwxr-xr-x 2 root root 4096 Feb 21 2005 home
drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd
drwxr-xr-x 12 root root 4096 Apr 22 14:22 lib
drwx------ 2 root root 16384 Apr 22 08:42 lost+found
drwxr-xr-x 4 root root 4096 Apr 26 19:08 media
drwxr-xr-x 2 root root 4096 Nov 16 2007 misc
drwxr-xr-x 2 root root 4096 Feb 21 2005 mnt
drwxr-xr-x 3 root root 4096 Apr 22 14:09 opt
dr-xr-xr-x 63 root root 0 Apr 26 15:07 proc
drwxr-x--- 18 root root 4096 Apr 26 15:20 root
drwxr-xr-x 2 root root 12288 Apr 22 14:23 sbin
drwxr-xr-x 1 root root 0 Apr 26 15:07 selinux
drwxr-xr-x 2 root root 4096 Feb 21 2005 srv
drwxr-xr-x 9 root root 0 Apr 26 15:07 sys
drwxrwxrwt 6 root root 4096 Apr 26 19:11 tmp
drwxr-xr-x 3 root root 4096 Apr 26 15:59 u01
drwxr-xr-x 14 root root 4096 Apr 22 12:43 usr
drwxr-xr-x 19 root root 4096 Apr 22 12:46 var
[root@mylinux /]#
主属调整:
[root@mylinux /]# chown -R oracle:oinstall u01
[root@mylinux /]# ls -l
total 168
drwxr-xr-x 2 root root 4096 Apr 22 14:23 bin
drwxr-xr-x 3 root root 4096 Apr 22 12:44 boot
drwxr-xr-x 10 root root 6640 Apr 26 19:08 dev
drwxr-xr-x 81 root root 12288 Apr 26 19:20 etc
drwxr-xr-x 2 root root 4096 Feb 21 2005 home
drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd
drwxr-xr-x 12 root root 4096 Apr 22 14:22 lib
drwx------ 2 root root 16384 Apr 22 08:42 lost+found
drwxr-xr-x 4 root root 4096 Apr 26 19:08 media
drwxr-xr-x 2 root root 4096 Nov 16 2007 misc
drwxr-xr-x 2 root root 4096 Feb 21 2005 mnt
drwxr-xr-x 3 root root 4096 Apr 22 14:09 opt
dr-xr-xr-x 63 root root 0 Apr 26 15:07 proc
drwxr-x--- 18 root root 4096 Apr 26 15:20 root
drwxr-xr-x 2 root root 12288 Apr 22 14:23 sbin
drwxr-xr-x 1 root root 0 Apr 26 15:07 selinux
drwxr-xr-x 2 root root 4096 Feb 21 2005 srv
drwxr-xr-x 9 root root 0 Apr 26 15:07 sys
drwxrwxrwt 6 root root 4096 Apr 26 19:11 tmp
drwxr-xr-x 3 oracle oinstall 4096 Apr 26 15:59 u01
drwxr-xr-x 14 root root 4096 Apr 22 12:43 usr
drwxr-xr-x 19 root root 4096 Apr 22 12:46 var
3.Configuring Kernel Parameters
如下是需要添加的内核参数:
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576
[root@mylinux ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
配置如下:
####################################################
#oracle configure
####################################################
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576