oracle10g
+需要安装的包+
Rhel5.3需要安装:
不管哪个oracel版本都需要安装libXp,这是xwindow需要的包
检查是否安装了libXp
#rpm -qa |grep libXp
libXp-1.0.0-8.1.el5
libXpm-3.5.5-3
libXpm-3.5.5-3
libXpm-devel-3.5.5-3
注意是libXp-XXXXXXX的,不是libXpm-xxxxx。
如果使用rpm:
rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
如果使用yum
yum install libXp.i386
只需要安装32bit的包就可以了。
oracle11g需要libaio-devel包,只需要安装64bit的包就可以了:
rpm -qa |grep libaio-devel
libaio-devel-0.3.106-3.2
rpm -ivh libaio-devel-0.3.106
yum install libaio-devel.x86_64
#rpm -qa |grep elfutils-libelf
elfutils-libelf-0.137-3.el5
#rpm -qa |grep elfutils-libelf-devel
yum install elfutils-libelf-devel.x86_64
安装glibc-devel包,32bit和64bit的包都需要安装
rpm -qa |grep glibc-devel
glibc-devel-2.5-i386
yum install glibc-devel.i386
yum install glibc-devel.x86_64
* /usr/bin/ld: crt1.o: No such file: No such file or directory
解决办法:安装glibc-devel-2.3.4-2.25.i386.rpm
sysstat-7.0.0
yum install sysstat.x86_64
.完全安装linux as4 (完全安装的话,系统就只差两个补丁compat-libcwait-2.0-2.i386.rpm 和compat-oracle-rhel4-1.0-5.i386.rpm ,
若你不是完全安装的话 那就要检查很多的组件是不是安装了
以下这些是必须的
compat-db-4.1.25-9
compat-gcc-32-3.2.3-47.3
compat-gcc-32-c++-3.2.3-47.3
compat-oracle-rhel4-1.0-3
compat-libcwait-2.0-1
compat-libgcc-296-2.96-132.7.2
compat-libstdc++-296-2.96-132.7.2
compat-libstdc++-33-3.2.3-47.3
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
gnome-libs-1.4.1.2.90-44
gnome-libs-devel-1.4.1.2.90-44
libaio-devel-0.3.102-1
libaio-0.3.102-1
make-3.80-5
openmotif21-2.1.30-11
xorg-x11-deprecated-libs-devel-6.8.1-23.EL
xorg-x11-deprecated-libs-6.8.1-23.EL
在Rhel4.7版本下:
rpm -ivh libstdc++-devel-3.4.6-10.i386.rpm
或yum install libstdc++-devel.x86_64
yum install libstdc++-devel.i386
rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
yum install unixODBC-devel.x86_64
yum install unixODBC-devel.i386
rpm -ivh sysstat-5.0.5-19.el4.i386.rpm
yum install sysstat.x86_64
yum install glibc-devel.i386
需要安装gcc
Rhel4.7下安装gcc的方法如下:
rpm -ivh glibc-kernheaders-2.4-9.1.103.EL.i386.rpm
rpm -ivh glibc-headers-2.3.4-2.41.i386.rpm
rpm -ivh glibc-devel-2.3.4-2.41.i386.rpm
其它Linux下安装gcc的方法也类似。
+设置操作系统参数+
++关闭Linux操作系统中不需要的服务++
chkconfig --level 0123456 avahi-daemon off
chkconfig --level 0123456 bluetooth off
chkconfig --level 0123456 cups off
chkconfig --level 0123456 gpm off
chkconfig --level 0123456 hidd off
chkconfig --level 0123456 hplip off
chkconfig --level 0123456 ip6tables off
chkconfig --level 0123456 isdn off
chkconfig --level 0123456 mcstrans off
chkconfig --level 0123456 mdmonitor off
chkconfig --level 0123456 netfs off
chkconfig --level 0123456 nfslock off
chkconfig --level 0123456 pcscd off
chkconfig --level 0123456 portmap off
chkconfig --level 0123456 readahead_early off
chkconfig --level 0123456 readahead_later off
chkconfig --level 0123456 rhnsd off
chkconfig --level 0123456 rpcgssd off
chkconfig --level 0123456 rpcidmapd off
chkconfig --level 0123456 sendmail off
++查看内存及swap++
grep MemTotal /proc/meminfo
oracle10g至少需要922M物理内存
cat /proc/swaps
dd if=/dev/zero of=swap.dat bs=1M count=20000
chmod 600 swap.dat
mkswap swap.dat
swapon swap.dat
oracle11g需要的swap大小:
12033MB
++设置系统参数++
参照以下设置在/etc/sysctl.conf设置有关参数。具体取值取决于应用。
+++semaphores设置+++
对于orale10g:
# SEMMSL SEMMNS SEMOPM SEMMNI
kernel.sem=2010 257280 2010 128
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range=1024 65000
fs.file-max=65536
fs.file-max=65536
kernel.shmmax=4294967296
kernel.shmall=16777216
对于oracle11g
kernel.sem=2010 257280 2010 128
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range=1024 65000
fs.file-max=65536
kernel.shmmax=4294967296
kernel.shmall=16777216
kernel.shmmax这里设置为4G,这个参数可以根据实际的内存修改。
kernel.shmall单位是页面数,这里设置为16777216*4k为64G大小,可以根据实际修改
/proc/sys/kernel/shmall
This file contains the system-wide limit on the total number of pages of System V shared memory.
/proc/sys/kernel/shmmax
This file can be used to query and set the run time limit on the maximum (System V IPC) shared memory segment size that can
be created. Shared memory segments up to 1Gb are now supported in the kernel. This value defaults to SHMMAX.
/proc/sys/fs/file-max
This file defines a system-wide limit on the number of open files for all processes.
设置小了可能会报“out of file handles”
SEMMSL 内核参数用于控制每个信号集合的最大信号数
SEMMNS 内核参数用于控制系统范围内能使用了最大信号量数。
SEMOPM 每个semop调用所能操作的信号操作结构数组的最大大小
SEMMNI 内核参数用于控制整个系统中信号集的最大数量
SEMMSL The maximum semaphores per semaphore set.
SEMMNS A system-wide limit on the number of semaphores in all semaphore sets.
SEMOPM The maximum number of operations that may be specified in a semop(2) call.
SEMMNI A system-wide limit on the maximum number of semaphore identifiers.
如当oracle DB初始化参数文件中PROCESSES参数设置较大时,需要调整semaphores设置SEMMSL应该设置为服务器中各个实例中最大的PROCESSES参数+10,例如,当最大的PROCESSES参数为4000时,SEMMSL应设置为4010。
SEMMNS参数应设置为SEMMSL*SEMMNI,接上例SEMMSL为4010,SEMMNS参数应为(4010*128)=513280。
SEMOPM参数应设置与SEMMSL参数相同,接上例此处应设置为4010
shmmax指的是单个共享内存段的最大尺寸, 设置shmmax=1G,sga分配了1.2G,当启动实例的时候就分配 2 块共享内存给Oracle,一般情况下可以设置最大共享内存为物理内存的一半
sysctl -w kernel.shmmax=2147483648
# kernel parameter
运行:
/sbin/sysctl -p
使用参数马上生效
Rhel 5.3不需要下面这个步骤
可能Rhel3.X需要建/etc/profile.d/login.sh,内容:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -l unlimited
else
ulimit -u 16384 -n 65536
ulimit -l unlimited
fi
fi
Rhel5.X和Rhel4.X下需要:
在/etc/security/limits.conf加入
* hard nproc 16384
* soft nproc 4096
* hard nofile 65536
* soft nofile 8192
* hard memlock -1
* soft memlock -1
+建oracle用户环境+
groupadd -g 501 oinstall
groupadd -g 502 dba
useradd -m -c "Oracle software owner" -g oinstall -G oinstall,dba -u 501 oracle
mkdir /opt/oracle
mkdir /opt/oracle/products
oracle_version=10.2.0
mkdir /opt/oracle/products/$oracle_version
chown -R oracle:oinstall /opt/oracle
++.profile++
设置oracle用户环境,编辑/home/oracle/.bash_profile,添加如下内容:
对于10g或11g类似如下:
ORACLE_BASE=/opt/oracle
ORACLE_SID=oratest
ORACLE_HOME=$ORACLE_BASE/products/10.2
TNS_ADMIN=$ORACLE_HOME/network/admin
ORA_NLS10=$ORACLE_HOME/nls/data
NLS_DATE_FORMAT="YYYYMMDD HH24:MI:SS"
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/oracm/bin:$ORACLE_HOME/OPatch
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:$ORACLE_HOME/oracm/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
SQLPATH=$ORACLE_HOME/sqlplus/admin
export ORACLE_BASE ORACLE_HOME NLS_DATE_FORMAT ORA_NLS10 ORACLE_SID PATH LD_LIBRARY_PATH CLASSPATH TNS_ADMIN SQLPATH
# ORACLE_TERM=xterm; export ORACLE_TERM
NLS_LANG=AMERICAN_AMERICA.US7ASCII; export NLS_LANG
# set open file handler Rhel5.3 not need
#ulimit -n 65536 -u 16384
# alias
alias bdump="cd $ORACLE_BASE/admin/$ORACLE_SID/bdump"
alias udump="cd $ORACLE_BASE/admin/$ORACLE_SID/udump"
alias ohome="cd $ORACLE_HOME"
alias otail='tail -f $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log'
alias tf="tail -f "
alias sql='sqlplus'
alias sqln="sqlplus /nolog"
如果是oracle9i
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/products/9.2.0
export ORACLE_SID=oratest
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_TERM=xterm
export LD_ASSUME_KERNEL=2.4.1
export THREADS_FLAG=native
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
+安装+
cpio –idmv < lnx_920_disk1.cpio
cpio –idmv < lnx_920_disk2.cpio
cpio –idmv < lnx_920_disk3.cpio
bash ./runInstaller -ignoreSysPrereqs