[edgen@rhel54 ~]$ su
口令:
[root@rhel54 edgen]# su
[root@rhel54 edgen]# cd /
[root@rhel54 /]# grep MemTotal /proc/meminfo
MemTotal: 1909500 kB
[root@rhel54 /]# grep SwapTotal /proc/meminfo
SwapTotal: 4192956 kB
[root@rhel54 /]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 351G 3.2G 330G 1% /
/dev/sda5 97G 188M 92G 1% /data
/dev/sda1 99M 14M 81M 14% /boot
tmpfs 933M 0 933M 0% /dev/shm
[root@rhel54 /]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
package openmotif is not installed
setarch-2.0-1.1
package compat-db is not installed
[root@rhel54 /]# mkdir /mnt/cdrom
[root@rhel54 /]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@rhel54 /]# cd /mnt/cdrom/
[root@rhel54 cdrom]# cd Server/
[root@rhel54 Server]# ll | grep openmotif
-r--r--r-- 341 root root 1377121 2007-01-18 openmotif22-2.2.3-18.i386.rpm
-r--r--r-- 311 root root 1607576 2008-12-03 openmotif-2.3.1-2.el5.i386.rpm
-r--r--r-- 311 root root 3099372 2008-12-03 openmotif-devel-2.3.1-2.el5.i386.rpm
[root@rhel54 Server]# rpm -ivh openmotif-2.3.1-2.el5.i386.rpm
warning: openmotif-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
libXp.so.6 is needed by openmotif-2.3.1-2.el5.i386
[root@rhel54 Server]# ll | grep libXp
-r--r--r-- 341 root root 22996 2007-07-26 libXp-1.0.0-8.1.el5.i386.rpm
-r--r--r-- 327 root root 15262 2007-07-26 libXp-devel-1.0.0-8.1.el5.i386.rpm
-r--r--r-- 342 root root 46205 2007-01-19 libXpm-3.5.5-3.i386.rpm
-r--r--r-- 327 root root 31567 2007-01-19 libXpm-devel-3.5.5-3.i386.rpm
[root@rhel54 Server]# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libXp ########################################### [100%]
[root@rhel54 Server]# rpm -ivh libXp-devel-1.0.0-8.1.el5.i386.rpm
warning: libXp-devel-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libXp-devel ########################################### [100%]
[root@rhel54 Server]# rpm -ivh openmotif-2.3.1-2.el5.i386.rpm
warning: openmotif-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:openmotif ########################################### [100%]
[root@rhel54 Server]# rpm -ivh openmotif-devel-2.3.1-2.el5.i386.rpm
warning: openmotif-devel-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:openmotif-devel ########################################### [100%]
[root@rhel54 Server]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
openmotif-2.3.1-2.el5
setarch-2.0-1.1
package compat-db is not installed
[root@rhel54 Server]# pwd
/mnt/cdrom/Server
[root@rhel54 Server]# ll | grep compat-db
-r--r--r-- 341 root root 1756815 2007-01-19 compat-db-4.2.52-5.1.i386.rpm
[root@rhel54 Server]# rpm -ivh compat-db-4.2.52-5.1.i386.rpm
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:compat-db ########################################### [100%]
[root@rhel54 Server]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
openmotif-2.3.1-2.el5
setarch-2.0-1.1
compat-db-4.2.52-5.1
/
[root@rhel54 Server]# groupadd oinstall
bash: groupadd: command not found
[root@rhel54 Server]# exit
exit
[root@rhel54 edgen]# su - root
[root@rhel54 ~]# groupadd oinstall
[root@rhel54 ~]# groupadd dba
[root@rhel54 ~]# useradd -m -g oinstall -G dba oracle
[root@rhel54 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) context=user_u:system_r:unconfined_t
[root@rhel54 ~]# passwd oracle
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rhel54 ~]# mkdir -p /app/oracle
[root@rhel54 ~]# mkdir /data/oracle
[root@rhel54 ~]# chown -R oracle:oinstall /app/oracle/ /data/oracle/
[root@rhel54 ~]# chmod -R 755 /app/oracle/ /data/oracle/
[root@rhel54 ~]# vi ~oracle/.bash_profile
[root@rhel54 ~]# cat ~oracle/.bash_profile
# .bash_profile
...
...
TMP=/tmp;
export TMP
TMPDIR=$TMP;
export TMPDIR
ORACLE_BASE=/app/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
export ORACLE_HOME
ORACLE_SID=orcl;
export ORACLE_SID
ORACLE_TERM=xterm;
export ORACLE_TERM
PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH;
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
unset USERNAME
/
[root@rhel54 ~]# vi /etc/sysctl.conf
[root@rhel54 ~]# sysctl -p
...
...
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
[root@rhel54 ~]# vi /etc/security/limits.conf
[root@rhel54 ~]# cat /etc/security/limits.conf | grep oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@rhel54 ~]# vi /etc/pam.d/login
[root@rhel54 ~]# cat /etc/pam.d/login | grep pam_limits.so
session required /lib/security/pam_limits.so
[root@rhel54 ~]# vi /etc/profile
[root@rhel54 ~]# cat /etc/profile
# /etc/profile
...
...
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
[root@rhel54 ~]# vi /etc/csh.login
[root@rhel54 ~]# cat /etc/csh.login
# /etc/csh.login
...
...
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
/
[root@rhel54 ~]# vi /etc/redhat-release
[root@rhel54 ~]# cat /etc/redhat-release
#Red Hat Enterprise Linux Server release 5.4 (Tikanga)
redhat4
[root@rhel54 ~]# cd /opt/tools
[root@rhel54 tools]# ll | grep database
-rw-rw-r-- 1 edgen edgen 668734007 12-31 17:43 10201_database_linux32.zip
[root@rhel54 tools]# unzip 10201_database_linux32.zip
[root@rhel54 tools]# ll | grep database
-rw-rw-r-- 1 edgen edgen 668734007 12-31 17:43 10201_database_linux32.zip
drwxr-xr-x 6 root root 4096 2005-07-03 database
[root@rhel54 tools]# chmod -R 775 /opt/tools/database
[root@rhel54 tools]# reboot
/
[edgen@rhel54 ~]$ su - oracle
口令:
[oracle@rhel54 ~]$ unset LANG
[oracle@rhel54 ~]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
[oracle@rhel54 ~]$ cd /opt/tools/database/
[oracle@rhel54 database]$ ll
total 52
drwxrwxr-x 9 root root 4096 Jul 3 2005 doc
drwxrwxr-x 5 root root 4096 Jul 3 2005 install
drwxrwxr-x 2 root root 4096 Jul 3 2005 response
-rwxrwxr-x 1 root root 1327 Jul 3 2005 runInstaller
drwxrwxr-x 9 root root 4096 Jul 3 2005 stage
-rwxrwxr-x 1 root root 5213 Jul 3 2005 welcome.html
[oracle@rhel54 database]$ ./runInstaller
[edgen@rhel54 ~]$ su - root
口令:
[root@rhel54 ~]# sh /app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /app/oracle/oraInventory to 770.
Changing groupname of /app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@rhel54 ~]# sh /app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /app/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@rhel54 ~]# cat /etc/oratab
orcl:/app/oracle/product/10.2.0/db_1:N
[root@rhel54 ~]# exit
logout
/
[edgen@rhel54 ~]$ su - root
口令:
[root@rhel54 ~]# vi /etc/redhat-release
[root@rhel54 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[root@rhel54 ~]# reboot