Use VNC to remotely manage VPS (centos System)

Source: Internet
Author: User
Tags vps

First, install the desktop environment. I chose xfce, lightweight desktop, which is small and practical and does not occupy too much memory (xfce <Kde, Kde <gnome ).

No xfce exists in the default centos source. First install the epel source and then install the desktop:

wget http://download.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm  rpm -ivh epel-release-6-8.noarch.rpm  yum groupinstall xfce 

After the desktop is installed, the vncserver is installed. Now we know that the VNC in centos is tigervnc. Because it is a server, we only need to install tigervnc-Server:

yum install tigervnc-server

After the installation is complete, start the configuration. Now, take the root user as an example:

vi /etc/sysconfig/vncservers

Add at the end

VNCSERVERS="1:root "VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp"

Then, set the password for the vncserver:

vncpasswd

Start VNC service

vncserver

Modify configuration file

vi /root/.vnc/xstartup

Replace the content with the following:

#!/bin/sh/usr/bin/startxfce4

After saving, add the execution permission to xstartup:

chmod +x ~/.vnc/xstartup

After the configuration, restart the vncserver:

service vncserver restart

Run the following command to check whether port 5901 is Enabled:

netstat -lptn

Note that if the port is opened but cannot be connected, you must set firewall rules. Otherwise, the port 59xx cannot be connected.

Use VNC to remotely manage VPS (centos System)

Related Article

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.