分类: Oracle
2009-10-14 17:17:48
Oracle
内存:最少1 GB
# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo
内存大小 |
对应交换分区大小 |
1 GB ~ 2 GB |
1.5倍内存大小 |
2 GB ~ 16 GB |
与内存一样大小 |
> 16 GB |
16 GB |
# grep "model name" /proc/cpuinfo
# free
# df -k /dev/shm/
# uname -m
/tmp最小1 GB空间
# df -h /tmp
|
软件需要空间 (GB) |
企业版 |
4.35 |
标准版 |
3.73 |
|
数据文件需要空间 (GB) |
企业版 |
1.68 |
标准版 |
1.48 |
# cat /proc/version
Red Hat Enterprise Linux 5.0:
需要安装下列包:
binutils-
compat-libstdc++-33-
compat-libstdc++-33-
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-
gcc-c++-
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-
libgcc-
libstdc++-
libstdc++-
libstdc++-devel
make-3.81
sysstat-
unixODBC-
unixODBC-
unixODBC-devel-
unixODBC-devel-
# grep dba /etc/group
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# id oracle
# /usr/sbin/usermod -g oinstall -G dba oracle
# /usr/sbin/useradd -g oinstall -G dba oracle
# passwd oracle
# vi /etc/sysctl.conf:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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 = 1048586
# /sbin/sysctl -p
# vi /etc/security/limits.conf , 增加下列行:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# vi /etc/pam.d/login 增加下列行:
session required pam_limits.so
# 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
# mkdir -p /db/app/
# chown -R oracle:oinstall /db/app/
# chmod -R 775 /db/app/
$ vi /home/oracle/.bash_profile
$ TMP=/tmp
$ TMPDIR=/tmp
$ export TMP TMPDIR
$ ORACLE_BASE=/db/app/oracle
$ ORACLE_SID=orcl
$ export ORACLE_BASE ORACLE_SID
$ unset ORACLE_HOME
$ unset TNS_ADMIN
$安装数据库 oracle 11g R2,比 oracle 10g R2 安装方便多了:)
$ vi /home/oracle/.bash_profile:
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
LANG=zh_CN.GBK
NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export LANG NLS_LANG
ORACLE_BASE=/db/app/oracle
ORACLE_HOME=/db/app/oracle/product/
ORACLE_SID=orcl
ORACLE_UNIQUE_NAME=orcl
DB_NAME=alpha
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_UNIQUE_NAME DB_NAME
TMP=/tmp
TMPDIR=/tmp
export TMP TMPDIR
umask 022
#cd $ORACLE_HOME/bin
#alias sqlplus='/usr/local/rlwrap/bin/rlwrap $ORACLE_HOME/bin/sqlplus /nolog'