系统版本: CentOS Linux release 7.2.1511 (Core)
内核版本: 3.10.0-327.el7.x86_64
系统架构: x64 位
版权作者: amunlinux@163.com
编写时间:
- # 最小化安装 (level 3) 安装 VNC
- #centos7.2 安装 vnc, 最小化安装 vnc, 命令行安装 vnc,3 级别安装 vnc
- systemctl stop firewalld
- systemctl stop iptables.service
- setenforce 0
- # 依赖包必须安装
- yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools"
- yum -y install tigervnc-server tigervnc
- cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
- cat /lib/systemd/system/vncserver@:1.service
- [Service]
- Type=forking
- User=<root>
- ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :'
- ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver :1 -geometry 1280x720 -depth 24"
- PIDFile=/root/.vnc/%H%i.pid
- ExecStop=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :'
- [Install]
- WantedBy=multi-user.target
- # 重载配置: systemctl daemon-reload
- # 设置密码: vncpasswd
- # 启动服务: vncserver
- # 关闭服务: vncserver -kill :1
- # 我的环境的是 7.2 level_3, 照着粘贴就行了, 全程不用重启, 7 的 vnc 比 6 的 vnc 还简单
- # 建议用最新版的 vnc 来连接, 这样不会涉及协议不符的问题.
- # 我的 vnc 链接地址: http://down.51cto.com/data/2446766
来源: http://www.bubuko.com/infodetail-2592248.html