VNC

VNC应该是服务器上图形化的首选了,首先一般安装linux是自动会安装这个工具

[root@node4 ~]# rpm -q vnc
vnc-4.1.2-14.el5_3.1
[root@node4 ~]# 
[root@node4 ~]# rpm -q vnc-server
vnc-server-4.1.2-14.el5_3.1
[root@node4 ~]# 

其次因为vnc是在服务器上直接操作,所以操作过程不会受到网络的影响

再次有些环境xshell的图形界面不好把握,故建议VNC

如果没安装也没关系

找到vnc-server-4.1.2-14.el5.x86_64.rpm,安装命令如下
rpm -ivh /mnt/Server/vnc-server-4.1.2-14.el5.x86_64.rpm

没那简单......

[root@erpdb01 ~]# cd /mnt
[root@erpdb01 mnt]# ls
iso  vnc-4.1.2-14.el5_3.1.x86_64.rpm
[root@erpdb01 mnt]# rpm -ivh /mnt/vnc-4.1.2-14.el5_3.1.x86_64.rpm
warning: /mnt/vnc-4.1.2-14.el5_3.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
	gtk2 >= 2.6 is needed by vnc-4.1.2-14.el5_3.1.x86_64
[root@erpdb01 mnt]#

没关系 看大招:

[root@erpdb01 ~]# rpm -ivh --nodeps /mnt/vnc-4.1.2-14.el5_3.1.x86_64.rpm
warning: /mnt/vnc-4.1.2-14.el5_3.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:vnc                    ########################################### [100%]
[root@erpdb01 ~]#

大招被坑:

[root@erpdb01 ~]# vncserver :1

New 'erpdb01.szgas.com:1 (root)' desktop is erpdb01.com:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/erpdb01.com:1.log

[root@erpdb01 ~]#


启动VNC服务设置登录密码:

[root@node4 ~]# vncserver :1
You will require a password to access your desktops.
Password:
Password must be at least 6 characters - try again
Password:
Verify:
New 'node4:1 (root)' desktop is node4:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/node4:1.log
[root@node4 ~]# 

我这里就用root密码代替了,注意密码不能少于6个字节

VNC SERVER端用地址192.168.56.4:1 然后输入刚才的密码就可以登录了

但是:

[root@node4 ~]# su - oracle
[oracle@node4 ~]$ netmgr
Xlib: connection to ":1.0" refused by server
Xlib: No protocol specified


Exiting
java.lang.NullPointerException
        at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
        at oracle.sysman.emSDK.client.appContainer.WebApplication.<init>(WebApplication.java:752)
        at oracle.net.mgr.container.NetApplication.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at oracle.sysman.emSDK.client.appContainer.WebApplication.main(WebApplication.java:3316)
[oracle@node4 ~]$ dbca
Xlib: connection to ":1.0" refused by server
Xlib: No protocol specified
Exception in thread "main" [oracle@node4 ~]$ 
 

解决办法: 
root下边 vncserver -kill :1
[root@node4 ~]#  vncserver -kill :1
Killing Xvnc process ID 2683
[root@node4 ~]#
然后 
su - oracle
vncserver:1
设置密码 然后 vnc客户端重连
 
亓冰-上海(949714699)  9:35:39
要不然就是 root下边 xhost + export DISPLAY......
就那么几步

[oracle@node4 ~]$  vncserver :1
You will require a password to access your desktops.
Password:
Verify:
Passwords don't match - try again
Password:
Verify:
New 'node4:1 (oracle)' desktop is node4:1
Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/node4:1.log
[oracle@node4 ~]$
  图形界面配置:
#xhost +
#xclock
su  - oracle
$ export  DISPLAY=localhost:1.0
$xclock
这次dbca毫无压力







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值