Installing Debian GNU/Linux from Scratch on City Cloud

Özgür Bal City Cloud Leave a Comment

Setting up a new virtual machine on City Cloud is fairly easy. Once you have your account, you just go to the App Center on our control panel and select the operating system you’d like to install. We have many flavors of Windows, Linux and even FreeBSD.

These server templates give you the base install with everything ready to go in a matter of minutes. This is very snappy and convenient, but sometimes you want to install the operating system from scratch. Usually because you want more flexibility, you need to setup an advanced option or you would like to use an ISO image that’s not yet available on the App Center.

On this tutorial, we give you a step by step guide of how to do just that.

Getting Started

First thing you need to do is login into the control panel. We are assuming you already have an account with us, if you don’t, it’s very easy to do.

Once inside, pick the VM tab and select New VM. The following window will appear (click on any image in this tutorial to see an enlarged version). Skip to the next section if you already have a working knowledge of how to setup new servers on City Cloud.

As you can see, this popup is similar to the one you get when choosing one template from the App Center. The main differences are that you have to select an ISO image, which basically points to the installer you want to install (Ubuntu, Debian, Fedora Core, Gentoo, Windows Server 2008, FreeBSD, etc), and that you can select a disk other than the default (usually 20GB or 50GB). You also may select which advanced options you want to run on this virtual machine. Do not worry about the Hardware Template since that option is easily modified later on.  So, go ahead and name your server and complete the options and click on Create.

What follows is the usual provisioning process. You have to wait until the platform has located your resources, which varies from a couple to several minutes depending mostly on the size of your disk. Once the server is ready, it appears on the VM tab so just click on the details icon (last one on the right of the corresponding server row). This is what you get.

As you can see, there is no IP address detected since we don´t have an operating system yet. The only option available to do this is through VNC. Fortunately, our platform has an integrated VNC client, although you can use an external one of your choosing (i.e.: TightVNC viewer). To get in you need the corresponding credentials, which are located on the Remote Console tab, as follows.

Click on the icon on the bottom right (just about the Save button). This is a quick shortcut to the integrated VNC applet, which only asks you for the password. Use the one provided and we are off to a good start. Please note that you need the latest Java version installed on your computer, for this to work. In case you are using your own VNC client, you will need to specify the IP address, the port and the password.

Setting up

Here we are, the server just started with the Debian GNU/Linux installer welcome.

We recommend the basic install, since it´s the fastest one. On the next screens we need to pick our country or region. This is usually used for deciding the time zone and the locale. For your information, our datacenter is located on Sweden but you can select anyone you prefer, since the language and keyboard are selected separately. Also, don´t worry about this too much since it can always be changed later.

After the region and language selection, we get to setup the hostname. Choose any single word of your choosing.

Next, you will be prompted to setup the domain name. If unsure, just delete what´s there and leave it blank. Later on, when you have setup a proper domain name using our DNS servers (or yours), you will be able to configure it properly. For now, it doesn’t´t really matter since all Virtual Machines will automatically get a public IP address that can be used to access the server.

Next screen is the root password selection.

Make sure to type a strong password since this is the one account that can really mess up your system if used by the wrong hands. A strong password usually contains a combination of letters and numbers, uppercase letters and special characters.

After that, you need to setup a regular user. Just fill in the username and pick a password, make sure it´s different from the root one. Here comes the disk setup.

Now, this is one of those things that´s great about Cloud Computing, since the platform is already setup to handle the storage layer, we don´t have to worry about drivers or locating the disks. We just selected the size and how many at the beginning, and that´s about it. Here you have four options, three guided one and a Manual one for advanced users. We usually go for the first one.

After that, you are presented with a disk selection. If you have one, the answer is obvious (also, did we mention that you can add many disks afterwards? Well, you can!). Just pick the disk you would like to install the operating system. The following option has to do on how to partition the disk. You can select All files in one partition but we usually recommend using the “Separate /home partition” option since it´s a lot more easier to move the user homes partition to another disk if they grow in size.

Installing the base system

Great, we already have made all the basic adjustments. Now we get to the part where we actually install the system.

Just say no to CD/DVD selection and say Yes to the “Use a network mirror?” question, since we are going to install through the network, this option is much nicer since it gives us the latest packages.

As we mentioned, the datacenter and the servers are located on Sweden, so it only makes sense to choose a Swedish mirror. This will guarantee, alongside our redundant ISPs connected to the datacenter, great speed when downloading the packages.

In the subsequent screen, you get to pick the default packages that will be installed. Unless you are absolutely sure you need a Graphical environment, just deselect it. Also, make sure you have SSH server checked so we can continue using SSH immediately after the installation finishes, which is much faster than using VNC (and inherently more secure). Tip: You can use the spacebar on your keyboard to select/deselect packages.

Since the network is setup automatically with DHCP, which in turns gets you a public IP address, your packages will be downloaded and installed right away. This process should not take more than a few minutes, remember, we are on a fast network over here!.

Next, we need to tell the installer where the boot loader (a small program that loads up at boot time and select which operating system to boot) is going to be located. You could select a partition but it´s generally safe to install it on the master boot record so just say Yes to the question (unless you specifically need to put it somewhere else).

At this point, if everything went as expected, we should arrive at this final screen that tells you the installation is complete and that you should make sure to remove the CD-ROM. Don´t worry about that, the system will automatically boot from the hard disk. Just select continue and we are done.

Post installation and conclusion

That basically sums it up, the boot up process should take no more than a few seconds and will lead you to the following screen.

We are now ready to start using our new server with Debian GNU/Linux installed. On this case we used Debian 6.0 64-bit but the process is pretty similar to other versions.

From now on, you can check the VM tab, select your server details and write down the public IP address we´ve assigned for you. You can also start using a SSH client (i.e.: Putty) and the credentials you just typed during the installation process.

Remember that VNC is always available (unless manually disabled by you) if you need to check the server in the future and you cannot, for some reason, enter via SSH.

What you do from this point onwards is start setting up any packages or configuration your project, website or application requires. We recommend you to fiddle with the system as much as possible, given the flexibility our Cloud Computing platform provides.

Last but not least, this process is usually done on certain ocassions but you don’t need to do it every time, you can always clone another VM and start from there.