V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
junbaor
V2EX  ›  数据库

请教一下各位在 Linux 上都是怎么安装 oracle 数据库的

  •  
  •   junbaor · Jun 8, 2016 · 1685 views
    This topic created in 3613 days ago, the information mentioned may be changed or developed.

    mysql 安装一条命令就搞定了
    oracle 这个真心搞不定啊,网上搜的教程都不太靠谱,
    google 出来的官方文档都是英文的,啃起来很费劲。

    那么问题来了

    有没有针对小白用户的一键安装脚本?

    求老司机指教。 另外说一下,
    发行版是 SUSE Server 13 x64

    14 replies    2016-06-09 11:41:40 +08:00
    coolair
        1
    coolair  
       Jun 8, 2016 via Android
    官方文档很详细,一步一步来肯定没问题,不必看别人写的记录,每个人写的都有些地方不一样,搞糊涂了自己。
    wujunze
        2
    wujunze  
       Jun 8, 2016
    木有用过 oracle
    strwei
        3
    strwei  
       Jun 8, 2016
    apt-get install oracle.....(逃
    holyzhou
        4
    holyzhou  
       Jun 8, 2016
    一键脚本可以自己写,根据 oracle 的官方文档 ,网上有人写过 你也可以拿过来调调。
    主要是之前的系统设置有点多,之后的安装过程倒是不复杂,对于系统设置可以写脚本或者用 oracle 的 linux 发行版上有一个安装包,就是做安装前的初始化工作的,适不适用 suse 没测过
    对于之后的数据库安装可以首先按自己的要求装一遍生成 rsp 文件文件,之后可以通过命令行的方式用生成的 rsp 文件静默安装
    SlipStupig
        5
    SlipStupig  
       Jun 8, 2016
    call support for tech
    auin
        6
    auin  
       Jun 8, 2016
    我之前装过的是安装了桌面环境的 Linux ,和 win 一模一样 (逃
    windyboy
        7
    windyboy  
       Jun 8, 2016
    用 response 文件, silent 安装
    前提要先把需要准备的包安装完
    alienangel
        8
    alienangel  
       Jun 8, 2016
    想简单就用 oracle-linux 装,不想就按官方文档来
    jeffersonpig
        9
    jeffersonpig  
       Jun 8, 2016
    对着工程部写的 oracle 安装配置手册安装
    salmon5
        10
    salmon5  
       Jun 8, 2016
    绑定机器名和 IP 地址
    检查 /etc/host,127.0.0.1 行,不要有主机名
    vi /etc/hosts
    192.168.1.3 oracledb

    软件包
    binutils-2.17.50.0.6
    compat-libstdc++-33-3.2.3
    compat-libstdc++-33-3.2.3 (32 bit)
    elfutils-libelf-0.125
    elfutils-libelf-devel-0.125
    gcc-4.1.2
    gcc-c++-4.1.2
    glibc-2.5-24
    glibc-2.5-24 (32 bit)
    glibc-common-2.5
    glibc-devel-2.5
    glibc-devel-2.5 (32 bit)
    glibc-headers-2.5
    ksh-20060214
    libaio-0.3.106
    libaio-0.3.106 (32 bit)
    libaio-devel-0.3.106
    libaio-devel-0.3.106 (32 bit)
    libgcc-4.1.2
    libgcc-4.1.2 (32 bit)
    libstdc++-4.1.2
    libstdc++-4.1.2 (32 bit)
    libstdc++-devel 4.1.2
    make-3.81
    sysstat-7.0.2
    pdksh

    yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
    yum install unixODBC.i686 unixODBC-devel.i686 libaio.i686 libaio-devel.i686 compat-libstdc++-33.i686 libstdc++.i686 libgcc.i686

    pdksh 的安装
    http://rpm.pbone.net/index.php3/stat/4/idpl/2394414/dir/redhat_6.x/com/pdksh-5.2.14-1.i386.rpm.html
    yum remove ksh
    rpm -ivh pdksh-5.2.14-1.i386.rpm
    添加组和用户
    #groupadd -g 502 oinstall
    #groupadd -g 503 dba
    #groupadd -g 504 oper
    ( oper 不是必须)
    #useradd -u 501 -g oinstall -G dba,oper oracle
    ( oper 不是必须)
    #useradd -u 501 -g oinstall -G dba oracle
    #usermod -g oinstall -G dba,oper oracle
    ( oper 不是必须)
    #passwd oracle
    更改打开文件限制数
    #vi /etc/security/limits.conf
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536
    oracle soft stack 10240
    优化内核参数
    #vi /etc/sysctl.conf
    # oracle 优化内核参数
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    # kernel.shmall = 2097152
    # kernel.shmmax = 4294967295
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576
    #sysctl -p
    创建安装文件夹
    #mkdir -p /u01/app/oracle
    #chown -R oracle:oinstall /u01/app
    #chmod -R 775 /u01/app
    更改 Oracle 用户环境变量
    #su – oracle
    $vi .bash_profile
    PATH=$PATH:$HOME/bin:/sbin
    TMP=/tmp;export TMP
    TMPDIR=$TMP;export TMPDIR

    ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
    ORACLE_SID=sms;export ORACLE_SID
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1;export ORACLE_HOME
    PATH=$PATH:$ORACLE_HOME/bin;export PATH
    export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

    alias sqlplus='rlwrap sqlplus'
    alias rman='rlwrap rman'

    (rlwrap 安装
    wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.41.tar.gz
    tar -xzvf rlwrap-0.37.tar.gz
    cd rlwrap-0.37
    ./configure
    遇到 configure: WARNING: No termcap nor curses library found???
    yum install -y libtermcap-devel readline-devel

    ./configure
    出现
    Now do:
    make (or gmake) to build rlwrap
    make check for instructions how to test it
    make install to install it
    开始
    make
    make install

    设置 DISPLAY 变量
    $export DISPLAY=192.168.1.15:0.0
    $ unzip linux.x64_11gR2_database_1of2.zip
    $unzip linux.x64_11gR2_database_2of2.zip
    $cd database

    $./runInstaller 一步一步开始安装,该界面的中文和英文字体取决于 /etc/sysconfig/i18n 文件里面的 LANG="en_US.UTF-8" LANG="zh_CN.UTF-8"设置
    salmon5
        11
    salmon5  
       Jun 8, 2016
    上面是 centos 6.x x64 的。
    官方文档一般比较含糊,自己摸索过才行。
    bdbai
        12
    bdbai  
       Jun 8, 2016 via Android
    @strwei 憋跑 SUSE 用的是 zypper
    yuedingwangji
        13
    yuedingwangji  
       Jun 8, 2016
    很简单的呀,装好相应的 包 , 然后,配置好环境,就可以装了
    gefranks
        14
    gefranks  
       Jun 9, 2016 via iPhone
    Suse 貌似有额外的包要装 检查的时候有提示吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2582 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 72ms · UTC 12:23 · PVG 20:23 · LAX 05:23 · JFK 08:23
    ♥ Do have faith in what you're doing.