惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - Dave.Xu

查看当前文件目录 大小 centos 添加快捷 CentOS 7控制台屏幕分辨率问题 centos 安装 gnorme linux init centos 安装 x-windows centos 安装 jdk centos 安装 chrome CentOS 7 命令lsb_release: command not found解决方案 bing搜索路径 安装lsb_release 查询安装包 转载 Centos7 内核从3.10升级到4.12过程 linux 内核编译 How to Upgrade Kernel on CentOS 7 yum syntax to update all except Kernel centos yum update kernel vmware-installer uname
转载 CentOS 7安装GNOME桌面 和 配置 VNC 服务器
Dave.Xu · 2018-09-16 · via 博客园 - Dave.Xu

CentOS 7安装GNOME桌面 和 配置 VNC 服务器
这是一个关于怎样在你的 CentOS 7 上安装GNOME桌面 和 配置 VNC 服务器的教程。当然这个教程也适合 RHEL 7 安装GNOME桌面 和 配置 VNC 服务器。

1、安装桌面
yum check-update
yum groupinstall "X Window System" "GNOME Desktop" -y

2、设置默认启动图形界面
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

3、安装 VNC 服务器
yum install tigervnc-server -y

然后,我们需要在 /etc/systemd/system/ 目录里创建一个配置文件。我们可以将 /lib/systemd/sytem/vncserver@.service 拷贝一份配置文件范例过来。

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

4、配置VNC服务器
vi /etc/systemd/system/vncserver@:1.service
然后打开这个配置文件/etc/systemd/system/vncserver@:1.service替换掉默认用户名
找到这一行
ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i"
PIDFile=/home//.vnc/%H%i.pid
这里我直接用root 用户登录,所以我替换成
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid

5、重加载 systemd
# systemctl daemon-reload

6、VNC设密码
# vncpasswd

7、配置防火墙iptables或者firewalld
vim /etc/sysconfig/iptables
在合适位置加上
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT
重启iptable
service iptables restart

如果是用Centos 7 默认防火墙的可能需要
# firewall-cmd --permanent --add-service vnc-server
# systemctl restart firewalld.service

8、设默认启动并开启VNC
# systemctl enable vncserver@:1.service
# systemctl start vncserver@:1.service

9、重新启动服务器
reboot