CentOS 6下VNC的安装与配置

//可到下载最新版的vnc 包括linux下的vnc server 和windows下的vnc view
[root@ ~]# cd /tmp
[root@ tmp]# tar -xvf vnc-4_1_3-x86_linux.tar.gz
[root@ tmp]# cd vnc-4_1_3-x86_linux
//以下/usr/local/bin是执行文件目录,/usr/local/share/man是帮助文档目录
[root@ vnc-4_1_3-x86_linux]# ./vncinstall /usr/local/bin /usr/local/share/man
[root@ vnc-4_1_3-x86_linux]# mkdir -p /usr/local/vnc/classes
[root@ vnc-4_1_3-x86_linux]# cp Java/* /usr/local/vnc/classes
[root@ vnc-4_1_3-x86_linux]# /usr/local/bin/vncserver
//这时出现错误如下
//vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open //shared object file: No such file or directory
//根据提示是缺少libstdc++-libc6.2-2.so.3这个库文件,将其放在/usr/lib下即可
[root@ vnc-4_1_3-x86_linux]# cp /tmp/libstdc++-libc6.2-2.so.3 /usr/lib
[root@ vnc-4_1_3-x86_linux]# /usr/local/bin/vncserver

You will require a password to access your desktops.
//此时会让你输入密码,第一次输入的就是以后用到的密码,需要输入两次
//以后想要修改密码可执行/usr/local/vncpasswd
Password:
Verify:
xauth:  creating new authority file /root/.Xauthority

New 'YYzs:1 (root)' desktop is YYzs:1
//上面生成的“1”是要在客户端登陆时用到的编号,可认为是端口号
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/YYzs:1.log

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/21758.html