发布时间:2022-09-07 04:30
在Rocky linux8.5下安装vncserver。
首先更新一下系统:
dnf upgrade
查看可用的包组:
dnf group list
得到下面的显示:
Available Environment Groups:
Server with GUI
Server
Workstation
Virtualization Host
Custom Operating System
Installed Environment Groups:
Minimal Install
Available Groups:
Container Management
.NET Core Development
RPM Development Tools
Development Tools
Graphical Administration Tools
Headless Management
Legacy UNIX Compatibility
Network Servers
Scientific Support
Security Tools
Smart Card Support
System Tools
安装 Gnome 桌面,Gnome桌面包含在“Server with GUI”里面:
dnf groupinstall "Server with GUI" -y
安装vncserver:
dnf install tigervnc-server
复制文件:
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:2.service
#这里的数字是启动vnc的端口号,我用的2表示端口号是5902,也就是加上了一个5900
修改模板文件,替换其中的[Service】部分:
vim /etc/systemd/system/vncserver@:2.service
[Service]
Type=forking
User=root
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
设置vnc密码,这里输入两次密码,然后键入n,表示不启动单独查看用的密码:
vncpasswd
启动vncserver:
systemctl start vncserver@:2.service
最后不要忘了在相应的防火墙打开外网对5902端口的访问
【云原生&微服务>SCG网关篇五】Spring Cloud Gateway自定义网关路由Predicate
技术大咖才会的技能:Python+Selenium+pytest自动化框架
IDEA 2022专业版创建Java Web项目(保姆式小白讲义,强烈建议入手!)
【开源】DA14580-SPI教程——疯壳·ARM双处理器开发板系列
实验报告: 人脸识别方法回顾与实验分析 【OpenCV测试方法源码】
VMware设置Ubuntu分辨率为1920*1080(16:9)
Pycocotools 报error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Bui