安装并创建数据库【Oracle Database 10g 】(一)

 
1.    root用户的身份登录:
2.    检查硬件需求:
 grep MemTotal /proc/meminfo(检查物理内存的大小,至少为1024M)
 grep SwapTotal /proc/meminfo(检查交换分区的大小,至少为1.5G)
 df –k /tmp(检查磁盘空间在/tmp分区的大小,至少为400M)
 df –k (检查系统硬盘的空余空间)
 下表显示不同安装类型所需的磁盘空间:
Installation Type
Requirement for Software Files (GB)
Enterprise Edition
1.5
Standard Edition
1.5
Custom (maximum)
1.5
 grep "model name" /proc/cpuinfo确定是否系统架构可以运行该软件)
 
补充:假如swap分区不够,我们需要扩展,需要使用下列命令
 
 fdisk –l
 
 fdisk /dev/sda
 
 partprobe
 
 mkswap /dev/sda5
 
 swapon /dev/sda5
 
grep SwapTotal /proc/meminfo查看swap分区的大小)
 
假如家目录(因为逻辑卷挂载在home分区上,所以我们只需要扩展逻辑卷即可)的空间过小,我们也需要进行扩展:
 
umount /home
 
lvextend –L 10G /dev/vol0/home
 
e2fsck -f /dev/vol0/home
 
resize2fs /dev/vol0/home
 
mount /dev/vol0/home /home
 
df –h(查看目前磁盘空间和使用情况以更易读的方式显示)
 
3.检查软件的需求:
操作系统必须是下列中的一种
Red Hat Enterprise Linux AS/ES 3.0 (Update 4 or later)
Red Hat Linux 4.0下面的实验我们就以4.0版本为例
SUSE Linux Enterprise Server 9.0 with SP 2 or later
Asianux 1.0
Asianux 2.0
测试命令:cat /etc/issue
因为我们使用的是5.4的版本,所以系统检测时可能通不过,我们的将5.4改成4.4,系统检测完毕后再改过来。
 
内核版本:
 
Red Hat Enterprise Linux 3.0 and Asianux 1.0 : 2.4.21-27.E(默认版本)
 
Red Hat Enterprise Linux 4.0 and Asianux 2.0 :2.6.9-5.EL(我们应该和相应的操作系统相对应,我们用的就是Red Hat Enterprise Linux 4.0版本的操作系统
SUSE Linux Enterprise Server 9.0 :2.6.5-7.201
测试命令:uname -r
 
软件包(下面我们只列出了Red Hat Enterprise Linux 4.0版本的包)
 Red Hat Enterprise Linux 4.0 and Asianux 2.0:
 
binutils-2.15.92.0.2-13.EL4
 
compat-db-4.1.25-9
 
compat-libstdc++-296-2.96-132.7.2
 
control-center-2.8.0-12
 
gcc-3.4.3-22.1.EL4
 
gcc-c++-3.4.3-22.1.EL44
 
glibc-2.3.4-2.9
 
glibc-common-2.3.4-2.9
 
gnome-libs-1.4.1.2.90-44.1
 
libstdc++-3.4.3-22.1
 
libstdc++-devel-3.4.3-22.1
 
make-3.80-5
 
pdksh-5.2.14-30
 
sysstat-5.0.5-1
 
xscreensaver-4.18-5.rhel4.2
 
setarch-1.6-1
 
为了防止以后出错,最好也将下列的包安装了
 
libXplibXp-devel
 
Java Develoment(组包,yum groupinstall “Java Development”
 
测试命令:rpm -q package_name
 
4.检查网络配置
 
Vim /etc/sysconfig/network
 
HOSTNAME=oracle.example.com
 
Vim /etc/hosts
 
192.168.0.117 oracle.example.com oracle
 
(这里的地址是你主机的静态地址)
 
注意:这里只是为了方便,我们可以用动态地址,并用DNS对主机名进行解析
 5.创建系统组和用户
系统组
OSDBA  如果你是首次创建的话,必须添加该组,它确定的操作系统用户帐户具有数据库(SYSDBA的权限)的管理权限。此组的默认名称是数据库管理员,此组的默认名为dba
 OSOPER(可选组,如果你想要一个独立的操作系统的用户群有一个有限的数据库(即SYSOPER权限)的管理权限,就需要添加。默认情况下,在OSDBA组的成员也有SYSOPER权限注意:此种方式必须选用自定义安装Oracle通用安装程序提示你指定这个组的名称。通常为这一群体选择的组是oper
the Oracle Inventory (当你在系统上首次安装Oracle软件时,Oracle通用安装程序创建oraInst.loc文件,该文件确定了Oracle库存组的名称和Oracle清单目录的路径。)
 
 如果该文件存在自行命令:more /etc/oraInst.loc
 
显示结果为:
 
inventory_loc=/u01/app/oracle/oraInventory
 
inst_group=oinstall
 
inst_group参数显示了the Oracle Inventory group的名称
系统用户the Oracle Software Owner User
 如果系统首次安装Oracle软件,则必须创建该用户,该用户拥有安装过程中所需的所有软件,并且该用户必须使the Oracle Inventory group作为其主组,让OSDBAOSOPER作为其附加组。
groupad dba
groupadd dba
groupadd oper
useradd  –g  oinstall  –G  dba,oper  oracle
passwd oracle(oracle用户添加密码)
id oracle
id nobody(安装软件前必须确定该用户是否存在,若该用户不存在,则需创建) 
6.配置内核参数
参数标准:   
Parameter
Value
File
semmsl
semmns
semopm
semmni
250
32000
100
128
/proc/sys/kernel/sem
shmall
2097152
/proc/sys/kernel/shmall
shmmax
Half the size of physical memory (in bytes)
/proc/sys/kernel/shmmax
shmmni
4096
/proc/sys/kernel/shmmni
file-max
65536
/proc/sys/fs/file-max
ip_local_port_range
Minimum:1024
Maximum: 65000
/proc/sys/net/ipv4/ip_local_port_range
rmem_default
1048576
/proc/sys/net/core/rmem_default
rmem_max
1048576
/proc/sys/net/core/rmem_max
wmem_default
262144
/proc/sys/net/core/wmem_default
wmem_max
262144
/proc/sys/net/core/wmem_max
 
使用命令查看这些参数:
Parameter
Command
semmsl, semmns, semopm, and semmni
# /sbin/sysctl -a | grep sem
This command displays the value of the semaphore parameters in the order listed.
shmall, shmmax, and shmmni
# /sbin/sysctl -a | grep shm
This command displays the details of the shared memory segment sizes.
file-max
# /sbin/sysctl -a | grep file-max
This command displays the maximum number of file handles.
ip_local_port_range
# /sbin/sysctl -a | grep ip_local_port_range
This command displays a range of port numbers.
rmem_default
# /sbin/sysctl -a | grep rmem_default
rmem_max
# /sbin/sysctl -a | grep rmem_max
wmem_default
# /sbin/sysctl -a | grep wmem_default
wmem_max
# /sbin/sysctl -a | grep wmem_max
vim /etc/sysctl.conf
 
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 = 1048576
 
net.core.rmem_max = 1048576
 
net.core.wmem_default = 262144
 
net.core.wmem_max = 262144
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章