本文主要是讲oracle11gR2对系统和物理配置的相关要求以及适当的参数调整
系统:
[root@testdb ~]# cat /etc/system-release CentOS release 6.7 (Final)
内核版本:
[root@testdb ~]# uname -r 2.6.32-573.el6.x86_64
内核相关参数:
[root@testdb ~]# vi /etc/sysctl.conf kernel.shmall = 4294967296 fs.aio-max-nr = 1048576 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 # Auto-enabled by xs-tools:install.sh net.ipv4.conf.all.arp_notify = 1
应用进程打开的文件数:
[root@testdb ~]# vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384
系统允许打开的文件数:
[root@testdb ~]# vi /etc/security/limits.conf oracle soft nofile 1024 oracle hard nofile 65536
相关的管理账户和组:
[root@testdb ~]# cat /etc/passwd|egrep -i "^(oracle)"|awk -F":" '{print $1}' oracle [root@testdb ~]# groups oracle oracle : oinstall dba oper asmadmin asmdba [root@testdb ~]#
相关的工具包和开发包:
[root@testdb ~]# rpm -qa|egrep -i '(unixODBC|elfutils|gcc-*|glibc-*|libstdc++|libaio)' libstdc++-4.4.7-16.el6.x86_64 glibc-common-2.12-1.166.el6_7.1.x86_64 glibc-devel-2.12-1.166.el6_7.1.x86_64 gcc-4.4.7-16.el6.x86_64 libgcc-4.4.7-16.el6.i686 compat-libstdc++-296-2.96-144.el6.i686 unixODBC-2.2.14-14.el6.x86_64 libgcc-4.4.7-16.el6.x86_64 unixODBC-kde-2.2.14-14.el6.x86_64 elfutils-libelf-devel-static-0.161-3.el6.x86_64 elfutils-libelf-0.161-3.el6.x86_64 glibc-static-2.12-1.166.el6_7.1.x86_64 glibc-2.12-1.166.el6_7.1.x86_64 libstdc++-devel-4.4.7-16.el6.x86_64 glibc-headers-2.12-1.166.el6_7.1.x86_64 gcc-c++-4.4.7-16.el6.x86_64 compat-libstdc++-33-3.2.3-69.el6.x86_64 libaio-devel-0.3.107-10.el6.x86_64 unixODBC-devel-2.2.14-14.el6.x86_64 elfutils-libelf-devel-0.161-3.el6.x86_64 glibc-utils-2.12-1.166.el6_7.1.x86_64 elfutils-libs-0.161-3.el6.x86_64 libaio-0.3.107-10.el6.x86_64 glibc-2.12-1.166.el6_7.1.i686 libstdc++-docs-4.4.7-16.el6.x86_64
物理内存大小:
[root@testdb ~]# cat /proc/meminfo |grep -i mem MemTotal: 3974196 kB MemFree: 2037892 kB Shmem: 3920 kB
交换分区大小:
[root@testdb ~]# cat /proc/meminfo |grep -i swap SwapCached: 0 kB SwapTotal: 4112380 kB SwapFree: 4112380 kB
tmpfs分区大小
[root@testdb ~]# cat /etc/fstab |egrep tmpfs tmpfs /dev/shm tmpfs defaults,size=6G 0 0
/tmp临时目录大小:
[root@testdb ~]# df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 45G 9.2G 34G 22% / tmpfs 6.0G 80K 6.0G 1% /dev/shm /dev/xvda1 477M 30M 422M 7% /boot
oracle用户环境变量设置
[oracle@testdb ~]$ cat !$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs umask 22 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export LD_LIBRARY=$ORACLE_HOME/lib PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:. export PATH
更爱登陆脚本
[root@localhost ~]# vi /etc/profile if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ];then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi