RedHat Enterprise Linux as 5.4上安装Oracle 10g 10.2.0.1.0
1.查看linux内核版本和发行版本,默认oracle10不支持rhel5,所以需要修改/etc/issue文件,将5.4改为“4.4”
[oracle@oraserver ~]$ uname -r
2.6.18-164.el5
[oracle@oraserver ~]$ cat /etc/issue
Red Hat Enterprise Linux Server release 5.4 (Tikanga) ##改为4.4
Kernel \r on an \m
[oracle@oraserver ~]$ cat /etc/issue.net
Red Hat Enterprise Linux Server release 5.4 (Tikanga) ##改为4.4
Kernel \r on an \m
2.创建oracle安装目录和oracle软件包目录,如下图
[root@oraserver ~]# mkdir -p /ora10g/progame/oracle 准备做安装目录
[root@oraserver ~]# mkdir -p /oracle10g/data oracle软件包目录
3.创建用于安装和维护 Oracle的 Linux 组和用户帐户。用户帐户将称为 oracle,
[root@oraserver ~]# groupadd oinstall
[root@oraserver ~]# groupadd dba
[root@oraserver ~]# useradd -g oinstall -G dba oracle
[root@oraserver ~]# 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@oraserver ~]# chown -R oracle:oinstall /ora10g /oracle10g/
4. 配置 Linux 内核参数,因为是在虚拟机环境,所以很多都规划为较小的值,如果系统够强大,可以根据情况规划大点
[root@oraserver ora10g]# vim /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 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
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 268435456
kernel.shmall = 2097152 表示系统一次可以使用的共享内存总量(以页为单位,)。
kernel.shmmni = 4096 表示设置系统范围内单个共享内存段的最小值。
kernel.shmmax = 2147483648 该参数定义了共享内存段的最大尺寸(以字节为单位)。
fs.file-max = 65536 表示文件句柄的最大数量。
kernel.sem = 250 32000 100 128 sem 4个参数依次是
net.core.rmem_default = 1048576 默认的接收窗口大小
net.core.rmem_max = 262144 接收窗口的最大大小
net.core.wmem_default = 262144 默认的发送窗口大小
net.core.wmem_max = 262144 发送窗口的最大大小
net.ipv4.ip_local_port_range = 1024 65000 表示端口范围
5.使内核配置参数不重启马上生效,
[root@oraserver ora10g]# 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.shmall = 2097152
kernel.shmmni = 4096
kernel.shmmax = 2147483648
fs.file-max = 65536
kernel.sem = 250 32000 100 128
net.core.rmem_default = 1048576
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range = 1024 65000
6.修改维护数据库用户oracle的环境变量,如下图:
[oracle@oraserver ~]$ vim .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
ORACLE_BASE=/ora10g/progame/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bin
export PATH
7.重新读取.bash_profile文件内容,或者重新启动也可。
[oracle@oraserver ~]$ source .bash_profile
[oracle@oraserver ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/home/oracle/bin:/ora10g/progame/oracle/bin
©著作权归作者所有:来自51CTO博客作者yeai的原创作品,如需转载,请注明出处,否则将追究法律责任
oracle数据库休闲oracle
共同学习,写下你的评论
评论加载中...
作者其他优质文章