# Step 1: checking memory, swap space, disk space
grep MemTotal /proc/meminfo
#MemTotal: 4043368 kB
# >512MB
grep SwapTotal /proc/meminfo
#SwapTotal: 7365760 kB
# >1GB
df /tmp
# >400MB
# Step 2: checking packages
uname -mi
# x86_64 x86_64
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \
binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs \
libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio
#For 10g R2 (64-bit) on RHEL 4 x86_64, the document Oracle Database Installation Guide 10g Release 2 (10.2)
for Linux x86-64 lists the following required package versions or higher:
# binutils-2.15.92.0.2-10.EL4
# compat-db-4.1.25-9
# control-center-2.8.0-12
# gcc-3.4.3-9.EL4
# gcc-c++-3.4.3-9.EL4
# glibc-2.3.4-2
# glibc-common-2.3.4-2
# gnome-libs-1.4.1.2.90-44.1
# libstdc++-3.4.3-9.EL4
# libstdc++-devel-3.4.3-9.EL4
# make-3.80-5
# pdksh-5.2.14-30
# sysstat-5.0.5-1
# xscreensaver-4.18-5.rhel4.2
yum -y install gcc gcc-c++ compat-db gnome-libs pdksh sysstat xscreensaver libXp-devel libXau-devel libXp glibc-devel glibc
# Step 3: checking the kernel parameters
#added the following lines to the /etc/sysctl.conf file and sysctl -p to use them immediately
#kernel.shmmax=2147483648 (for 4G RAM)
#kernel.sem=250 32000 100 128
#fs.file-max=65536
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
#kernel.shmmni = 4096
## semaphores: semmsl, semmns, semopm, semmni
#kernel.sem = 250 32000 100 128
#fs.file-max = 65536
#net.ipv4.ip_local_port_range = 1024 65000
#net.core.rmem_default=262144
#net.core.rmem_max=262144
#net.core.wmem_default=262144
#net.core.wmem_max=262144
# Step 4: user and dirs add
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
passwd oracle
mkdir -p /data/app/oracle
mkdir -p /data/oradata
chown -R oracle:oinstall /data/app/oracle /data/oradata
chmod -R 777 /data/oradata
# Setting Shell Limits for the Oracle User
# add following lines into /etc/security/limits.conf
oracle soft nofile 4096
oracle hard nofile 63536
# Step 5: ~oracle/.bash_profile
export ORACLE_BASE=/data/app/oracle
export ORACLE_SID=dledu
#export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
#export PATH=.:${PATH}:$ORACLE_HOME/bin
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
#export LANG=zh_CN.GBK
export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
#export LC_CTYPE=zh_CN.GB2312
#export LC_ALL=zh_CN
#umask 022
# Step 6: Install oracle
cpio -idvm<
# Step 7: Post-configuration
vi /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
dledu:/data/app/oracle/product/10.2.0/db_1:Y
cp oracled /etc/init.d/oracled
chkconfig add oracled
chkconfig oracled on
#X11Graphics...........
xhost local:oracle non-network local connections being added to access control list
#yum provides libXp.so.6
dbca
emctl start dbconsole
can not connect to xserver ":0.0"
su root
xhost +
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Red Hat Enterprise Linux 4.0
|
CentOS5.2下对应的软件包
|
binutils-2.15.92.0.2-13.EL4
|
binutils-2.17.50.0.6-6.el5
|
compat-db-4.1.25-9
|
compat-db-4.2.52-5.1
|
compat-libstdc++-296-2.96-132.7.2
|
compat-libstdc++-33-3.2.3-61
|
control-center-2.8.0-12
|
control-center-2.16.0-16.el5
|
gcc-3.4.3-22.1.EL4
|
gcc-4.1.2-42.el5
|
gcc-c++-3.4.3-22.1.EL44
|
gcc-c++-4.1.2-42.el5
|
glibc-2.3.4-2.9
|
glibc-2.5-24
|
glibc-common-2.3.4-2.9
|
glibc-common-2.5-24
|
gnome-libs-1.4.1.2.90-44.1
|
libgnome-2.16.0-6.el5
|
libstdc++-3.4.3-22.1
|
libstdc++-4.1.2-42.el5
|
libstdc++-devel-3.4.3-22.1
|
libstdc++-devel-4.1.2-42.el5
|
make-3.80-5
|
make-3.81-3.el5
|
pdksh-5.2.14-30
|
ksh-20060214-1.7
|
sysstat-5.0.5-1
|
sysstat-7.0.2-1.el5
|
xscreensaver-4.18-5.rhel4.2
|
gnome-screensaver-2.16.1-8.el5
|
setarch-1.6-1
|
setarch-2.0-1.1
|
|
libXp-1.0.0-8.1.el5
|
# rpm -q binutils compat-db compat-libstdc++-33 control-center \
gcc gcc-c++ glibc glibc-common libgnome libstdc++ \
libstdc++-devel make ksh sysstat gnome-screensaver setarch libXp
|
binutils-2.17.50.0.6-6.el5
compat-db-4.2.52-5.1
compat-libstdc++-33-3.2.3-61
control-center-2.16.0-16.el5
gcc-4.1.2-42.el5
gcc-c++-4.1.2-42.el5
glibc-2.5-24
glibc-common-2.5-24
libgnome-2.16.0-6.el5
libstdc++-4.1.2-42.el5
libstdc++-devel-4.1.2-42.el5
make-3.81-3.el5
ksh-20060214-1.7
sysstat-7.0.2-1.el5
gnome-screensaver-2.16.1-8.el5
setarch-2.0-1.1
libXp-1.0.0-8.1.el5
|
# vi /etc/sysctl.conf
... ...
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
|
# chkconfig /etc/sysctl.conf
|
# 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 /lib/security/pam_limits.so
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
|
# groupadd -g 501 oinstall
# groupadd -g 502 dba
|
# useradd -g oinstall -G dba -u 501 -d /oracle oracle
|
# chown -R oracle:oinstall /oracle
|
# su – oracle
$ pwd
/oracle
$ vi ./.profile
# !/usr/bin/bash
umask 022
ORACLE_BASE=/oracle/app
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin
export PATH
|
$ pwd
/oracle
$ mkdir app
$ mkdir data
|
$ ./runInstaller -ignoreSysPrereqs
|