How to run a free Linux Virtual Machines in the Cloud with Windows Azure
Providing a guide for running a new Linux virtual machine in the cloud using our Windows Azure platform.
Windows Azure runs Linux VMs as a first-class citizen on our cloud platform, with support in the Preview offering for four common Linux distributions:
SUSE Linux Enterprise Server (SLES) 11 SP2
Ubuntu 12..04.1 and 12.10
Guide to building a Linux Apache Web Server VM in the Windows Azure Cloud
Let’s work through the process of provisioning a new Linux Apache web server running SUSE Linux Enterprise Server 11 SP2 in a virtual machine on the Windows Azure cloud platform.
1- You will need an SSH client installed on your PC, I highly recommend PuTTY.
2- Open Internet Explorer and browse to https://manage.windowsazure.com/ to enter the Windows Azure portal. Then, log in with your credentials.
3- In the menu located at the bottom, select New | Compute | Virtual Machine | From Gallery to start creating a new virtual machine.
4- On the VM OS Selection page, click Platform Images on the left menu and select the SUSE Linux Enterprise Server 11 SP2 OS image from the list. Click the Next button to continue.
5- On the Virtual Machine Configuration page, specify a unique Virtual Machine Name and Administrative Password to be provisioned for the new VM.
6- On the Virtual Machine Mode page, specify a unique public DNS host name that you’ll use to initially access this new VM remotely.
7- On the Virtual Machine Options page, accept the default values and click the Checkmark button to begin provisioning your new virtual machine.
8- You will be returned to the Virtual Machines page and your new virtual machine will be listed with a status of Starting (Provisioning) while it is being initially provisioned on the Windows Azure cloud platform.
9- After the new virtual machine has finished provisioning, click on the Name of the new Virtual Machine displayed on the Virtual Machines page of the Windows Azure Management Portal. This will navigate to a Dashboard page for this new virtual machine.
10- On the Virtual Machine Dashboard page, make note of the SSH Details. You’ll use this information to connect to the new virtual machine remotely via an SSH client to configure the Apache web server daemon.
11- On the Virtual Machine Dashboard page, click on the Endpoints link located in the top navigation area of this page. This will navigate to the Endpoints page for this virtual machine, listing all firewall endpoint traffic that is currently permitted inbound to this virtual machine.
12- On the Virtual Machine Endpoints page, click the +Add Endpoint button located on the bottom toolbar of this page. This will launch the Add Endpoint wizard.
13- On the Specify the details of the endpoint wizard page, enter a name (web-http), a public port (80) and a private port (80) in the respective fields.
14- On your PC, launch an SSH client, such as PuTTY, and establish a new remote SSH session to your virtual machine using the SSH details.
15- Because this is the first time connecting to this virtual machine, you may be presented with a Security Alert dialog box prompting you to accept the host key for securing this SSH session. Click the Yes button to accept this host key into your SSH client cache and continue with establishing the connection.
16- In the new SSH session window, authenticate with the Username and Password information recorded above in Step 4 above.
17- In the SSH session window, enter the following command to elevate your session for performing root-level administrative commands: sudo su –
18- In the SSH session window, install the packages needed for running the YaST2 setup and configuration tool by entering each of the following commands, pressing ENTER after each line:
zypper install yast2
zypper install yast2-ncurses
zypper install yast2-ncurses-pkg
zypper install yast2-qt
zypper install yast2-packager
zypper install yast2-runlevel
zypper install yast2-network
zypper install yast2-http-server
19- In the SSH session window, launch the YaST2 setup and configuration tool by entering the following command: yast2
This will launch the YaST2 Control Center menu-based setup and configuration tool.
20- In the YaST2 Control Center, press ENTER on the Software menu choice and then select Software Management by pressing ENTER again. This will launch the YaST2 Software Management tool.
21- In the YaST2 Software Management tool, press ALT+F to change the Filter type, select Patterns using your arrow keys and press ENTER.
22- In the YaST2 Software Management tool, press TAB to switch your cursor focus to the Patterns List and scroll down using your arrow keys until Web and LAMP Server is highlighted.
23- In the YaST2 Software Management tool, press ALT+T to open the Actions menu, then press ALT+A to select All Listed Packages, then press ALT+I to select the option to Install All. After this is completed, a + (plus sign) should appear next to each of the 9 selected packages.
24- In the YaST2 Software Management tool, press ALT+A to start the installation. Press ENTER when prompted for confirmation. Once the installation is complete, the YaST2 Control Center main menu will appear again.
25- In the YaST2 Control Center main menu, use arrow keys to select Network Services–> HTTP Server to configure the newly installed Web server. Press ENTER on the HTTP Server menu selection.
26- In the HTTP Server Wizard, press F10 on each screen of the wizard to accept default configuration values and finish the wizard.Once the configuration process is complete, the YaST2 Control Center main menu will appear again.
27- In the YaST2 Control Center main menu, use arrow keys to select System –> System Services (Runlevel) to start the Web server. Press ENTER on the System Services (Runlevel) menu selection.
28- In the YaST2 System Services (Runlevel) tool, use arrow keys to select apache2 in the Service list. Press ALT+E to enable and start the Apache HTTP daemon.
29- In the YaST2 System Services (Runlevel) tool, after the Apache Web Daemon is started, press ENTER and then ALT+O to accept the new Runlevel changes.
Disclaimer: Many of the articles are taken from MSDN, Azure tutorials and other sources on internet to provide a single place for various information about azure development.No copyright on this information is claimed and the copyright of all information is acrrued to all original authors including MSDN and Microsoft azure training materials.Some of this information shall be outdated or incorrect and the authenticty of the information contained should be verified with changes in azure or your own environment. We do not recommend using any of this information without proper consultation.