第 71 章 Installing Oracle Database

简介:


目录

71.1. Installing Oracle Database 10g Release 2 on Linux x86
71.2. 11gR2
71.3. Installing Oracle Client 11g
71.4. Silence Install - Database
71.4.1. Response File
71.4.2. OS 配置脚本
71.4.3. 运行 runInstaller
71.5. Silence Install - Client
71.6. oracle 817 script
71.7. Script for automatic startup on boot
71.8. Run level shell script to start Oracle 10g services on RedHat Enterprise Linux (RHAS 4)

71.1. Installing Oracle Database 10g Release 2 on Linux x86

reference: http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html

To make these changes, cut and paste the following commands as root:

过程 71.1. Configure linux step by step

  1. Verifying Your Installation

    rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
    gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
    			

    installing package

    yum install compat-gcc-32 compat-gcc-32-c++ compat-gcc-32-g77 compat-libf2c-32 compat-libstdc++-296 compat-libstdc++-33 compat-db compat-readline43
    			
  2. Verifying System Requirements

    grep MemTotal /proc/meminfo
    grep SwapTotal /proc/meminfo
    			

    Swap = mem * 2

  3. Create the Oracle Groups and User Account

    groupadd oinstall
    groupadd dba
    useradd -m -g oinstall -G dba oracle
    passwd oracle
    id oracle
    			
  4. Create Directories

    mkdir -p /u01/app/oracle
    chown -R oracle:oinstall /u01/app/oracle
    chmod -R 775 /u01/app/oracle
    			
  5. Configuring the Linux Kernel Parameters

    			
    cat >> /etc/sysctl.conf <<EOF
    kernel.shmall = 2097152
    kernel.shmmax = 536870912
    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
    EOF
    /sbin/sysctl -p
    			
    			

    Run the following commands as root to verify your settings:

    /sbin/sysctl -a | grep shm
    /sbin/sysctl -a | grep sem
    /sbin/sysctl -a | grep file-max
    /sbin/sysctl -a | grep ip_local_port_range
    /sbin/sysctl -a | grep rmem_default
    /sbin/sysctl -a | grep rmem_max
    /sbin/sysctl -a | grep wmem_default
    /sbin/sysctl -a | grep wmem_max
    			
  6. Setting Shell Limits for the oracle User

    			
    cat >> /etc/security/limits.conf <<EOF
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536
    EOF
    			
    			
  7. /etc/profile

    			
    cat >> /etc/profile <<EOF
    if [ \$USER = "oracle" ]; then
     if [ \$SHELL = "/bin/ksh" ]; then
     ulimit -p 16384
     ulimit -n 65536
     else
     ulimit -u 16384 -n 65536
     fi
     umask 022
    fi
    EOF
    
    cat >> /etc/csh.login <<EOF
    if ( \$USER == "oracle" ) then
     limit maxproc 16384
     limit descriptors 65536
     umask 022
    endif
    EOF
    			
    			
  8. .bash_profile

    # su - oracle
    $ vim .bash_profile
    
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
    export ORACLE_SID=orcl
    export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
    			

过程 71.2. Installing Oracle

  1. 编辑 /10201_database_linux32/database/install/oraparam.ini 添加

    vim 10201_database_linux32/database/install/oraparam.ini
    
    ### #[Certified Versions]
    
    Linux=redhat-3,SuSE-9,redhat-4,centos-5,UnitedLinux-1.0,asianux-1,asianux-2
    
    [Linux-centos-5.1-optional]
    TEMP_SPACE=80
    SWAP_SPACE=150
    MIN_DISPLAY_COLORS=256
    			
  2. install

    			
    gunzip xxxx.cpio.gz
    cpio -idmv < xxxx.cpio
    export LANG=en_US
    ./runInstaller
    			
    			
  3. dbstart

    # su - oracle
    # dbstart
    
    提示打开 /ade/vikrkuma_new/oracle/bin/tnslsnr 失败
    			

    编辑 /u01/app/oracle/product/10.2.0.1/bin/dbstart

    # Set this to bring up Oracle Net Listener
    ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
    
    应该是在78行,将其改为:
    
    # Set this to bring up Oracle Net Listener
    ORACLE_HOME_LISTNER=$ORACLE_HOME
    			

    /etc/oratable 将最后一行的最后一个字符由 “N” 改为 “Y”

    orcl: /u01/app/oracle/product/10.2.0.1:Y
    			

过程 71.3. Configuring Storage

  1. Partition the Disks

    fdisk -l /dev/sdb
    			
  2. Filesystems

    ZFS or btrfs

  3. Create the Mount Point

    			
    mkdir /u02
    			
    			

    Add the New Filesystem to /etc/fstab

    			
    /dev/sdb1 /u02 xfs defaults 1 1
    			
    			

    Mount the New Filesystem

    			
    mount /u02
    df -h /u02
    			
    			
  4. Create Oracle Directories and Set Permissions

    			
    mkdir -p /u02/oradata/demo1
    chown -R oracle:oinstall /u02/oradata
    chmod -R 775 /u02/oradata
    			
    			
  5. Create a New Tablespace in the New Filesystem

    			
    Ex:
    $ sqlplus
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 15:50:50 2005
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Enter user-name: system
    Enter password:
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL> create tablespace data1
      2  datafile '/u02/oradata/demo1/data1_01.dbf' size 100m
      3  extent management local
      4  segment space management auto;
    
    Tablespace created.
    
    Now you can use the new tablespace to store database objects such as tables and indexes.
    
    Ex:
    SQL> create table demotab (id number(5) not null primary key,
     2 name varchar2(50) not null,
     3 amount number(9,2))
     4 tablespace data1;
    
    Table created.
    			
    




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
7月前
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
97 2
|
7月前
|
SQL Oracle 关系型数据库
Connect to Autonomous Database Using Oracle Database Tools
Connect to Autonomous Database Using Oracle Database Tools
65 1
|
6月前
|
Oracle 关系型数据库 Linux
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
56 0
|
7月前
|
人工智能 Oracle 关系型数据库
一篇文章弄懂Oracle和PostgreSQL的Database Link
一篇文章弄懂Oracle和PostgreSQL的Database Link
|
7月前
|
SQL Oracle 安全
Oracle Database Vault Access Control Components
Oracle Database Vault Access Control Components
58 0
|
7月前
|
Oracle 安全 关系型数据库
What Is Oracle Database Vault?
The Oracle Database Vault security controls protect application data from unauthorized access, and helps you to comply with privacy and regulatory requirements. You can deploy controls to block privileged account access to application data and control sensitive operations inside the database using
43 0
|
7月前
|
Oracle 关系型数据库
19c 开启Oracle Database Vault
19c 开启Oracle Database Vault
170 1
|
7月前
|
Oracle 关系型数据库 Linux
服务器Centos7 静默安装Oracle Database 12.2
服务器Centos7 静默安装Oracle Database 12.2
291 0
|
7月前
|
Oracle 关系型数据库 数据库
windows Oracle Database 19c 卸载教程
打开任务管理器 ctrl+Shift+Esc可以快速打开任务管理器,找到oracle所有服务然后停止。 停止数据库服务 在开始卸载之前,确保数据库服务已经停止。你可以使用以下命令停止数据库服务: net stop OracleServiceORCL Universal Installer 卸载Oracle数据库程序 一般情况运行Oracle自带的卸载程序,如使用Universal Installer 工具卸载。 点击开始菜单找到Oracle,然后点击Oracle安装产品,再点击Universal Installer。 点击之后稍等一会然后会进入进入下图界面,点击卸载产品。 选中要删除的Orac
682 1
|
存储 Oracle 关系型数据库
windows 使用 Oracle Database 19c
Oracle数据库是由美国Oracle Corporation(甲骨文公司)开发和提供的一种关系型数据库管理系统,它是一种强大的关系型数据库管理系统(RDBMS)。它使用表格(表)组织和存储数据,通过SQL语言进行数据管理。数据以表格形式存储,表之间可以建立关系。支持事务处理、多版本并发控制、安全性和权限控制。具有高可用性、容错性,支持分布式数据库和可扩展性。Oracle Corporation提供全面的支持和服务,使其成为企业级应用的首选数据库系统。
137 0

推荐镜像

更多