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

一、准备安装软件
 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
{以下是自己的测试,上面2条命令总是执行不正确,所以分单步执行
      [root@ldsheng]# chmod ug=rwxx /u01/app/oracle
      [root@ldsheng]# chmod o=rwxx /u01/app/oracle
      [root@ldsheng]# chmod ug=rwx /u02/oradata
      [root@ldsheng]# chmod 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"            EOS
                 emctl start dbconsole
            EOO
                  ;;
                 stop)
                 su - "$ORACLE_USER"            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
          结果如下:
          dbora           0:关闭  1:关闭  2:关闭  3:启用  4:关闭  5:启用  6:关闭
       e、在开机后和关机前要执行的任务目录里加个文件链接。
       开机后自动启动ORACLE数据库:
          Sun Solaris
       #cd /etc/rc2.d
       #ln -s /etc/init.d/oracle S99oracle
          Linux
       #cd /etc/rc.d/rc3.d
       #ln -s /etc/rc.d/init.d/oracle S99oracle
          关机前自动关闭ORACLE数据库:
          Sun Solaris
       #cd /etc/rc0.d
       #ln -s /etc/init.d/oracle K01oracle
          Linux
       #cd /etc/rc.d/rc0.d
       #ln -s /etc/rc.d/init.d/oracle K01oracle
          重启计算机,启动会比较慢,因为要自动启动em,database,listener,agent
       f、另一种方式直接修改vi /etc/rc.d/rc.local文件,增加以下代码:
          su - oracle -c "/u01/app/oracle/pruduct/10.2.0/bin/dbstart"
          su - oracle -c "/u01/app/oracle/pruduct/10.2.0/bin/lsnrctl start"
          su - oracle -c "/u01/app/oracle/pruduct/10.2.0/bin/emctl start dbconsole"
   10.常用手动控制数据库命令
      a、启动和停止 em
         [root@ldsheng]# emctl start dbconsole
         [root@ldsheng]# emctl stop dbconsole
      b、启动和停止 listener
         [root@ldsheng]# lsnrctl start (默认是LISTENER,可省略)
         [root@ldsheng]# lsnrctl stop
      c、启动和停止 emagent
         [root@ldsheng]# emctl start agent
         [root@ldsheng]# emctl stop agent
      d、启动和停止 实例
         [root@ldsheng]# sqlplus /nolog
         [root@ldsheng]# conn / as sysdba
         [root@ldsheng]# startup
         [root@ldsheng]# shutdown im1mediate
         或
         [root@ldsheng]# dbstart
         [root@ldsheng]# dbshut
      e、测试数据库是否连通
         [root@ldsheng]# tnsping ora0d100
          Used parameter files:
          /u01/app/oracle/pruduct/10.2.0/network/admin/sqlnet.ora
          Used TNSNAMES adapter to resolve the alias
          Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)
          (HOST = ldsheng)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)              
          (SERVICE_NAME = ora0d100)))
          OK (20 msec)
      f、以下的 J2EE 应用程序已经配置, 并且可用下面列出的 URL 来访问。
          iSQL*Plus URL:      http://ldsheng:5560/isqlplus
          iSQL*Plus DBA URL:  http://ldsheng:5560/isqlplus/dba
          Enterprise Manager  http://ldsheng:1158/em
五.安装easerver5.2.0
   1.打系统补丁compat-libstdc++-7.3-2.96.118.i386.rpm(启动服务需要)
   2.解压[root@ldsheng]# gnzip 68510-55-0520-01.tgz
   3.还原[root@ldsheng]# tar xvf 68510-55-0520-01.tar
   4.点击setup安装(关于安装界面中文出现乱码的情况本人尚未解决,建议将系统语言设置为英文)
   5.启动服务[root@ldsheng]# cd /opt/Sybase/EAServer/bin
             [root@ldsheng]# ./serverstart.sh
   6.启动Jaguar Manager[root@ldsheng]# ./jargmr

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/3090/viewspace-604276/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/3090/viewspace-604276/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
红帽企业 Linux 详情 服务器解决方案 红帽企业 Linux AS 最高性能的企业级服务器,支持高端系统和用于关键任务的系统。可提供最高级别的支持服务。 红帽企业 Linux ES 适用于当今大多数商业计算环境中的小到中型服务器解决方案。 客户机解决方案 红帽企业 Linux WS 适用于软件开发,高性能台式机计算,特定的客户端应用程序和高性能计算(HPC)。 红帽 Desktop 红帽 Desktop 是需要大量客户机系统的理想选择。它提供了包括红帽网络代理或红帽卫星服务器的10单元和50单元两种选择。 红帽企业 Linux 包括了大约 1500 个软件包,为用户提供了一个多性能的计算环境。以下列出了其中的一些主要功能。如需了解更多的信息,请参阅产品文档。 2. 红帽企业 Linux 系列中的各个产品有什么不同?我应该选择哪一个? 从技术的角度来讲,红帽企业 Linux 系列中的四种产品 – 红帽企业 Linux AS、ES、WS 和 Desktop 是非常相似的。红帽企业 Linux 系列的一个设计目标是所有的产品都具有高度的共性:无论是运行应用程序的环境还是系统管理的环境都高度的统一。AS 和 ES 是为服务器所设计的;WS 是为计算节点和技术工作站所设计的;而红帽 Desktop 则适用于普通的办公环境。AS 和 ES 提供相同的功能。它们的不同之处在于,ES 支持双 CPU 服务器和16GB的主内存,而 AS 支持任何配置的服务器。WS 和红帽 Desktop 不包括 AS 和 ES 提供的一些服务器应用程序,因此它们并不适用于服务器环境。红帽 Desktop 支持大到4GB内存的单 CPU 系统,而 WS 支持双 CPU, 并且没有对内存的限制。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值