This post covers the basics of installing and controlling an Ubuntu server on a Windows host machine. Once you play with it and you become proficient on your machine you can rent a remote server and do more interesting things like publishing your site.
A 32 MB minimal image for Ubuntu can be retreived here and 14.04 normal and server CD are here. On Windows 8.1 64bit I was unable to install regular distribution due to IO errors. Minimal and server went OK.
puttygen.exe (separate download) can be used to generate a ssh key.
Once the key is generated it also needs to be exported in OpenSSL
and saved inside
%USER_DIR%\.ssh\id_rsa so that git can pick it up.
VMware player can be used in Windows.
To install the new operating system you will need to use the virtualization method of choice. Create a (dynamically expanding) 20 GB virtual hard disk, insert the .iso file and install following the on-screen guide.
The server installer also allows some pre-made stacks like LAMP to be installed. I chose not to so I was forced to install everything by hand. The minimal installer offered the option to install a basic server so I went for it.
I started with customary
sudo apt-get update sudo apt-get upgrade
in the server (the minimal installation is already up to date) then I copied the virtual hard-drives so that I don't have to install Ubuntu every time I need a fresh installation.
sudo shutdown 0
ssh access I installed OpenSSH server on Ubuntu machine:
sudo apt-get install openssh-server
After this point I was able to use ssh to access remote machine using its ip.
To discover the IP use
ifconfig in Ubuntu terminal.
While installing an initial user is going to be set-up. Additional users can be created using:
sudo adduser new_name
and following the on-screen instructions.
To prepare a user for ssh access:
su git cd ~ mkdir .ssh && chmod 700 .ssh touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys sudo chmod -R 0750 /home/new_name
Save your ssh key inside
echo "ssh-rsa ... rsa-key-20141025" >> ~/.ssh/authorized_keys
... with your actual key.
/etc/ssh/sshd_config we may want to allow access to certain users.
Add a line like:
AllowUsers john mary ghiury
Now fire MTPuTTY, add the address of the server and credentials and you are in control of your server.
What can you do with your new shining server? Here's some ideas: