生产环境,需要装一套oracle,机房在外地,而且是用vnc连接的,xmanager连了几次都不能调出图形化界面,有人推荐用静默安装,确实是个方法,可是我没有脚本,要录个脚本,其实也挺麻烦的,况且从来没有过静默安装,怕出错,所以选择用vnc安装oracle。以下是安装vnc的方法,并且实验成功。
检查是否有vnc
[root@yunhe software]# ps -ef|grep vnc
[root@yunhe software]# rpm -qa | grep vnc
安装vnc软件包
[root@yunhe software]# yum install tigervnc tigervnc-server –y
[root@yunhe software]# yum install -y libvncserver*
检查
[root@yunhe software]# rpm -qa | grep vnc
tigervnc-1.1.0-24.el6.x86_64
tigervnc-server-1.1.0-24.el6.x86_64
libvncserver-devel-0.9.7-7.el6_6.1.x86_64
libvncserver-0.9.7-7.el6_6.1.x86_64
配置vnc 【第一次配置后面提示1端口被占用】 将以下内容,增加到/etc/sysconfig/vncservers
[root@yunhe software]# vim /etc/sysconfig/vncservers
VNCSERVERS="3:grid"
VNCSERVERARGS[3]="-geometry 800x600"
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
"/etc/sysconfig/vncservers" 27L, 949C written
设置vnc密码
[root@yunhe software]# vncpasswd
Password:
Verify:
启动vnc【提示1已经运行,应该是被占用了】
[root@yunhe software]# service vncserver start
Starting VNC server: 1:root
Warning: yunhe:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server yunhe:1
A VNC server is already running as :1
[FAILED]
关闭vnc
[root@yunhe software]# service vncserver stop
Shutting down VNC server: [ OK ]
再次配置vnc【将端口号改成4了】
[root@yunhe software]# vim /etc/sysconfig/vncservers
VNCSERVERS="3:grid"
VNCSERVERARGS[3]="-geometry 800x600"
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERS="4:root"
VNCSERVERARGS[4]="-geometry 800x600"
"/etc/sysconfig/vncservers" 27L, 949C written
启动vnc,提示成功
[root@yunhe software]# service vncserver start
Starting VNC server: 4:root xauth: creating new authority file /root/.Xauthority
New 'yunhe:4 (root)' desktop is yunhe:4
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yunhe:4.log
[ OK ]
配置用户登陆时启用的桌面环境,将#twm & 注释掉,添加gnome-session &
[root@yunhe software]# vi /root/.vnc/xstartup
#twm &
gnome-session &
"~/.vnc/xstartup" 30L, 671C written
如果系统没有安装桌面,还要安装下gnome桌面
安装gnome软件,这个是生成图形界面锁需要的组件:
yum install -y gnome*
yum install libXfont -y
yum install xorg-x11-xfs
yum install xorg-x11-xfs-utils
yum install xorg-x11-xinit
yum install xorg-x11-xdm
yum install xorg-x11-fonts*
然后在客户端输入系统的地址和端口号,以及密码,连接到系统
在系统调整vnc窗口大小
检查是否有vnc
[root@yunhe software]# ps -ef|grep vnc
[root@yunhe software]# rpm -qa | grep vnc
安装vnc软件包
[root@yunhe software]# yum install tigervnc tigervnc-server –y
[root@yunhe software]# yum install -y libvncserver*
检查
[root@yunhe software]# rpm -qa | grep vnc
tigervnc-1.1.0-24.el6.x86_64
tigervnc-server-1.1.0-24.el6.x86_64
libvncserver-devel-0.9.7-7.el6_6.1.x86_64
libvncserver-0.9.7-7.el6_6.1.x86_64
配置vnc 【第一次配置后面提示1端口被占用】 将以下内容,增加到/etc/sysconfig/vncservers
[root@yunhe software]# vim /etc/sysconfig/vncservers
VNCSERVERS="3:grid"
VNCSERVERARGS[3]="-geometry 800x600"
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
"/etc/sysconfig/vncservers" 27L, 949C written
设置vnc密码
[root@yunhe software]# vncpasswd
Password:
Verify:
启动vnc【提示1已经运行,应该是被占用了】
[root@yunhe software]# service vncserver start
Starting VNC server: 1:root
Warning: yunhe:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server yunhe:1
A VNC server is already running as :1
[FAILED]
关闭vnc
[root@yunhe software]# service vncserver stop
Shutting down VNC server: [ OK ]
再次配置vnc【将端口号改成4了】
[root@yunhe software]# vim /etc/sysconfig/vncservers
VNCSERVERS="3:grid"
VNCSERVERARGS[3]="-geometry 800x600"
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERS="4:root"
VNCSERVERARGS[4]="-geometry 800x600"
"/etc/sysconfig/vncservers" 27L, 949C written
启动vnc,提示成功
[root@yunhe software]# service vncserver start
Starting VNC server: 4:root xauth: creating new authority file /root/.Xauthority
New 'yunhe:4 (root)' desktop is yunhe:4
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yunhe:4.log
[ OK ]
配置用户登陆时启用的桌面环境,将#twm & 注释掉,添加gnome-session &
[root@yunhe software]# vi /root/.vnc/xstartup
#twm &
gnome-session &
"~/.vnc/xstartup" 30L, 671C written
如果系统没有安装桌面,还要安装下gnome桌面
安装gnome软件,这个是生成图形界面锁需要的组件:
yum install -y gnome*
yum install libXfont -y
yum install xorg-x11-xfs
yum install xorg-x11-xfs-utils
yum install xorg-x11-xinit
yum install xorg-x11-xdm
yum install xorg-x11-fonts*
然后在客户端输入系统的地址和端口号,以及密码,连接到系统
在系统调整vnc窗口大小
窗口界面太小,进入System->Preferences->Display->Resolution,在这里选择1280 x 960
以上,然后就可以像本地安装一样,去安装oracle了。