简体   繁体   English

AWS CentOS 7 尝试安装无法启动 VNC 服务器:超出配置的资源限制

[英]AWS CentOS 7 trying to install failed to start VNC server : with configured resource limit was exceeded

i followd this tutorial:我遵循了本教程:
https://www.tecmint.com/install-and-configure-vnc-server-in-centos-7/ https://www.tecmint.com/install-and-configure-vnc-server-in-centos-7/

to install desktop and connected it via vnc from my windows PC using VNC viewer but im getting this error in the: sudo systemctl start vncserver@:1 stage im doing all from my user centos which is the main user im using with sudo enabled: my /etc/systemd/system/vncserver@:1.service looks like this:安装桌面并通过 vnc 从我的 windows PC 使用 VNC 查看器连接它,但我在以下位置收到此错误:sudo systemctl start vncserver@:1 阶段我正在从我的用户 centos 做所有事情,这是我使用启用 sudo 的主要用户:我的/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 centos -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

this is the info:这是信息:

-rw-r--r--. 1 root root 1828 Apr  6 16:25 /etc/systemd/system/vncserver@:1.service

now im trying to start the vnc server:现在我正在尝试启动 vnc 服务器:

[centos@ip-10-0-0-111 ~]$ sudo systemctl daemon-reload
[centos@ip-10-0-0-111 ~]$ sudo systemctl start vncserver@:1
Job for vncserver@:1.service failed because a configured resource limit was exceeded. See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.

what can be the problem?可能是什么问题?

1- change Type=forking to Type=simple 1-将Type=forking更改为Type=simple

2- change to PIDFile=/home/ centos /.vnc/%H%i.pid 2-更改为 PIDFile=/home/ centos /.vnc/%H%i.pid

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM