ITPub博客

首页 > Linux操作系统 > Linux操作系统 > LINUX6.0 安装oracle11G R2

LINUX6.0 安装oracle11G R2

原创 Linux操作系统 作者:xxet1034 时间:2012-02-16 14:38:03 0 删除 编辑
安装好必要的包。我是在本地建了个yum库然后用yum安装rpm,非常方便。

首先创建用户:
[root@oraclevm01 sysconfig]# groupadd dba
[root@oraclevm01 sysconfig]# groupadd oper
[root@oraclevm01 sysconfig]# groupadd oinstall
[root@oraclevm01 sysconfig]# useradd -g oinstall -G dba oracle
[root@oraclevm01 sysconfig]#

改密码激活用户:
[root@oraclevm01 sysconfig]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@oraclevm01 sysconfig]#

创建相应目录并授权:
[root@oraclevm01 sysconfig]# mkdir -p /db/app/oracle/oradata
[root@oraclevm01 sysconfig]# mkdir -p /db/app/oracle/product/11.2.0/db_1
[root@oraclevm01 sysconfig]# mkdir -p /db/app/oracle/flash_recovery_area
[root@oraclevm01 sysconfig]# mkdir -p /db/app/oracle/admin
[root@oraclevm01 sysconfig]# chown -R oracle:oinstall /db
[root@oraclevm01 sysconfig]# chmod -R 755 /db
[root@oraclevm01 sysconfig]#

修改oracle的.bash_profile
[root@oraclevm01 sysconfig]# su - oracle
[oracle@oraclevm01 ~]$ 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 DISPLAY=xxx.xxx.xxx.xxx:0.0
export PATH
export ORACLE_HOME=/db/app/oracle/product/11.2.0/db_1;
export ORACLE_BASE=/db/app/oracle/;
export ORACLE_SID=vm;
export PATH=$PATH:$ORACLE_HOME/bin;
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;
export PATH=$PATH:$ORACLE_HOME/bin;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib;
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib;
[oracle@oraclevm01 ~]$ 

修改一系列系统参数:

[root@oraclevm01 ~]# vi /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

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.
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.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
~
~
~
~
~
~
~
~
~
~
"/etc/sysctl.conf" 37L, 1085C written
[root@oraclevm01 ~]# /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
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

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

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form.:
#
#            
#
#Where:
# can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
# can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
# can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#                
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
"/etc/security/limits.conf" 54L, 1921C written
[root@oraclevm01 ~]# vi /etc/pam.d/login

#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
-session   optional     pam_ck_connector.so
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/pam.d/login" 18L, 818C written
[root@oraclevm01 ~]#


然后将安装文件上传至服务器,运行runIstaller  后面的就根据提示来了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25915379/viewspace-716584/,如需转载,请注明出处,否则将追究法律责任。

上一篇: linux改变卷大小
请登录后发表评论 登录
全部评论

注册时间:2012-01-12

  • 博文量
    23
  • 访问量
    44159