Win10使用VNC连接Centos7远程桌面
一、安装VNC Viewer 1.首先win10下载安装VNC VIEWER?或者直接下载绿色版 2.linux系统安装vnc: 检查linux是否安装vnc:rpm -q tigervnc tigervnc-server 3.以root用户运行以下命令来安装vncserver; #yum install tigervnc-server 同样运行以下命令来安装vncviewer; #yum install vnc ? 4.配置VNC-Server 进入目录: #cd /lib/systemd/system #ls ? 首先,复制该service,命名为[email?protected]:1.service #cp [email?protected] [email?protected]:1.service ? ?然后,修改[email?protected]:1.service ? ?#vi [email?protected]:1.service ? 修改前: [Unit] [Service] # Clean any existing files in /tmp/.X11-unix environment [Install] 修改后: [Unit] [Service] [Install] 最后Esc+:wq保存退出。 ? ? 6、重新加载?systemd #由于在systemd中添加了东东,得让系统重新加载 systemctl daemon-reload 启动[email?protected]:1.service服务,并设置开机自启 systemctl start [email?protected]:1.service systemctl enable [email?protected]:1.service 注:若系统无法正常关机,则再次启动,此服务无法启动,解决办法参照以下步骤 、问题解决 1.报错:Job for [email?protected]:1.service failed because the control process exited with error code. See "systemctl status [email?protected]:1.service" and "journalctl -xe" for details. 处理方法: rm -rf /tmp/.X11-unix/*? ? 7、为[email?protected]:1.service设置密码 ? ? vncpasswd ? 8、关闭防火墙 ? ? CentoS7默认采用新防火墙firewall,不在用iptables ? ?[使用firewall]? ? ? ? ? ? ? ? ? ? ? ?firewall-cmd --permanent --add-service vnc-server#添加访问权限 ? ? ? ? ? ? ? ? ? ? ?systemctl restart firewalld.service#重启firewalld ?#systemctl stop firewalld.service?#停止firewall(start,启动) ? ? ? ? ? ? ? ? ? ? ?#systemctl disable?firewalld.service?#设置开机禁止firewall(enable 开机启动) ? ?[使用iptables] ? ? ? ? ? ? ? ? ? ? ?yum -y install iptables-services#安装iptables ? ? ? ? ? ? ? ? ? ? ?vi /etc/sysconfig/iptables#修改iptables防火规则,在合适的位置加上如下一句 ? ? ? ? ? ? ? ? ? ? ? ? ? -A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT systemctl restart iptables.service?#重启防火墙使配置生效-----systemctl status iptables.service#查看状态 systemctl stop iptables.service?#启动iptables(start) systemctl disable?iptables.service?#禁止防火墙开机启动(enable)#设置防火墙开机启动 ? ?[注意]安装iptables后可以使用 service iptables?status#查看防火墙状态 service iptables stop#关闭防火墙 chkconfig iptables --list#查看防火墙开机启动状态 chkconfig iptables off#关闭防火墙开机启动 ? 9、启动VNC服务(设置开机启动) systemctl enable [email?protected]:1.service #设置开机启动 systemctl start [email?protected]:1.service #启动vnc会话服务 访问 ? ? ? ?使用你的ip加上一个1即可 ? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- Microsoft Excel 2010复制/粘贴编辑想法和帮助请求小细节
- api-ms-win-crt-runtime-|1-1-0.dll丢失的解决方法
- windows – Delphi:ListView(vsReport)单列标题标题与自定
- winserver-记录共享文件夹操作日志
- 在sysprep-ping Windows映像或部署时是否应用了新的SID?
- 如何在Windows上开发Apple Java Extensions?
- windows上php环境下memcache和mongodb的安装
- Node的安装,Windows下常用的命令行操作
- windows – 批量从文件名中删除括号
- windows-server-2008 – RDP中“使用其他帐户”的键盘快捷方