目录
CentOS7.6服务器部署VNC
首页 运维 CentOS CentOS7.6服务器如何部署VNC

CentOS7.6服务器如何部署VNC

Jan 26, 2021 pm 05:00 PM

下面由centos教程栏目给大家介绍CentOS7.6服务器部署VNC的方法,希望对需要的朋友有所帮助!

CentOS7.6服务器部署VNC

安装vnc服务器

[root@localhost ~]# yum install tigervnc-server
登录后复制

开启vnc

[root@localhost ~]# vncserver 

You will require a password to access your desktops.

Password:				//输入密码
Verify:					//重复密码
Would you like to enter a view-only password (y/n)? n		//只可看的密码,一般选n
A view-only password is not used
xauth:  file /root/.Xauthority does not exist

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log
登录后复制

开启远程端口

[root@localhost ~]# vncserver :1

New 'localhost.VD:1 (root)' desktop is localhost.VD:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.VD:1.log
登录后复制

查看服务器ip

[root@localhost ~]# ifconfig | grep inet
        inet 10.10.41.43  netmask 255.255.252.0  broadcast 10.10.43.255
        inet6 2400:dd01:1001:1040:3b37:b445:ad5b:ad2f  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::bdd8:8bd:8871:f736  prefixlen 64  scopeid 0x20<link>
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
登录后复制

关闭防火墙和selinux

1. 关闭防火墙

将firewalld服务设置为disable

[root@localhost ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
登录后复制

查看状态,成功关闭

[root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Apr 22 10:06:35 localhost.VD systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 22 10:06:37 localhost.VD systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 22 15:31:38 localhost.VD systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 22 15:31:39 localhost.VD systemd[1]: Stopped firewalld - dynamic firewall daemon.
登录后复制

2. 关闭selinux

  • 临时修改
[root@localhost ~]# setenforce 0
登录后复制
  • 永久修改,下次开机生效
[root@localhost ~]# vim /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled				//开启时显示为enforcing,将其改为disabled
登录后复制
  • 查看状态,成功关闭
[root@localhost ~]# getenforce
Permissive
登录后复制

远程访问

打开vnc-viewer,输入需要访问的ip和端口号即可进行访问,本文中使用的ip为:10.10.41.43::5901

以上是CentOS7.6服务器如何部署VNC的详细内容。更多信息请关注PHP中文网其他相关文章!

本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
2 周前 By 尊渡假赌尊渡假赌尊渡假赌
仓库:如何复兴队友
4 周前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
4 周前 By 尊渡假赌尊渡假赌尊渡假赌

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

如何在CentOS系统中通过命令行重启服务器 如何在CentOS系统中通过命令行重启服务器 Mar 05, 2025 pm 03:30 PM

本文说明了如何使用命令行重启命令重新启动CentOS服务器。 它强调保存数据并优雅地关闭应用程序的重要性,然后再使用Sudo重新启动以避免数据丢失。 潜在风险,包括

centos8怎么重启网络服务 centos8怎么重启网络服务 Mar 05, 2025 pm 03:29 PM

本指南详细详细介绍了在CentOS 8中重新启动网络服务的方法。它使用SystemCtl(推荐可靠性)与IFDown/IFUP进行比较(更快,更稳定)。 还提供了网络中断的故障排除步骤,涵盖Connecti

centos重启命令有哪些 centos重启命令有哪些 Mar 05, 2025 pm 03:28 PM

本文解释了CentOS服务器重新启动命令。 它着重于重新启动,以立即重新启动和关闭-R,以进行预定的重新启动,突出显示了每个重新启动的差异和最佳实践。 主要问题是提供明确的指示和骗局

centos7如何关机重启 centos7关机重启命令 centos7如何关机重启 centos7关机重启命令 Mar 05, 2025 pm 03:24 PM

本指南详细介绍了CentOS 7服务器的安全关闭和重新启动方法。 它强调使用关闭命令的灵活性和安排重新启动的能力,并将其与较不灵活的重新启动和停止命令进行对比。 安全的做法

centos官网入口 centos官网入口 Mar 05, 2025 pm 03:32 PM

本文讨论了CentOS的中断及其被CentOS流的替代。 它详细介绍了如何查找信息,下载和验证CentOS流ISO的完整性,该信息现在主要托管在Red Hat网站上。 社区支持

如何在CentOS中配置日志旋转? 如何在CentOS中配置日志旋转? Mar 17, 2025 pm 04:43 PM

本文介绍了如何使用Logrotate在CentOS中配置日志旋转,详细安装,配置以及磁盘空间管理和安全性等好处。

如何在CentOS中使用逻辑卷管理(LVM)来管理存储? 如何在CentOS中使用逻辑卷管理(LVM)来管理存储? Mar 17, 2025 pm 04:51 PM

本文讨论了使用CentOS中的逻辑音量管理(LVM)进行有效的存储管理,详细介绍了设置,扩展和备份/还原过程的步骤,并突出了LVM比传统分区的优势。

如何在CentOS上安装和配置MySQL/MariadB? 如何在CentOS上安装和配置MySQL/MariadB? Mar 17, 2025 pm 04:35 PM

文章讨论了MySQL/MariadB在CentOS上的安装,配置和故障排除,包括系统要求和安全措施。(159个字符)

See all articles