项目部署(8)虚拟机VNC Server安装

需要使用Linux的远程桌面服务,xmanager之前用过,感觉一般,这次尝试下VNC。

  • 服务端安装NCServer

1、安装VNCServer

1
#yum -y install vnc *vnc-server*

2、设置密码

1
2
3
4
5
6
7
8
9
# vncserver
You will require a password to access your desktops.
Password: 123456 #输入vnc 连接密码
Verify: 123456 #确认vnc密码
xauth: creating new authority file /root/.Xauthority
New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

3、启动服务

启动一个窗口,如1号窗口

1
# vncserver :1

4、停止服务

1
2
[root@iZ23zjkwlj8Z ~]# vncserver -kill :1
Killing Xvnc process ID 1661

5、安装GNOME桌面

装完后记得重启下vncserver

1
#yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

  • 客户端安装NCServer

我是Windows,用的客户端http://www.realvnc.com/,下载对应平台的VNC-Viewer
输入IP:窗口号,ok登录成功
网上说的修改 vi /root/.vnc/xstartup才能启动gnome桌面,我没有遇到过这种情况
我装完gnome,重启vncserver即可使用了。

SELinux介绍

几乎可以肯定每个人都听说过 SELinux (更准确的说,尝试关闭过),甚至某些过往的经验让您对 SELinux 产生了偏见。
不过随着日益增长的 0-day 安全漏洞,或许现在是时候去了解下这个在 Linux 内核中已经有8年历史的强制性访问控制系统(MAC)了。

|