linux6.5+5.4 vncserver配置
- 挂着光盘
命令:mount /dev/cdrom /mnt
- 配置yum
命令:cd /etc/yum.repos.d/
mv rhel-source.repo rhel-source.repo.bak
yum-config-manager --add file:///mnt
vim /etc/yum.conf
gpgcheck=0
yum clean all
yum repolist
- 安装软件包
rpm -qa | grep vnc
yum -y install tigervnc*
[[email protected] /]# rpm -qa | grep vnc
tigervnc-server-1.1.0-5.el6_4.1.x86_64
libvncserver-0.9.7-4.el6.x86_64
tigervnc-1.1.0-5.el6_4.1.x86_64
- 配置主配置文件
[[email protected] /]# vim /etc/sysconfig/vncservers
VNCSERVERS="1:root" /用户及访问窗口
SERVERARGS[1]="-geometry 800x600"
VNCSERVERS="10:vnc"
SERVERARGS[10]="-geometry 800x600"
[[email protected] /]# vncpasswd
Password:
Verify:
[[email protected] /]# su - vnc
[[email protected] ~]$ vncpasswd
Password:
Verify:
- 启动服务
[[email protected] ~]# service vncserver restart
[[email protected] ~]# service vncserver status
Xvnc (pid 9843 6858) 正在运行...
- 查看端口
[[email protected] ~]# netstat -anput | grep vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 6858/Xvnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 6858/Xvnc
tcp 0 0 0.0.0.0:5910 0.0.0.0:* LISTEN 9843/Xvnc
tcp 0 0 0.0.0.0:6010 0.0.0.0:* LISTEN 9843/Xvnc
tcp 0 0 :::6001 :::* LISTEN 6858/Xvnc
tcp 0 0 :::6010 :::* LISTEN 9843/Xvnc
- 测试登陆
[[email protected] yum.repos.d]# vncviewer 192.168.1.3:1
[[email protected] yum.repos.d]# vncviewer 192.168.1.3:10