Introduction to the series: “Azure ❤ Linux”, today we will show you how to install a Linux OS on Azure and some basic configuration. We will focus on CentOS because of popularity as well as compatibility with many other open source software:
First, we need to find out two things which are Azure and Linux:
– Azure: “Azure is an open and flexible cloud platform that enables you to quickly build, deploy, and manage applications across the Microsoft Data Center global network.
Azure is always ready and has a balanced load design and is capable of self-recovery when the hardware fails. You can use any languages, tools or platforms to build applications. And you can integrate your public cloud applications with the built-in IT environment. ”
– Linux: Linux is a kernel, or better understood as a platform, as a bridge between hardware and a real operating system (for Linux, which is often referred to as Linux distributions), create environment for smoothly run software. Here is an illustration of the structure of the Linux operating system:
Is Linux popular? Below we have the segments that Linux focuses on:
CentOS is a free distribution of operating systems based on the Linux kernel. It is derived entirely from the Red Hat Enterprise Linux distribution (RHEL). CentOS is built to provide an enterprise computing platform with 100% compatible binary with upstream, Red Hat. CentOS stands for Community Enterprise Operating System.
To install CentOS on Azure we first need to have an account on Azure (30 days trial license). How to create an account can refer to: http://www.fb.com/Tech4Student. Those who are students and have Microsoft Imagine can register to use Azure until expiration Microsoft Imagine:
After login to the admin page, we will see the following interface (this is the old Azure portal below, now we just can use the new portal).
Azure has many different functions to support programmer as well as business, our post is limited to the Virtual machine part.
Here we will guide you step by step how to create a virtual machines with CentOS operating system.
New -> Compute -> Virtual machine -> From Gallery (to be able to customize the virtual machine configuration), or can be created quickly when we choose Quick create.
New window will appear, there are many operating systems and applications integrated with the operating system (mostly Microsoft):
To install CentOS select the item: CENTOS-BASED then select the CentOS version you want to install:
Here we will choose version 6.7 is the upgraded version from version 6.6 with high compatibility with other software. Version 7 was recently released so compatibility is not very high. (Understand that Windows 7 runs more stable than Windows 8 and 8.1 if Windows Store is not included.)
Click Next (->) icon:
This is the part that will fill in the configuration information for the virtual machine: virtual machine name, TIER and SIZE are available configurations, moderate configuration to avoid your wallet being cleared before the end of the month. Enter the login name, AUTHENTICATION is to select the login method, there are two types are: SSH key and password, in this post I will use the password, the following I will be clear about the SSH key.
Here we will configure some other things, if you don’t require more advanced features of the virtual machine, you just need to modify CLOUD SERVICE DNS NAME (same as domain, if you install LEMP or LAMP, you can retrieve or export web directly through this item without registering another domain name). The next important item is ENDPOINTS: this is like the NAT port out the Internet, we just declare the port we use here and it will be accessible.
This is the last step, it is the notification to install some other Extension, you can choose the default or uncheck it also. Note that on the right hand, there are statistics what you have configured for the virtual machine, if true, click Next to install, if not correct, then click Back to fix it. In the LOCATIONS section you can have many different areas, this is Microsoft’s CDN technology. It will help your data is not lost if the server at your installation location has a problem (It is the same as RAID, but much more advanced).
Once completed, it will take a few minutes to initialize the virtual machine.
You can go to the Dashboard to see detailed virtual machine information:
You can add hard drive (ATTACH), backup drive (CAPTURE), delete, monitor, configure End Point, edit configuration (CONFIGURATE) ….
After creating the virtual machine, the next thing is we will remote the virtual machine by using SSH.
The easiest way is to use the software: PuTTY to remote, enter public DNS or IP information to the remote:
Remote: we use the username and password declared at the time of initialization to login:
Here you can install anything on the virtual machine just created, with who do not know about Linux, we will guide you to install the interface package that you can use as using windows:
– Install interface using the following command:
+ Check the operating system using x86 or x64 using the following command:
# uname -r+ Add EPEL repositories to download extra packages:
# sudo yum -y update
# sudo yum -y install epel-release
RHEL/CentOS 6 32-Bit
# sudo wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# sudo rpm -ivh epel-release-6-8.noarch.rpm
RHEL/CentOS 6 64-Bit
# sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# sudo rpm -ivh epel-release-6-8.noarch.rpm
+ Check epel repository:
# yum repolist
+ Install interface package:
# sudo yum -y groupinstall “Desktop” “Desktop Platform” “X Window System” “Fonts”
# sudo yum -y groupinstall “GNOME Desktop” “Graphical Administration Tools”
# sudo reboot
+ To be able to remote desktop need to install the following packages:
# sudo yum install -y xrdp
# sudo service xrdp start
# sudo chkconfig xrdp on
+ Move to root user and change root password:
# sudo su –
# passwd root
Add port to Endpoints to remote desktop:
Remote by “remote desktop” software on Windows or “remmita” on Linux … with root user.
We have the result:
Editor: Technical Communication Management Team of MSPVN
Author: Nam Pham Hoai – Microsoft Student Partner Vietnam