查看: 2053|回复: 1

Install oracle 8.1.7.0.4 on Redhat Advanced server 2.1

[复制链接]
论坛徽章:
0
发表于 2003-7-22 11:51 | 显示全部楼层 |阅读模式
装了次 Oracle 8.1.7.0.4, 剧痛苦。把过程记下来,供大家参考。如有错误,望大虾门指正。


Installing Oracle 8.1.7.0.4 on RedHat Advanced Server 2.1
  by shengze, based on ......

This article is migrated from a topic found from WWW, it's url is ???

It was an awful experience. I hope the group that writes the database is different from the group that writes the installer, because the installer group sucks. Click through for the details.

Step 0 - Download and Unpack Oracle

Download two files from Oracle's site: linux81701.tar and glibc-2.1.3-stubs.tar.gz. Make sure they have the following MD5 checksums:

bb6cee85bd78c91cfd4d02224b99adc5 linux81701.tar
7afc4a65f7d5c456e5a323b453ece2c1 glibc-2.1.3-stubs.tar.gz

Unpack Oracle into /opt/oracle:

cd /opt/oracle/
tar xf linux81701.tar

Do not unpack the glibc stubs file yet.

Step 1 - Install Prerequisites

Since Advanced Server comes with glibc 2.2 and Oracle needs glibc 2.1, you'll need to download compat versions of the various libraries:

up2date -u compat-glibc
up2date -u compat-egcs
up2date -u compat-libstdc++
up2date -u compat-libs


  or they can be found from http://rpm.pbone.net/index.php3/stat/14/idka/56/datan/2002-09-29 seperately.


Go to http://www.blackdown.org/ to download jdk118_v3-glibc-2.1.3.tar.bz2, install it to directory /usr/local/java


Step 2 - Setup Users and Directory Permissions

Create the Oracle user and groups:

groupadd dba
groupadd oracle
groupadd oinstall
useradd oracle -g oinstall -G dba,oracle

Create the directory where Oracle will be installed and give it appropriate permissions:

mkdir /usr/oracle
chown oracle.dba /usr/oracle


Step 3 - Setup Environment Variables

Append the following lines to the oracle user's .profile:

export LD_ASSUME_KERNEL=2.2.5
source /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
umask 022

export ORACLE_BASE=/usr/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/ctx/lib:/usr/bin:/bin:/usr/local/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_SID=dev



Step 4 - Symlink to Compat GCC

We need to symlink out to the correct GCC to make Oracle uses it when it compiles anything:

su - oracle
cd $ORACLE_HOME
mkdir bin
cd bin
ln -s /usr/bin/i386-glibc21-linux-gcc cc
ln -s /usr/bin/i386-glibc21-linux-gcc gcc


Step 5 - Install Oracle

Go ahead and install Oracle as user oracle with the default settings. If any errors occur during installation be sure to hit Ignore and continue with the installation:

su - oracle
cd /opt/oracle/Disk1
./runInstaller

Near the end of the installation, the installer will prompt you to run $ORACLE_HOME/root.sh as root. This file has two errors in it, so before you run it make the following changes:

Change line 98 from:
SED=/usr/local/bin/sed
to:
SED=/bin/sed
[thanks to 'lex' for pointing this out]

Change line 102 from:
RMF=/bin/rm -f
to:
RMF="/bin/rm -f"

Change line 156 from:
RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}`
to:
RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`

At the end of the installation, the installer will try to run three configuration wizards: the Net8 Configuration Assistant, the Oracle Database Configuration Assistant, and the Apache Web Server Configuration Assistant. You should stop all of them. You will run them later. After this your installer is done and you should exit it.


Step 6 - Install Oracle

update default jre with the one from http://www.blackdown.com.


$cd $ORACLE_HOME/jre
$mv 1.1.8 1.1.8.org
$link -s /usr/local/java 1.1.8
$cd 1.1.8/lib
$cp classes.zip rt.jar



Step 7 - Install Oracle patch 8.1.7.0.4

Install patch as instructed in manuals.



Step 8 - Install GLIBC Stubs

Now, you should install the glibc stubs (still as oracle):

su - oracle
cd $ORACLE_HOME
tar xfz /opt/oracle/glibc-2.1.3-stubs.tar.gz
./setup_stubs.sh
cd bin
relink all


Step 7 - Run the Various Assistants

Now, you can run the Net8 Configuration Assistant and the Database Configuration Assistant

su - oracle
$ORACLE_HOME/bin/netasst
$ORACLE_HOME/bin/dbassist


   (I experienced a segment error when running $ORACLE_HOME/bin/netca)


Step 8 - Create a Shutdown/Startup Service

Create the file /etc/rc.d/init.d/oracle with the following contents:

#!/bin/sh
#
# Startup script for Oracle
#
# chkconfig: 345 79 11
# description: Oracle.
# processname: oracle
# pidfile: /var/run/oracle.pid
#
# Source function library.
. /etc/rc.d/init.d/functions

ORACLE_HOME=/usr/oracle/product/8.1.7
ORACLE_USER=oracle

# See how we were called.
case "$1" in
  start)
    echo -n "Starting Oracle Database Server: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/bin/dbstart
    success "Starting Oracle Database Server: "
    echo
    echo -n "Starting Oracle TNS Listener: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/bin/lsnrctl start >> /dev/null
    success "Starting Oracle TNS Listener: "
    echo
    echo -n "Starting Oracle HTTP Server: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/Apache/Apache/bin/apachectl start
    success "Starting Oracle HTTP Server: "
    echo
    touch /var/lock/subsys/oracle
    ;;
  stop)
    echo -n "Stopping Oracle Database Server: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/bin/dbshut
    success "Stopping Oracle Database Server: "
    echo
    echo -n "Stopping Oracle TNS Listener: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/bin/lsnrctl stop >> /dev/null
    success "Stopping Oracle TNS Listener: "
    echo
    echo -n "Stopping Oracle HTTP Server: "
    daemon --user=$ORACLE_USER $ORACLE_HOME/Apache/Apache/bin/apachectl stop
    success "Stopping Oracle HTTP Server: "
    echo
    rm -f /var/lock/subsys/oracle
    rm -f /var/run/oracle.pid
    ;;
  restart)
    $0 stop
    sleep 2
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit 0


Set the appropriate owner and mode:

chown root.root /etc/rc.d/init.d/oracle
chmod 0755 /etc/rc.d/init.d/oracle


Now you can start Oracle by typing:
service oracle start
You can stop Oracle by typing:
service oracle stop

Note that only the databases in /etc/oratab with the last field set to Y will start and stop automatically. The following line, for example, will automatically start and stop the dev database:
dev:/usr/oracle/product/8.1.7:Y

Step 9 - Enjoy (or not)

You're done. Congrats.
论坛徽章:
3
授权会员
日期:2005-12-12 10:53:09会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41
发表于 2004-2-16 10:55 | 显示全部楼层
very good ! I got a great help from you!
But I have some wonders :
1) in step 7,is default jre must be replaced with ibm's jre? I meet some trouble when using dbassist and netca,because in some case the interface based on java doesn't show ! can you explain the reason in details?

2) Usually,I used to run GLIBC Stubs first then apply pathches. After applying patches,I'll run GLIBC Stubs Again.
  Can you  point the diference between the two method? which is better?

btw:
1) Your shell scripts that automatically startup and shutdown oralce   in the way of service is very good.
2) in step 5, you said "If any errors occur during installation be sure to hit Ignore and continue with the installation“ ,could you list the errors occuring that you met ?

thank you for your contribution .

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表