• 安装Oracle时可能碰到的常见问题-1


    安装Oracle可能有些人觉得是一件非常easy的事情,但事实上是在安装的过程中蕴含着丰富的知识点。尤其安装在Linux平台,可能会碰到这样或那样各种诡异的问题,透过问题看到本质,这才是从深处理解Oracle的精髓,至少我是这样觉得的。欢迎拍砖。。。


    以下就分几个场景。说明下安装过程中可能碰到的一些问题或知识点,也欢迎其它朋友碰到过其它一些安装问题的,能够补充进来。一是让我们温故知新,二是能够给其它人提供一些借鉴,少走一些弯路。


    场景1:安装VNC Server

    由于大多数的安装都是从远程client登录进行的,不是直接登录到server上操作,但假设没有选择silent静默安装。则须要图形化界面的支持,所以经常使用的方法就是首先在server上安装VNC Server,然后使用VNC远程登录到server图形界面中运行安装操作。

    Linux安装VNC Server有几种方法

    1. 下载VNC的rpm,使用rpm -ivh ***安装,比如:rpm -ivh vnc-E4_2_8-x64_linux.rpm,然后须要输入License,才干使用。

    我之前用过的一个License是WHJRK-UXY7V-Q34M9-CZU8L-8KGFA。但不保证一定可用。

    2. 使用Linux安装光盘上的VNC。

    3. 安装使用yum,(yum全称为Yellow dog Updater, Modified,是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,可以从指定的server自己主动下载RPM包而且安装,可以自己主动处理依赖性关系。而且一次安装全部依赖的软体包,无须繁琐地一次次下载、安装。

    )

    比如:

    [root@localhost software]# yum install vnc
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Unable to read consumer identity
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package tigervnc.x86_64 0:1.0.90-0.17.20110314svn4359.el6 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ====================================================================================================================================
    Package                    Arch                     Version                                            Repository             Size
    ====================================================================================================================================
    Installing:
    tigervnc                   x86_64                   1.0.90-0.17.20110314svn4359.el6                    dvd                   260 k

    Transaction Summary
    ====================================================================================================================================
    Install       1 Package(s)

    Total size: 260 k
    Installed size: 651 k
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Installing : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64                                                                  1/1
    Installed products updated.
      Verifying  : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64                                                                  1/1

    Installed:
      tigervnc.x86_64 0:1.0.90-0.17.20110314svn4359.el6                                                                                

    Complete!

    运行:
    [root@localhost bin]# ls -l vn*
    -rwxr-xr-x. 1 root root 594840 Nov 10  2011 vncviewer
    查看到已经安装的是vncviewer。相当于client。


    还须要安装server端:
    [root@localhost bin]# yum install tigervnc-server
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Unable to read consumer identity
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ====================================================================================================================================
    Package                         Arch                   Version                                           Repository           Size
    ====================================================================================================================================
    Installing:
    tigervnc-server                 x86_64                 1.0.90-0.17.20110314svn4359.el6                   dvd                 1.1 M

    Transaction Summary
    ====================================================================================================================================
    Install       1 Package(s)

    Total download size: 1.1 M
    Installed size: 2.8 M
    Is this ok [y/N]: y
    Downloading Packages:
    tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm                                                   | 1.1 MB     00:00    
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64                                                           1/1
    Installed products updated.
      Verifying  : tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64                                                           1/1

    Installed:
      tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6                                                                         

    Complete!

    再运行[root@localhost bin]# ls -l vn*
    -rwxr-xr-x. 1 root root  86472 Nov 10  2011 vncconfig
    -rwxr-xr-x. 1 root root  19912 Nov 10  2011 vncpasswd
    -rwxr-xr-x. 1 root root  20085 Nov 10  2011 vncserver
    -rwxr-xr-x. 1 root root 594840 Nov 10  2011 vncviewer
    能够看到服务端须要的可运行文件都已经安装了。当中vncconfig是用于配置,vncpasswd是用于password管理。

    设置好VNC的password之后,就能够启动VNC Server了。
    [root@localhost ~]# vncserver
    New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/localhost.localdomain:1.log

    但此时假设想登录到界面,还须要配置:
    1. 防火墙。上面显示的是:1,就须要配置5901port:
    [root@localhost ~]# iptables -I INPUT -p tcp --dport 5901 -j ACCEPT
    2. 运行xhost +和配置DISPLAY。指示控制台能够显示到哪里,
    [root@localhost ~]# xhost +
    xhost:  unable to open display ""
    直接运行xhost +会提示错误,此时应先配置DISPLAY变量:
    [root@localhost ~]# export DISPLAY=:0.0
    再次运行:
    [root@localhost ~]# xhost +
    access control disabled, clients can connect from any host
    client能够从随意host连接。

    如今从本机使用vncviewer打开IP,能够显示一个图形界面,但奇怪的是仅仅能看到一些选项。不能登录到界面:



    假设配置VNC图形桌面环境为KDE或GNOME桌面环境,还须要配置一个xstartup文件。
    [root@testdb ~]# vi /root/.vnc/xstartup

    改动文件:
    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    twm &

    保存之后重新启动一下VNCserver服务,方法:
    [root@localhost .vnc]# vncserver -kill :1
    Killing Xvnc process ID 1527
    [root@localhost .vnc]# vncserver
    New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/localhost.localdomain:1.log

    再次使用vncviewer登录,就能够看到图形界面了。



    场景2:系统配置參数

    Linux安装Oracle。我觉得最繁琐的地方就是设置系统配置參数,但Oracle 11g提供了更简洁的方法:


    安装到最后一步,会检查不符合要求的环节,如上图所看到的,此时能够选择“Fix & Check Again”。提示须要运行脚本runfixup.sh,这个脚本的作用就是为适应安装会自己主动改动和配置这些不符合条件的系统參数,对于广大用户来说。绝对是件好事。

    [root@localhost CVU_11.2.0.1.0_ora11g]# ./runfixup.sh

    Response file being used is :./fixup.response

    Enable file being used is :./fixup.enable

    Log file location: ./orarun.log

    Setting Kernel Parameters...

    kernel.sem = 250 32000 100 128

    fs.file-max = 6815744

    net.ipv4.ip_local_port_range = 9000 65500

    net.core.rmem_default = 262144

    net.core.wmem_default = 262144

    net.core.rmem_max = 4194304

    net.core.wmem_max = 1048576

    fs.aio-max-nr = 1048576

    uid=501(ora11g) gid=102(oinstall) groups=102(oinstall),101(dba)

    关于此脚本的说明。能够看下侯大师的介绍(http://blog.itpub.net/519536/viewspace-619629/),同一时候他指出假设研究下这些脚本,亦可写出一个通用的系统配置參数自己主动修正脚本,这样其它版本号的安装仍可使用,但前提是要绝对通用。


    场景3:未做的配置

    依照官方文档,可能有些操作未必是须要的。至少我安装的过程中。下面步骤是没做的:

    1. selinux未关。

    2. /etc/pam.d/login未配置。

    3. 未在profile中配置:

    if [ $USER = "oracle" ]; then

        if [ $SHELL = "/bin/ksh" ]; then

            ulimit -p 16384

            ulimit -n 65536

        else

            ulimit -u 16384 -n 65536

        fi

    fi


    To be continued ...

  • 相关阅读:
    oracle 认证方式
    Oracle
    深入理解Java的接口和抽象类
    mongoDB的学习【小白的福音】
    对于vertical-align的学习
    flex的学习 flexBox的学习
    用伪类添加翘边阴影::before和::after
    icon小图标
    url 中的 ? 和 & 还有 # 的作用
    解决img的1px空白问题
  • 原文地址:https://www.cnblogs.com/blfshiye/p/5083377.html
Copyright © 2020-2023  润新知