顯示具有 9i 標籤的文章。 顯示所有文章
顯示具有 9i 標籤的文章。 顯示所有文章

星期四, 9月 29, 2016

FW: 如何在Redhat Linux 5 上面安裝Oracle 9i Database


Oracle 9.2.0.4 real installation guide for RHEL-5 64-BIT
1. Make sure Java libraries are up to date.. (sysad side..)

2. Do not start installation from the 9204 base installation- Oracle Universal Installer has problem

2.1 Install first the OUI "only" from the 9206 patchset (p3948480_9206_Linux-x86-64.zip)
using the Oracle_Home youve just decided

2.2 In ../Disk1/install/oraparam.ini edit the Linux value under [Certified Versions]
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-
* value must include redhat-5 inorder to suppress the error message for OS version incompat.

2.3 After completion of OUI install, edit again ../product/9204/oui/oraparam.ini as instructed
in step 2.2

2.4 Now install the 9204 base using the OUI from 9206. Run ../product/9204/oui/runInstaller BUT
this time, select the "products.jar" from 9204 base installation set.
(ex: /u01/app/oracle/Disk1/stage/products.jar)

2.5 From here u should be able to install the SOFTWARE ONLY option. DO NOT create a database yet.
 
3. Patch the 9204 base with the 9207 patchset (p4163445_92070_Linux-x86-64.zip)

3.1 After decompressing contents, repeat step 2.2 again to suppress OS version incompat.

3.2 Now proceed with the patch application
 
4. You can now create a database using the "dbca" utility.

-------
Real Tests
ref:
Please Ref : http://road-to-ocm.blogspot.tw/2012/07/oracle-9204-real-installation-guide-for.html
and
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/pdf/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/Red_Hat_Enterprise_Linux-5-Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases-en-US.pdf


vi /etc/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-398.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-398.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet elevator=deadline
        initrd /initrd-2.6.18-398.el5.img


Tuning the Page Cache
echo "vm.pagecache=40" >> /etc/sysctl.conf
echo "vm.min_free_kbytes=1024" >> /etc/sysctl.conf
echo "vm.swappiness=10" >> /etc/sysctl.conf
echo "kernel.shmmni=4096" >> /etc/sysctl.conf
echo "kernel.shmall=2097152" >> /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max=65536" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=262144" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=1024 65000" >> /etc/sysctl.conf

groupadd dba -g 501
mkdir -p /home/oracle
mkdir -p /u01
mkdir -p /u02
useradd -c "Oracle Software Owner" -g dba -u 502 -m -d /home/oracle -s /bin/bash oracle
chown -R oracle:dba /oracle /u01 
chmod -R 755 /u01

vi /home/oracle/.bash_profile

ORACLE_BASE=/u01; export ORACLE_BASE
ORACLE_HOME=/u01/db920 ;export ORACLE_HOME
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
ORACLE_TERM=xterm ;export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin; export PATH
ORACLE_SID=orcl; export ORACLE_SID

#export LD_ASSUME_KERNEL=2.4.19
umask 022

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib64:/usr/local/lib:/usr/bin; export LD_LIBRARY_PATH
unset USERNAME

vi /etc/security/limits.conf
oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536

-Add or edit the following line in the /etc/pam.d/login file            
session     required     pam_limits.so 

-Add the following lines to /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

[root@rhel5 install]# mount /dev/cdrom /mnt

[root@rhel5 install]# head -n1 /mnt/.discinfo
1409145026.642170

vi /etc/yum.repos.d/rhel5.repo
[rhel5-Server] 
mediaid=1409145026.642170
name=RHEL5-Server
baseurl=file:///mnt/Server
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
enabled=1 
gpgcheck=1

rpm -qa |egrep 'binutils|compat-db|compat-libstdc++|control-center|gcc|glibc|glibc-common|glibc-devel|ksh|libaio|libgcc|libgnome|libgnomeui|libgomp|libstdc++|libstdc++-devel|libXp|make|sysstat'
|sort

yum install -y binutilsbinutils
yum install -y compat-db
yum install -y compat-libstdc++-33
yum install -y control-center
yum install -y gcc
yum install -y glibc
yum install -y glibc-common
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libgcc
yum install -y libgnome

yum install -y libgnomeui
yum install -y libgomp
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libXp
yum install -y make
yum install -y sysstat

另外需安裝 
libXp-1.0.0-8.i386.rpm  (java plugin required)
sysstat-7.0.2-1.el5.i386.rpm

xhost +

vi /u01/source/Disk1/install/oraparam.ini
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8

su - oracle
/u01/source/Disk1/runInstaller  --> Install OUI only

After completion of OUI install, edit again /u01/db920/oui/oraparam.ini as instructed
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8


cd /u01/source/Oracle_9i_R2_92040_Database_Linux_x86_64bit
gunzip amd64_db_9204_Disk1.cpio.gz
gunzip amd64_db_9204_Disk2.cpio.gz
gunzip amd64_db_9204_Disk3.cpio.gz

cpio -idcmv < amd64_db_9204_Disk1.cpio
cpio -idcmv < amd64_db_9204_Disk2.cpio
cpio -idcmv < amd64_db_9204_Disk3.cpio

Now install the 9204 base using the OUI from 9206. Run /u01/db920/oui/bin/runInstaller BUT
this time, select the "products.jar" from 9204 base installation set. 
(ex: /u01/source/Oracle_9i_R2_92040_Database_Linux_x86_64bit/Disk1/stage/products.jar)

From here u should be able to install the SOFTWARE ONLY option. DO NOT create a database yet.

#do the following and choose to continue if prompt error
-bash-3.2$  mkdir -p /u01/db920/Apache/Apache/conf
-bash-3.2$ cp /u01/db920/oracle.apache.apache/conf/oracle_apache.conf /u01/db920/Apache/Apache/conf/.
-bash-3.2$ cp /u01/db920/oracle.apache.apache/ports.ini /u01/db920/Apache/Apache/ports.ini
-bash-3.2$ echo "s_jservPort = 7775" >> /u01/db920/oracle.apache.apache/ports.ini 
-bash-3.2$ cp /u01/db920/oracle.apache.apache/ports.ini /u01/db920/oracle.apache/.


Patch the 9204 base with the 9208 patchset

After decompressing contents, repeat edit /u01/source/Disk1/install/oraparam.ini again to suppress OS version incompat.
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8

You can now create a database using the "dbca" utility

星期二, 5月 07, 2013

Oracle 各帳號用途清查 for 9i/10g/11g


以下為Oracle原廠文件所提到的帳號清單, locked 代表一般安裝好的資料庫中,是停用的。

account
Usage
Account Status
ANONYMOUS
Oracle XML DB
Expired and locked
CTXSYS
Oracle Text
Expired and locked
DBSNMP
Oracle Enterprise Manager
Open
EXFSYS
Rules Manager and Expression Filter
Expired and locked
LBACSYS
Oracle Label Security
Expired and locked
MDSYS
Oracle Spatial and Oracle Multimedia Locator administrator account
Expired and locked
MGMT_VIEW
Oracle Enterprise Manager 
Open
OLAPSYS
OLAP Catalog 
Expired and locked
ORDDATA
Oracle Multimedia DICOM data model
Expired and locked
OWBSYS
Oracle Warehouse Builder repository
Expired and locked
ORDPLUGINS
Oracle Multimedia
Expired and locked
ORDSYS
Oracle Multimedia administrator
Expired and locked
OUTLN
Plan stability account
Expired and locked
SI_INFORMTN_SCHEMA
Views for the SQL/MM Still Image Standard
Expired and locked
SYSMAN
Oracle Enterprise Manager
Open
TSMSYS
transparent session migration (TSM)
Expired and locked
WK_TEST
Oracle Ultra Search
Expired and locked
WKSYS
Ultra Search database super-user
Expired and locked
WKPROXY
Oracle9i Application Server Ultra Search
Expired and locked
WMSYS
Oracle XML DB data and metadata
Expired and locked
BI
Default Sample Schema
Expired and locked
HR
Default Sample Schema
Expired and locked
OE
Default Sample Schema
Expired and locked
PM
Default Sample Schema
Expired and locked
IX
Default Sample Schema
Expired and locked
SH
Default Sample Schema
Expired and locked
SYSTEM
資料庫管理帳號SYSPOER
Open
SYS
資料庫管理帳號SYSDBA
Open


查詢Oracle帳號方法如下:
As Oracle User
sqlplus "/ as sysdba"

SQL>

col username for a25
col account_status for a8
col default_tablespace for a10
select username , account_status , created , default_tablespace from dba_users where account_status not like '%LOCKED%' order by username;


USERNAME                  ACCOUNT_ CREATED            DEFAULT_TA
------------------------- -------- ------------------ ----------
DBSNMP                    OPEN     04-FEB-10          SYSAUX  => 資料庫Oracle OEM (內部使用)
HR                        OPEN     22-APR-11          USERS
RPT                       OPEN     25-JUL-12          USERS
SYS                       OPEN     04-FEB-10          SYSTEM    => 資料庫管理帳號 SYSDBA
SYSMAN                    OPEN     04-FEB-10          SYSAUX   => 資料庫管理帳號 SYSOPER
SYSTEM                    OPEN     04-FEB-10          SYSTEM
TEST                      OPEN     20-JUL-11          USERS

7 rows selected.

排除預設帳號, 黃字部分為有使用的三個Oracle帳號:

HR, RPT, TEST

若確定TEST帳號沒在使用, 可以將其LOCKED
SQL>  
alter user test account lock;

User altered.

查詢TEST帳號, 可以發現TEST帳號已經停止使用(LOCKED)
col username for a25
col account_status for a8
col default_tablespace for a10
select username , account_status , created , default_tablespace from dba_users where username='TEST';


LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...