# centos7安装桌面
[root@localhost ~]# yum -y groups install "GNOME Desktop"
# 安装vnc
[root@localhost ~]# yum install tigervnc-server -y
# 启动服务
[root@localhost ~]# vncserver
会提示输入密码
# 查看
[root@localhost ~]# vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID :1 32227
# 关闭
[root@localhost ~]# vncserver -kill :1
# 修改密码
[root@localhost ~]# vncpasswd Password: Verify: Would you like to enter a view-only password (y/n)? n A view-only password is not used
连接端口号从/root/.vnc下的主机名+桌面id的日志(如:MiWiFi-RA69-srv:1.log)中可以看到。多启动一个vncserver,端口号就加1。
[root@MiWiFi-RA69-srv .vnc]# grep Listening *.log vncext: Listening for VNC connections on all interface(s), port 5901
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5002.html