One of the Azure Linux virtual machine image configurations: CentOS configuration

Source: Internet
Author: User

This article focuses on how to install the graphical interface for CentOS virtual machines on Azure. The system version used in this article is CentOS6.8.
1. Prepare the installation environment
Because you need to use the root account to install the graphical interface, you need to set the root password before you start, and then use the command Su-switch to root. As shown in the following:

Use the sudo passwd root command to set the root account, enter the password and enter the password again. If you set the password too simple, you will receive a hint that is too easy. After the password setting is complete, use Su-
The command switches to the root account, enters the Su-command and returns, asks you to enter the password (the password of the account you created when you created the Azure virtual machine).
Enter Yum grouplist to view the available software collections.
2. Install the desktop environment
First run the Yum groupinstall-y ' X Window System '

Then run the Yum groupinstall-y "Desktop"--skip-broken

Installation Complete

3. Installing VNC Server
Install TIGERVNC using the Yum install-y tigervnc* command

TIGERVNC Installation Complete

Installing Libxfont

Complete the installation of the Libxfont

Installing Pixman, xterm, XORG-X11-TWM

Complete Pixman, xterm, XORG-X11-TWM installation

4. Setting up VNC Server

Use VI to edit/etc/sysconfig/vncservers, insert two lines of content
Vncservers= "1:root"
vncserverargs[1]= "-geometry 800x600"

Setting up a VNC password
To set the VNC password using the VNCPASSWD command

Set Cento s resolution
Open/boot/grub/grub.conf, preferably add a row of parameters in the file vga=789
vga=789 means 800x600,16m color

5. Start the VNC service
Use the vncserver:1 command to start the service. Note: There are spaces before 1, such as

6. Configuring NSGS
You need to set the NSG to allow Port 5901 inbound. In the virtual machine network, add the add-on port rule, see

Enter 5901 in the port range, name input VNC

The graphical configuration of the CentOS virtual machines in Azure is good. Then download and install the VNC Viewer to connect the CentOS virtual machine in Azure in a graphical way.
In the VNC Viewer, fill in the server+ port number you want to connect to, such as the IP of the CentOS machine I experimented with is 52.187.145.18, the connection configuration as

After clicking Connect, prompt for no encrypted connection

Continue can do it.
Then enter the password and confirm OK

Successfully connected to a CentOS virtual machine in Azure, such as

One of the Azure Linux virtual machine image configurations: CentOS configuration

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.