第三步:若是是在windows系统下远程链接liunx系统进行安装时,须要使用liunx系统自带的VNC服务,通常安装liunx系统时自带安装有,但须要配置相关参数才能使用。 数据库
一、下载一个链接liunx系统的vnc客户端,vnc.exe安装软件。也能够使用IE浏览器链接VNC服务端。 vim
二、配置VNC参数 windows
[root@test ~]# rpm -qa | grep vnc 查看软件包是否安装 浏览器
vnc-4.1.2-14.el5_3.1
vnc-server-4.1.2-14.el5_3.1 服务器
[root@test ~]# service vncserver status 查看一下本机器的vnc运行状态
Xvnc is stopped
[root@test ~]# service vncserver start vncserver还未进行初始化配置
Starting VNC server: no displays configured session
[root@test ~]# vncserver 建立密码用来登录远程登录SVN用的(这里是root用户登录,要安装oracle,必须 切换成oracle下,再建立一个密码,用来登录远程的liunx系统)
You will require a password to access your desktops. oracle
Password:root 这里取 root
Verify:root 重复一次确认 app
New 'test.localdomain:1 (root)' desktop is test.localdomain:1
dom
Creating default startup script /root/.vnc/xstartup 生成一个文件,修改此文件能够登陆窗口模式
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/test.localdomain:1.log ui
su - oralce
[oracle@test ~]# vncserver
You will require a password to access your desktops.
Password:oracle
Verify:oracle
修改此xstartup文件改变登录模式
[oracle@test ~ .vnc]$ vi 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 &
[oracle@test ~ .vnc]$
一样方式修改 root用户建立的xstartup文件
[root@test ~ .vnc]$ vi 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 &
[root@test ~ .vnc]$
[root@test ~]#vim /etc/sysconfig/vncservers 修改vncservers文件
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:root 2:oracle"
VNCSERVERARGS[1]="-geometry 800x600 "
VNCSERVERARGS[2]="-geometry 800x600 "
[root@Test-~]# service vncserver restart 重启vnc服务
此时经过192.168.251.104:5901 192.168.251.104:5902能够访问远程的liunx系统了。
5901端口对应的是root用户登录,5902对应的是oracle用户登录。安装oracle数据库,用5902端口就行。
注意:远程登录不了
一、vnc链接服务器时只能进入终端,不能进入桌面。。。。
缘由是vncserver配置有问题,进入vim /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 &
gnome-session &
二、防火墙影响
三、vi host.conf
添加127.0.0.1 localhost vnc远程客户端才能链接