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

奋斗吧
奋斗吧
擅长邻域:未填写

标签: 安装Oracle时可能碰到的常见问题-1 Html/CSS博客 51CTO博客

2023-06-22 18:24:07 237浏览

安装Oracle时可能碰到的常见问题-1,安装Oracle可能有些人认为是一件很简单的事情,但其实是在安装的过程中蕴含着丰富的知识点,尤其安装在Linux平台,可能会碰到这样或那样各种诡异的问题,透过问题看到本质,这才是从深处理解Oracle的精髓,至少我是这样认为的,欢迎拍砖。。。下面就分几个场景,说明下安装过程中可能碰到的一些问题或知识点,也欢迎其他朋友碰到过其他一些安装问题的,可以补充进来,一是让我们温故知新,二是可以给其他人提供一


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


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


场景1:安装VNC Server

因为大多数的安装都是从远程客户端登录进行的,不是直接登录到服务器上操作,但如果没有选择silent静默安装,则需要图形化界面的支持,所以常用的方法就是首先在服务器上安装VNC Server,然后使用VNC远程登录到服务器图形界面中执行安装操作。

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包管理,能够从指定的服务器自动下载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,相当于客户端。

还需要安装server端:

再执行[root@localhost bin]# ls -l vn*

[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!

-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是用于密码管理。


设置好VNC的密码之后,就可以启动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,就需要配置5901端口:

[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

客户端可以从任意host连接。


现在从本机使用vncviewer打开IP,可以显示一个图形界面,但奇怪的是只能看到一些选项,不能登录到界面:

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




如果配置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登录,就可以看到图形界面了。

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


场景2:系统配置参数

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

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

安装到最后一步,会检查不符合要求的环节,如上图所示,此时可以选择“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 ...

好博客就要一起分享哦!分享海报

此处可发布评论

评论(0展开评论

暂无评论,快来写一下吧

展开评论

您可能感兴趣的博客

客服QQ 1913284695