Answer the question
In order to leave comments, you need to log in
How to install VNC server on CentOS 7?
1. Install desktop: yum groupinstall "GNOME Desktop".
2. Install tigerVNC: yum install tigervnc-server xorg-x11-fonts-Type1.
3. Create a VNC file: cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]:5.service.
4. I connect via SFTP and in Noterpad++ I edit the [email protected]:5.service file as required.
5. I open port: 5905.
6. I create the required user and set a VNC password for him with the vncserver command.
7. I reboot the daemon: systemctl daemon-reload
8. I start VNC: start [email protected]:
5.service See 'systemctl status [email protected]:5.service' and 'journalctl -xn' for details.
I execute the command: systemctl status [email protected]:5.service.
She outputs this:
[email protected]:5.service - Remote desktop service (VNC)
Loaded: error (Reason: Bad message)
Active: inactive (dead)
Nov 26 19:42:57 p339551 systemd[1]: [/etc/systemd/system/vncserver @:5.service:10] Unknown lvalue 'WantedBy' in section 'Unit'
Nov 26 19:42:57 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:11] Missing ' ='.
Nov 26 20:09:00 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:3] Failed to add dependency on network.target[Service], ignoring: Invalid argument
Nov 26 20: 09:00 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:4] Unknown lvalue 'Type' in section 'Unit'
Nov 26 20:09:00 p339551 systemd[1]: [ /etc/systemd/system/[email protected]:5.service:6] Unknown lvalue '
Nov 26 20:09:00 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:7] Unknown lvalue 'ExecStart' in section 'Unit'
Nov 26 20:09:00 p339551 systemd[ 1]: [/etc/systemd/system/[email protected]:5.service:8] Unknown lvalue 'PIDFile' in section 'Unit'
Nov 26 20:09:00 p339551 systemd[1]: [/etc/systemd/system /[email protected]:5.service:9] Unknown lvalue 'ExecStop' in section 'Unit'
Nov 26 20:09:00 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:10] Unknown lvalue 'WantedBy' in section 'Unit'
Nov 26 20:09:00 p339551 systemd[1]: [/etc/systemd/system/[email protected]:5.service:11] Missing '='.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question