曙海教育集团论坛Linux专区Linux系统开发 → linux系统数据库开发环境搭建


  共有5886人关注过本帖树形打印

主题:linux系统数据库开发环境搭建

美女呀,离线,留言给我吧!
wangxinxin
  1楼 个性首页 | 博客 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:青蜂侠 帖子:1393 积分:14038 威望:0 精华:0 注册:2010-11-12 11:08:23
linux系统数据库开发环境搭建  发帖心情 Post By:2010-11-25 9:13:07

一、准备安装软件
 1. Red Hat Enterprise AS4 系统软件
       RHEL4-U2-i386-AS-disc1.iso
       RHEL4-U2-i386-AS-disc2.iso
       RHEL4-U2-i386-AS-disc3.iso
       RHEL4-U2-i386-AS-disc4.iso
 2、防病毒软件antivir
       antivir-server-prof-2.1.7-18.tar.gz
 3、数据库软件oracle10g
       10201_database_linux32.zip
 4、中间服务器软件及补丁easerver520
       68510-55-0520-01.tgz
       compat-libstdc++-7.3-2.96.118.i386.rpm
二、安装Red Hat Enterprise AS4 系统
 1、用虚拟光驱将RedHat9的第一个ISO文件中的loadlin.exe文件解压出来;
 2、再将Red Hat Enterprise AS4 的第一个ISO文件中的isolinux目录和trans.tbl文件解压出来;
 3、将Red Hat Enterprise AS4 的四个ISO文件必须放在FAT或FAT32的分区内(如D盘)
 4、建立并编辑一个批处理文件autoboot.bat,写入以下内容:
    loadlin isolinux/vmlinuz initrd=isolinux/initrd.img
    保存退出;
 5、下面是D盘目录树
    --RHEL4-i386-AS-disc1.iso
    --RHEL4-i386-AS-disc2.iso
    --RHEL4-i386-AS-disc3.iso
    --RHEL4-i386-AS-disc4.iso
    --TRANS.TBL
    --loadlin.exe
    --autoboot.bat
   │
   └─isolinux
    ---------TRANS.TBL
    ---------boot.cat
    ---------boot.msg
    ---------general.msg
    ---------initrd.img
    ---------isolinux.bin
    ---------isolinux.cfg
    ---------memtest
    ---------options.msg
    ---------param.msg
    ---------rescue.msg
    ---------snake.msg
    ---------splash.lss
    ---------vmlinuz
 6、最后DOS启动盘引导系统,进入D盘,运行autoboot.bat文件,启动安装。
    选择手工分区,新建一根分区和交换分区,点击NEXT
    选择配置高级引导装载程序选项,点击NEXT
    选择/dev/hda3引导分区的第一个扇区,点击NEXT
    在网络设备打开编辑窗口,取消使用DHCP进行配置,并输入IP,手工设置机器名,网关和DNS
    选择无防火墙
    在系统语言中选择chinese(p.r of china)和english(USA)
 7、定制软件包
    桌面: X窗口系统,GNOME桌面环境
    应用程序: 编辑器,工程和科学,图形化互联网,基于文本的互联网,办公/生产率,视屏和音频,授权和出版,图形
    服务器: 取消所有选项
    开发: 开发工具,X软件开发,GNOME软件开发
    系统: 管理工具,系统工具,打印支持
    杂项: 默认不选
三.安装防病毒软件antivir
   1.解压 [root@ldsheng]# gunzip antivir-server-prof-2.1.7-18.tar.gz
   2.还原 [root@ldsheng]# tar xvf antivir-server-prof-2.1.7-18.tar
   3.安装 [root@ldsheng]# cd antivir-server-prof-2.1.7-18
          [root@ldsheng]# ./install
           Do you agree to the license terms? [n] y
           Enter the path to your key file: []LICENSE.DE
           Would you like to install the internet update daemon? [n]y
           Would you like to create a link in /usr/sbin for avupdater ? [y]y
           Would you like the internet update daemon to start automatically? [y]
           How should AvGuard be installed? [n]k
           Would you like to create a link in /usr/sbin for avguard ? [y] y
           Would you like AvGuard to start automatically? [y] y
           Would you like to install the GUI (+ SMC support)? [y] y
           Would you like to configure the AntiVir updater now? [y]n
       Thank you for your interest in AntiVir for UNIX Server.
四.安装oracle10g数据库
   1、硬件要求:
      内存512M,交换空间1G,磁盘空间2.5G
      [root@ldsheng]# grep MemTotal /proc/meminfo
      [root@ldsheng]# grep SwapTotal /proc/meminfo
      [root@ldsheng]# df -h
   2、创建用户和组:
      [root@ldsheng]# groupadd dba
      [root@ldsheng]# groupadd oinstall
      [root@ldsheng]# useradd -m -g oinstall -G dba oracle
      [root@ldsheng]# passwd oracle
   3、准备文件目录:
      [root@ldsheng]# mkdir -p /u01/app/oracle
      [root@ldsheng]# mkdir -p /u02/oradata
      [root@ldsheng]# chown -R oracle:oinstall /u01/app/oracle /u02/oradata
      [root@ldsheng]# chown -R 775 /u01/app/oracle /u02/oradata
   4、调节系统内核参数:
      编辑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=262144
      net.core.rmem_max=262144
      net.core.wmem_default=262144
      net.core.wmem_max=262144
   5、设置oracle对文件的要求:
      编辑文件vi /etc/security/limits.conf 加入以下语句:
      oracle     soft    nproc   2047
      oracle     hard    nproc   16384
      oracle     soft    nofile  1024
      oracle     hard    nofile  65536
   6、设置oracle的系统环境:
      以oracle用户的身份登录:
      [root@ldsheng]# su oracle
      [root@ldsheng]# cd ~
      编辑vi .bashrc文件加入以的语句:
      umask 022
      PATH=/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/sbin:/u01/app/oracle/bin
      PATH=$PATH:/usr/local/bin:/u01/app/oracle/pruduct/10.2.0/bin:.
      export PATH
      ORACLE_BASE=/u01/app/oracle
      ORACLE_SID=ora0d100
      ORACLE_HOME=/u01/app/oracle/pruduct/10.2.0
      export ORACLE_BASE ORACLE_SID ORACLE_HOME
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
      CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
      NLS_LANG=AMERICAN_AMERICA.zhs16gbk
      NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
      export LD_LIBRARY_PATH CLASSPATH NLS_LANG NLS_DATE_FORMAT
   7、重启系统使设置生效
      [root@ldsheng]# reboot
   8、解压缩oracle10g文件,运行安装命令
      [root@ldsheng]# unzip 10201_database_linux32.zip
      [oracle@ldsheng]$ cd /mnt/oraclefile/database
      [oracle@ldsheng]$ ./runInstaller
      如果提示"OUI-10036:无法创建产品清单位置,您可能无权写入该位置",则执行以下命令:
      [root@ldsheng]# chmod u=rwx,g=rwx,o=rwx /u01/app/oracle
      [root@ldsheng]# chmod u=rwx,g=rwx,o=rwx /u02/oradata
      安装结束之前系统会提示执行相关脚本,则按要求执行
      [root@ldsheng]# cd /u01/app/oracle/oraInventory
      [root@ldsheng]# ./orainstRoot.sh
      [root@ldsheng]# cd /u01/app/oracle/pruduct/10.2.0
      [root@ldsheng]# ./root.sh
      Enter the full pathname of the local bin directory: [/usr/local/bin]:
                                          /u01/app/oracle/pruduct/10.2.0/bin
   9、开机自动启动em,database,listener,agent服务
       a、编辑vi /etc/oratab文件,增加或修改:
          ora0d100:/u01/app/oracle/pruduct/10.2.0:Y
       b、创建对init.ora的软链接
          在/u01/app/oracle/pruduct/10.2.0/dbs下建立一个到/u01/app/oracle/admin/ora0d100/pfile中的init.ora的软链接
          查看链接[root@ldsheng]# ls -alt init*
          建立链接[root@ldsheng]# ln -s  /u01/app/oracle/admin/ora0d100/pfile/initora0d100.ora
                                         /u01/app/oracle/pruduct/10.2.0/dbs/initora0d100.ora
       c、在/etc/rc.d/init.d 下创建名为dbora的文件,编辑增加以下内容
          #!/bin/bash
          # chkconfig: 35 95 1
          # description: init script to start/stop oracle database 10g, TNS listener, EMS
          #
          # match these values to your environment:
          export ORACLE_BASE=/u01/app/oracle
          export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
          export ORACLE_SID=ora0d100
          export PATH=/home/oracle/bin:$ORACLE_HOME/bin:$PATH
          export ORACLE_USER=oracle
          # see how we are called:
            case $1 in
                 start)
                 su - "$ORACLE_USER"<     dbstart
            EOS
                 emctl start dbconsole
            EOO
                  ;;
                 stop)
                 su - "$ORACLE_USER"<     dbshut
            EOS
                 emctl stop dbconsole
            EOO
                   ;;
                   *)
            echo "Usage: $0 {start|stop}"
                   ;;
            esac
       d、打开终端执行:
          [root@ldsheng]# chown oracle.oinstall /etc/rc.d/init.d/dbora
          [root@ldsheng]# chmod 755 /etc/rc.d/init.d/dbora
          使用chkconfig设置运行权限
          [root@ldsheng]# chkconfig dbora reset
          检查 [root@ldsheng]# chkconfig --list dbora
       

支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部

返回版面帖子列表

linux系统数据库开发环境搭建








签名