前言:
这几天第一次在生产环境下安装数据库,确实是与虚拟机安装有些不一样的,于是做了一下整理。其中还有很多东西不大明白,之后会做一定的补充说明的。
OS:CentOS release 6.7 (Final)
BD: Oracle database11.2.0.4.0
通过secureCRT远程登录服务器。
一、安装前环境准备
1、修改OS系统标识
oracle默认不支持CentOS系统安装,Oracle Database 11g Release 2,注释原有的OS系统标识,改为Red Hat Enterprise Linux 6
[root@ns ~]# vi/etc/redhat-release
#CentOS release6.7 (Final)
Red HatEnterprise Linux 6
2、关闭selinux,需重启生效
将selinux的状态改为disable
[root@ns ~]# vi/etc/selinux/config
# This filecontrols the state of SELinux on the system.
# SELINUX= cantake one of these three values:
# enforcing -SELinux security policy is enforced.
# permissive -SELinux prints warnings instead of enforcing.
# disabled - NoSELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= cantake one of these two values:
# targeted -Targeted processes are protected,
# mls - MultiLevel Security protection.
SELINUXTYPE=targeted
3、关闭防火墙
[root@ns ~]#chkconfig iptables off
[root@ns ~]#service iptables stop
[root@ns ~]# serviceiptables status
iptables: Firewallis not running.
4、对oracle用户设置限制,提高软件运行性能
[root@ns ~]# vi /etc/security/limits.conf
#/etc/security/limits.conf
##Each linedescribes a limit for a user in the form:
##<domain> <type> <item> <value>
##Where:
#<domain>can be:
# - a 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
##<type> canhave the two values:
# -"soft" for enforcing the soft limits
# - "hard" for enforcing hardlimits
#<item> canbe 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 filedescriptors
# - 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 forthis user
# - maxsyslogins - max number of loginson the system
# - priority - the priority to run userprocess with
# - locks - max number of file locks theuser can hold
# - sigpending - max number of pendingsignals
# - msgqueue - max memory used by POSIXmessage queues (bytes)
# - nice - max nice priority allowed toraise to values: [-20, 19]
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#
#* 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
#oracleadd
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240
oracle soft memlock 31457280
oracle hard memlock 31457280
"/etc/security/limits.conf"61L, 2060