Creating a Home Server with Ubuntu Linux

I have had an old Pentium 4 computer sitting around for years that I never got rid of with the intention of setting it up as a server on my network.  This week I decided to take a stab at it.  As you may be aware, one of the challenging things for novice users of Linux is that it requires a fair amount of work using a command prompt instead of a graphical interface.  I was able to use the command line for some work, but also found a good GUI to help with the server setup.

I am still learning as I go, but I thought that it would be helpful for others that are looking for a server to post what I have done.  I am also looking for feedback and suggestions to help me learn more about what I can do to improve my system (feel free to comment at the end). 

The computer is hard wired into my router so all of the downloads and attaching via the network was pretty easy, I can’t speak for setting up a wireless connection to the server

Step 1

The first thing that you will need to do is get a copy of ubuntu server from ubuntu.com.  There are some guides to creating a server with ubuntu desktop on the web, although that would give you a GUI to make things easier, I didn’t want all of the extra software and packages cluttering up my system.

You can order discs from Ubuntu, but I don’t like to wait so I downloaded the ISO from Ubuntu here.  I started with the 64 bit version because it said for most configurations, but it would not work on my old Pentium 4 computer so I had to download the 32 bit version.

Step 2 (Skip this if you ordered CD’s)

Once you have the image file, it needs to be burned to a disc that you can use.  I used a dvd because I have plenty of them, but you should also be able to use a CD.  I like ImgBurn so I used that.  You just need to find the image file for Ubuntu Server that you downloaded and select “write image file to disc.”  After a few minutes it will eject and close the tray and verify the information and you’ll hear a tone indicating that the disc is complete.

Step 3

Insert the CD into the computer where you will be installing Ubuntu Server and boot it up.  The Ubuntu logo will start up and ask for some basic information, such as language and country.  I have a dual boot system with XP also on the computer so I had to tweak the manual partitions, most users will be fine using the guided installation.  If you have another OS on the system be sure that you do not overwrite the existing OS.

I found a good guide for the install process at Corey-M’s Blog.  I would suggest following those steps if you have any issues, although it is for the previous version of Ubuntu Server for the most part it is the same. 

Once the install was complete I removed the monitor and keyboard and logged into the command prompt from my Vista computer using Putty. 

Step 4

The next step was to install a program called Webmin to have a GUI system to perform tasks.  Again, I followed most of the information in Cory-M’s Blog.

When you download Putty you will get an .exe file, I saved it in My Documents so I will have easy access to it.  I had forgotten my server name (it was vaio) so I had to get the IP address to login, I found that easily by logging into my router admin to see the connected computers.  After you login with your user name and password it will look just like the command if you were working on the server itself.

To install Webmin enter the following codes at the command prompt:

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.441_all.deb

sudo dpkg –i webmin_1.441_all.deb

rm webmin_1.441_all.deb

You will now have Webmin installed which should cut down most or all of the command line work going forward.

Step 4

Login to Webmin, you should be able to use any computer on the network and enter

https://serveripaddress:10000

You can use the serveripaddress if you used your router to determine it for Putty.  I was also able to use my server name (vaio) followed by the :10000.  You may get errors about the security, I clicked OK in order to get to the site since I knew I was connecting on my internal network.

The next thing you will want to do is set your server to a static IP address.  Corey-M’s blog gives instructions for setting up port forwarding, which I did not do because I am only using the server within my home network.  I also was unable to set it up in my router, but I think it still makes sense to have a static IP for the server even if you are not forwarding.

You can do that in Webmin by choosing:

Networking –> Networking Configuration –> Network Interfaces –> eth0

Make sure you change the setting in the “activated at boot” tab, I made the mistake of entering it in the active tab before I realized there was another tab there.  You will most likely want to leave the first group of numbers and change the last group, it can be between 2-254.

As I stated, I did not do any of the port forwarding or SSH steps listed, but you may want to depending on how you are using your server.

Step 5

My server had two hard drives, but the second one was not showing up so I used Webmin to add it since it was easier than using the command line.

In Webwin select:

System –> Disk and Network File Systems

I knew that my harddrive was formatted for NTFS so I selected that in the dropdown box, and then chose add mount.

On the next page you have to choose the “mounted as”, click the browse button and select what you want to use.  I used “media” since that is what I plan to store on my server.

Select the Partition with id radio button and make sure you have the right partition in the dropdown.

Check the other mount options, make sure that Read-only is set to know if you plan to add and move files.

Click Create and you should see the new file system and location listed in the filesystem

Step 6

Now that you have the filesystem available and set up the way you want, we need to set up Samba so that Windows can see it.

In Webmin select:

Servers –> Samba Windows File Sharing

At the top of the list, select create a new file share

Browse to “media” if that is the folder that you want to share

Change permissions to 777 to make it read/write instead of read only

Click on Create and it should be in your list.

At this point you should be able to use your Windows computer to open the network, see you server listed as a computer and see the shared media folder. 

Now I could transfer my music and video files to the server instead of storing them on multiple PC’s within the house, but I still could not stream to my Xbox360 which was one of the main reasons I was looking to set up the server. 

If you are mainly looking for storage, you can probably stop here since you have access to the server from other PC’s on the network.  Through trial and error and using different information on the web this process took a few hours so I took a break knowing that I made good progress.

My next post will discuss how I added the media server to allow the xbox360 to see the files.  You will notice that there are a lot of options within Webmin, I am still testing and learning, feel free to send any comments or suggestions.

  • Share/Bookmark

4 Responses to “Creating a Home Server with Ubuntu Linux”

  1. Tutorial – Adding uShare to Linux Home Server for Xbox 360 Sharing Says:

    [...] my last post I installed Ubuntu Server and set up file sharing using Webmin and Samba so that my Windows [...]

  2. Add an External Hard Drive to Ubuntu Server | TechnologyCrowd Says:

    [...] I wanted to find out the location of the device so I opened up a terminal using Putty in Vista.  By typing dmesg at the command line you can verify that the device was plugged in.  [...]

  3. Update Ubuntu Server 9.04 to 9.10 | TechnologyCrowd Says:

    [...] from a Linux Desktop, but my normal choice is to use Putty from my Vista Desktop, see my post on Creating a Home Server with Ubuntu Server if you need more information regarding [...]

  4. Install Wordpress on Local Ubuntu Server | TechnologyCrowd Says:

    [...] I setup LAMP and Webmin on my system when creating the Ushare server most of the infrastructure was already in place including the Apache Web Server, MySQL [...]

Leave a Reply