红联Linux门户
Linux帮助

Oracle 10gR2 + RedHat Enterprise Linux AS4 安装

发布时间:2006-06-14 18:04:37来源:红联作者:yo
作者:boean

(1)安装linux ,所由服务都不选择,只是选择安装开发工具,不要安装防火墙,不然有的端口没打开会提示
连接超时.
(2)打开终端,执行如下命令,检查安装包,没有的都要安装(一般在dis2 和dis3上)
rpm -q make gcc glibc compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++
-devel openmotif21 setarch libaio
(3)创建 Oracle 组和用户帐户
例如:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
设置 oracle 帐户的口令:
passwd oracle
(4)创建目录
例如:
# mkdir -p /oracle
# chown -R oracle:oinstall /oracle
# chmod -R 775 /oracle
(5)配置 Linux 内核参数,修改后不用重启动更新: /sbin/sysctl -p
第一种:打开/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=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
6。检查需要安装一下包
make-3.79.1
gcc-3.2.3-34
glibc-2.3.2-95.20
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
openmotif21-2.1.30-8
setarch-1.3-1
# rpm -qa | grep make gcc glibc compat openmotif21 setarch

硬件需求
内存和交换空间
Available RAM Swap Space Required
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM
磁盘空间
1。5G (不包括数据库)

检查硬件
内存
# grep MemTotal /proc/meminfo
交换空间
# grep SwapTotal /proc/meminfo
磁盘空间
# df -ah

(7)oracle 用户的环境变量
以 oracle 身份登录,并通过在 .bash_profile 或 .profile(bash 或 ksh)中添加以下行,将
ORACLE_BASE 添加到登录配置文件(直接gedit /home/oracle/.bash_profile)
增加下列内容:
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
执行
source /home/oracle/.bash_profile
如果远程安装,需要启动cygwin
执行
# startx
然后在打开的窗口里输入
# xhost +
然后在oracle安装的机器上运行
# export DISPLAY=192.168.1.170:0.0
(8)解压缩oracle 10g安装盘,然后新建终端,运行 /runInstaller (注意大小写)
复制到/work/目录,并解压
# unzip 10201_database_linux32.zip
# cd database
# ./runInstaller

安装过程中,
选择高级安装
在选择安装类型中,选择定制
安装过程中需要以root身份运行
/oracle/oraInventory/orainstRoot.sh
/oracle/10.2.0/db_1/root.sh
安装完毕后。
需要运行dbca来创建数据库
# dbca
创建数据库


(9)创建实例,起动数据库
(10)让oracle 跟随linux 一起启动.
root 登录,在 /etc/rc.d/init.d 下创建名为dbora,编辑增加以下内容
=================================================

#!/bin/bash
#参考http://staff.in2.hr/denis/oracle/10g1install_fedora3_en.html#n4_4
# chkconfig: 0356 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS
#
#
# match these values to your environment:
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_USER=oracle
# see how we are called:
case $1 in
start)
su - "$ORACLE_USER" -c "$ORACLE_HOME/bin/dbstart"
su - "$ORACLE_USER" -c "$ORACLE_HOME/bin/emctl start dbconsole"
;;
stop)
su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac

==========================
打开终端执行:
chown oracle.oinstall /etc/rc.d/init.d/dbora
chmod 755 /etc/rc.d/init.d/dbora
使用chkconfig 设置运行权限
chkconfig dbora reset
检查
chkconfig --list dbora
结果如下:
ora10 0:off 1:off 2:off 3:on 4:off 5:on 6:off
注意:当系统不在 runlevels 3 and 5时,使用
service dbora start 启动服务.
service dbora stop 停止服务.
(11)修改$ORACLE_HOME/bin/dbstart
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
如果没有ASM(自动存储),就把那一节内容删除,ASM要在加载实例前,先加载.
(12)重新启动计算机 ,就可以了,启动会比较慢,因为要自动启动em,database,listener,agent
常用手动控制数据库命令
打开em
emctl start dbconsole
关闭em
emctl stop dbconsole

启动listener
lsnrctl start <监听名>(默认是LISTENER,可省略)
关闭
lsnrctl stop

启动emagent
emctl start agent
关闭
emctl stop agent

启动实例
sqlplus /nolog
conn / as sysdba
startup
关闭
shutdown immediate

测试数据库是否通
tnsping <本地服务名>

========================================
常见问题:
网页界面上的按钮出现“口口”的乱码
解决方案:
1.停止服务,emctl stop dbconsole;
2.把相关目录(RHEL4里面是/etc/java/)下的font.properties用
font.properties.zh_CN.Redhat8.0替换(或font.properties.zh,只要是中文简体就可以。);
3.删除
$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs中的gif文件
;
4.重起服务(最好是重启服务器) emctl start dbconsole;

/etc/oratab的内容
orcl:/oracle/10.2.0/db_1:Y
=====================================================
以下的 J2EE 应用程序已经配置, 并且可用下面列出的 URL 来访问。
iSQL*Plus URL:
http://database:5560/isqlplus
iSQL*Plus DBA URL:
http://database:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://database:1158/em
\==========================================



常用linux命令
df -h
ps -A
top
free
cat /proc/meminfo
uname
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
hostname
文章评论

共有 97 条评论

  1. 24.190.200.* 于 2007-09-05 06:11:31发表:

    http://emeraldring.fora.pl/
    http://emeraldring.fora.pl/
    http://emeraldring.fora.pl/ - emerald cut wedding ring

  2. 221.232.159.* 于 2007-09-03 22:25:12发表:

    child defense fund
    child defense fund
    child defense fund - http://fund.freewebpages.org/child-defense-fund/index.html
    free fund raising idea
    free fund raising idea
    free fund raising idea - http://fund.freewebpages.org/free-fund-raising-idea/index.html
    fund raising company
    fund raising company
    fund raising company - http://fund.freewebpages.org/fund-raising-company/index.html

  3. 61.241.146.* 于 2007-08-31 12:30:38发表:

    Hi, nice very nice page..!
    fund
    fund raising counselor organization - http://fund.freewebpages.org/memorial-scholarship-fund/index.html
    state insurance fund
    mutual fund company - http://fund.freewebpages.org/abb-fund/index.html
    state insurance fund

    Good luck !
    PS: do you listen Linkin Park ?

  4. 194.104.99.* 于 2007-08-30 05:37:15发表:

    Hi, nice very nice page..!
    fund novel raising - http://fund.freewebpages.org/fund-raising-event/index.html
    hedge funds
    candy fund raising
    growth fund of america
    fund raising company

    Good luck !
    PS: do you listen Linkin Park ?

  5. 0.0.0.* 于 2007-08-29 01:09:31发表:

    Hi, nice very nice page..!
    money market mutual funds - http://www.volny.cz/moneyrate/money-market-rate/
    money market
    money market interest rate
    money market fund - http://volny.cz/highestmoney/cnn-money-market-stock/
    money market funds

    Good luck !
    PS: do you listen Linkin Park ?

  6. 0.0.0.* 于 2007-08-27 09:51:04发表:

    Hi, nice very nice page..!
    money market fund
    money market account rate
    money market interest rate
    money market rate - http://volny.cz/highestmoney/highest-money-market-rate/
    high yield money market

    Good luck !
    PS: do you listen Linkin Park ?

  7. 221.232.159.* 于 2007-08-25 12:49:11发表:

    Hi, nice very nice page..!
    money market mutual funds
    high yield money market
    vanguard money market funds - http://www.volny.cz/moneymarket1/money-market/
    best money market account - http://www.volny.cz/moneymarket/money-market-interest-rate
    best money market account

    Good luck !
    PS: do you listen Linkin Park ?

  8. 58.251.50.* 于 2007-08-23 22:22:32发表:

    Hi, nice very nice page..!
    money banking and financial market
    high yield money market account
    ford money market - http://www.volny.cz/bestmoney/make-money-in-stock-market/
    high yield money market account
    money market fund

    Good luck !
    PS: do you listen Linkin Park ?

  9. 219.141.223.* 于 2007-08-14 08:39:46发表:

    good work !
    chandelier lamp shades
    chandelier lamp shades
    chandelier lamp shades - www.desklamp1.fora.pl


    buy viagra online
    buy viagra online
    buy viagra online - www.buyviagraonlinex.fora.pl

    .
    norwegian pearl
    norwegian pearl
    norwegian pearl - http://volny.cz/norwegianpearl
    blackberry pearl white
    blackberry pearl white
    blackberry pearl white - http://volny.cz/blackberrypearlwhite
    pink pearls
    pink pearls
    pink pearls - http://volny.cz/pinkpearls
    blackberry pearl review
    blackberry pearl review
    blackberry pearl review - http://volny.cz/blackberrypearlrev
    pearl white
    pearl white
    pearl white - http://volny.cz/pearlwhite
    good luck

  10. 218.22.112.* 于 2007-08-09 06:31:35发表:

    Hi, nice very nice page..!
    buy pearl earring buy pearl earring buy pearl earring - http://volny.cz/buypearlearring
    356 porsche sale 356 porsche sale 356 porsche sale - www.volny.cz/porsche356
    lexus is250 review lexus is250 review lexus is250 review - www.volny.cz/lexus250/
    944 porsche 944 porsche 944 porsche - www.volny.cz/porsche944
    buy a pearl necklacebuy a pearl necklace buy a pearl necklace - http://volny.cz/buypearlnecklace

    Good luck !
    PS: do you listen Linkin Park ?

  11. 124.128.14.* 于 2007-08-07 08:50:53发表:

    desk lamp
    desk lamp - www.halogendesklamp.freehostia.com/desk-lamp/

    lamp shades
    lamp shades - www.halogendesklamp.freehostia.com/lamp-shades/

    office desk lamp
    office desk lamp - www.halogendesklamp.freehostia.com/office-desk-lamp/

  12. 217.141.105.* 于 2007-08-05 08:58:00发表:

    nice site... look on my site

    http://www.desklamp.fora.pl - desk lamp
    http://www.lampshades.fora.pl - lamp shades

  13. 217.141.249.* 于 2007-08-03 15:04:50发表:

    thnx... nice site
    and i wan't see my:
    http://www.tablelamp.fora.pl/
    http://www.tablelamp.fora.pl/
    http://www.tablelamp.fora.pl/ - table lamp

  14. 122.196.219.* 于 2007-08-02 01:44:52发表:

    extreme sex comics http://cartoonfox.150m.com/extreme_sex_comics.html extreme sex comics extreme sex comics

    extreme bdsm toons http://cartoonfox.150m.com/extreme_bdsm_toons.html extreme bdsm toons extreme bdsm toons

    extreme sex comics drawing planet http://cartoonfox.150m.com/extreme_sex_comics_drawing_planet.html extreme sex comics drawing planet extreme sex comics drawing planet

    extreme fuck comics http://cartoonfox.150m.com/extreme_fuck_comics.html extreme fuck comics extreme fuck comics

    bdsm extreme comic http://cartoonfox.150m.com/bdsm_extreme_comic.html bdsm extreme comic bdsm extreme comic

  15. 209.213.199.* 于 2007-07-31 09:02:44发表:

    gmc trucks here www.gmctruck.fora.pl
    gmc from america www.gmctruck.fora.pl
    real gmc www.gmctruck.fora.pl


    and www.emeraldring.fora.pl rings

  16. 189.7.97.* 于 2007-07-30 12:53:24发表:

    emerald rings and gold rings www.emeraldring.fora.pl

  17. 90.225.74.* 于 2007-07-19 16:50:15发表:

    star war porn cartoon http://adultcomics19jul.tripod.com/star_war_porn_cartoon.html star war porn cartoon star war porn cartoon
    drawn cartoon porn http://adultcomics19jul.tripod.com/drawn_cartoon_porn.html drawn cartoon porn drawn cartoon porn
    dragonball z cartoon porn http://adultcomics19jul.tripod.com/dragonball_z_cartoon_porn.html dragonball z cartoon porn dragonball z cartoon porn
    cartoon violent porn http://adultcomics19jul.tripod.com/cartoon_violent_porn.html cartoon violent porn cartoon violent porn
    cartoon porn video http://adultcomics19jul.tripod.com/cartoon_porn_video.html cartoon porn video cartoon porn video

  18. 190.53.23.* 于 2007-07-17 11:02:25发表:

    http://aeb617ecf44fda30bff344d9a07ce7d7-t.xkktxb.org aeb617ecf44fda30bff344d9a07ce7d7 http://aeb617ecf44fda30bff344d9a07ce7d7-b1.xkktxb.org aeb617ecf44fda30bff344d9a07ce7d7 http://aeb617ecf44fda30bff344d9a07ce7d7-b3.xkktxb.org 8d1f2bfe3cbc5359328d95464cab8b7c

  19. 0.0.0.* 于 2007-07-16 09:53:05发表:

    violent comics http://adultcomics8jul.tripod.com/violent_comics.html violent comics violent comics

    brutal comics http://adultcomics8jul.tripod.com/brutal_comics.html brutal comics brutal comics

    uncensored comics http://adultcomics8jul.tripod.com/uncensored_comics.html uncensored comics uncensored comics

    bondage comics http://adultcomics8jul.tripod.com/bondage_comics.html bondage comics bondage comics

    spanking comics http://adultcomics8jul.tripod.com/spanking_comics.html spanking comics spanking comics