cnetos7 vncserver安装与配置
生活随笔
收集整理的這篇文章主要介紹了
cnetos7 vncserver安装与配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
cnetos7 vnc server安裝與配置
一、安裝
1,查看是否安裝
[root@localhost?~]#?rpm?-qa?|grep?vnc gvnc-0.5.2-7.el7.x86_64 tigervnc-server-minimal-1.3.1-4.el7_2.x86_64 gtk-vnc2-0.5.2-7.el7.x86_64 tigervnc-license-1.3.1-4.el7_2.noarch tigervnc-server-minimal-1.3.1-3.el7.x86_64 tigervnc-license-1.3.1-3.el7.noarch libvncserver-0.9.9-9.el7_0.1.x86_62,若未安裝使用yum安裝
[root@localhost?~]#?yum?installtigervnc-server?tigervnc-server-module3,關閉防火墻
[root@localhost?~]#?systemctl?disable?firewalld.service [root@localhost?~]#?systemctl?stop?firewalld.service二、配置
1,copy配置文件
[root@localhost?~]#?cp?/lib/systemd/system/vncserver@.service?/etc/systemd/system/vncserver@:1.service若出現cannot stat ‘/lib/systemd/system/vncserver@.service’: No such fileor directory重新yum安裝即可
2,修改配置文件
[root@localhost?~]#?vim?/etc/systemd/system/vncserver@:1.service [Unit] Description=Remote?desktop?service?(VNC) After=syslog.target?network.target[Service] Type=forking #?Clean?any?existing?files?in/tmp/.X11-unix?environment ExecStartPre=/bin/sh?-c?'/usr/bin/vncserver-kill?%i?>?/dev/null?2>&1?||?:' ExecStart=/usr/sbin/runuser?-l?root?-c?"/usr/bin/vncserver?%i" PIDFile=/root/.vnc/%H%i.pid ExecStop=/bin/sh?-c?'/usr/bin/vncserver-kill?%i?>?/dev/null?2>&1?||?:'#這里使用root用戶,將<user>換成root,PIDFile路徑注意去掉/home/!
3,開機啟動服務
[root@localhost~]#?systemctl?enable?vncserver@:1.service4,配置登錄密碼
[root@localhost?~]#?vncpasswd5,啟動服務
[root@localhost?~]#?systemctl?start?vncserver@:1.service6,查看監聽接口
[root@localhost?~]#?netstat?-nat?|?grep?590* tcp???????0????0?0.0.0.0:5901?????0.0.0.0:*?????LISTEN???? tcp6??????0????0?:::5901??????:::*???????LISTEN?
7,查看排錯日志
[root@localhost?~]#?grep?vnc/var/log/messages8,登錄
轉載于:https://blog.51cto.com/dingtongxue1990/1855558
總結
以上是生活随笔為你收集整理的cnetos7 vncserver安装与配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 和的java程序
- 下一篇: 【我的Android进阶之旅】如何快速寻