Centos7 tigervnc installation experience

Source: Internet
Author: User

Centos7 tigervnc installation experience

1. If tigervnc is installed for the first time, skip the precautions;

2, if you have installed before, pay attention to the points: view the/tmp/. X11-unix directory, delete the X [1-9] File, note that X0 can not be deleted;

Installation steps:

1,Yum install tigervnc-server;

2. Create a userUseradd 000; if an existing user is used, check whether the. vnc directory exists in/home of the user. If yes, delete it;

3,Cp/lib/systemd/system/vncserver @. service/etc/systemd/system/vncserver @: 1. service. Note that this 1 parameter may not be set here and needs to be determined by the subsequent steps;

4,Vi/etc/systemd/system/vncserver @: 1. service,Edit the content in vncserver @: 1. service:

[...][Service]Type=forking# Clean any existing files in /tmp/.X11-unix environmentExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'#ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"#PIDFile=/home/<USER>/.vnc/%H%i.pidExecStart=/sbin/runuser -l 000 -c "/usr/bin/vncserver %i"PIDFile=/home/000/.vnc/%H%i.pidExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
You can leave it unchanged elsewhere;

5. add firewall rules

Firewall-cmd -- permanent -- zone = public -- add-service vnc-server
Firewall-cmd -- reload

If the system prompts that firewalld is not started, run firewalld to start the firewall and then run the preceding two commands;

6. Switch to 000 users

Su-000
Vncserver

[Srijan @ server1 ~] $ Vncserver

You will require a password to access your tops.

Password:<-- Yourvncpassword
Verify:<-- Yourvncpassword
Xauth: file/home/srijan/. Xauthority does not exist

New 'server1 .example.com: 1 (srijan) 'desktop is server1.example.com: 1

Creating default startup script/home/kishore/. vnc/xstartup
Starting applications specified in/home/kishore/. vnc/xstartup
Log file is/home/srijan/. vnc/server1.example.com: 1.log

Pay attention to this "1" here. If the result is not 1Vncserver @: 1. The service is changed to the corresponding value. The reason is unknown;

7. Set startup

Systemctl daemon-reload

Systemctl enable vncserver @: 1. service

Systemctl start vncserver @: 1. service

If Error Code 98 appearsVncserver @:1Change forking in. service to simple;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.