| Setting Up a Home File Server Part 2 March 28, 2008 at 12:45pm in tech |
Last week I showed you how to set up a home file server using Ubuntu Linux, this week I'll show you how to do the same thing only this time using Microsoft Windows XP. The first thing you need is to make sure that your system has the minimum system requirements to run XP. They aren't nearly as high as Vista's so you should be okay. Processor: 300MHz AMD/Intel Those of course are the minimum requirements, personally I would reccommend the following Processor: 600MHz AMD/Intel The first thing to do of course would be to install Windows XP, so put your XP disc into the drive and turn on your PC. After it gets past the BIOS, it should prompt you to press a key to enter setup. So press a key and enter setup. **Note: If it doesn't prompt you, it probably means its trying to boot off the hard drive first, in which case you need to go into the BIOS and change the boot order. See your motherboard or PC instructions for how to do that on your individual machine. So go on through the setup and follow the prompts. When it gets to the hard drive partitioning and where to install Windows, set aside 10-20GB for the Windows partition leaving the rest for data storage, we'll set that up later. For the rest of the setup, just follow the prompts as they're presented to you. Make sure to note what you named your computer. Ok, I'm now going to assume you completed the setup and are now looking at your Windows Desktop. The first thing you're going to want to do is install Anti-Virus software. If you have your own, go ahead and use that, otherwise feel free to try out ClamWin, its free and pretty good. Make sure to get the latest virus definitions. The next thing to do is to install all of the updates for XP. You can just go to Microsoft Update to do that. Make sure to go there several times and restarts later to make sure you have all the updates. (yes it's annoying but sadly unavoidable) I'll now assume your computer now has antivirus installed and all the latest updates so we're ready to go. If you right click on My Computer and click Manage, the computer management window pops up.
Click on Disk Management towards the bottom. You'll be presented with the disk management tool.
You should see your C partition and next to it you should see unpartitioned space. (it won't look just like mine so don't worry) You want to right click it and select Format. Create a partition on it taking up all the free space. The partition should be Primary NTFS partition. Let it do its thing and when its done, you should have a new drive letter for the partition. Ok, now that your data storage partition is all set up, open up My Computer. In the Tools menu at the top, select Folder Options. In the View tab, scroll all the way to the bottom and uncheck Use Simple Sharing. Apply your changes and close the box. Now go into your data partition and create the folder structure you want to set up. Once you have all the folders created, right click on the folders you want to share and click on Sharing and Security. Give your share a name. You can give it a comment too if you want, but its not required. Next thing to do is to click the Permissions button.
You can leave Everyone there if you want, just make sure to only give read access. Otherwise just click Everyone and then click Remove. Now you need to add your user. First, click the Add button.
Type in your username and then click OK. Now we want to give your user the ability to write to the share. If you don't need or want this, ignore the following step. Click on your username and click the checkbox Full Control. All the boxes should then be checked under the Allow column, so hit Apply and then OK. Repeat the steps on any other shares you want to make, just make sure you note the share names. OK, your server is pretty much all set up, all you now need to do is map them on your normal machine. From last week here's the set of instructions. In windows, go to Start - Run and type in: \\servername\share Where servername is the computer's name, which you set during the install process. So for my photo share if I named my server "Darker" then I would enter: \\darker\photos This should then ask you for a username and password (the one you set up using the smbpasswd command earlier), or if your windows username and password are the same as the samba username and password you set, then it should just bring up an explorer window with your share. In Windows, you have the option of mapping shares to drives so a share would be given an actual drive letter like a hard drive and DVD drive are given. To do this, right click on My Computer and select 'Map Network Drive'. The following dialog box should come up.
The first field will let you choose which drive letter to assign it to, it doesn't matter so pick one. (it won't let you choose one that's already in use). The second field is where you type in your share name, which we went over in the last paragraph. The final checkbox determines whether the share should connect every time you log in. Since I'm going to assume that you want to be able to access the share all the time, you can just leave it checked. Just click 'Finish'. If it asks for a username and password, then enter it, otherwise it should pop up an explorer window showing the contents of the share. So there you have it, you now have your very own file server to host your files on. While this may sound obvious to some, in order for people to be able to access the shares you create, you must keep the server turned on. Again, if you have any questions, comments, need clarification, or have an alternative method, feel free to let me know. |
| 3 Comments |
| Setting Up a Home File Server Part 1 March 20, 2008 at 1:20am in tech |
Computers are starting to get cheaper nowadays and many people are upgrading, and getting new computers leaving them with older desktops that either are just thrown out or left sitting around collecting dust. One use for these computers is to run as a home server for the family or the individual. Servers don't need to have the latest hardware so that makes the older computers the perfect candidate to be turned into a server. Servers have a whole range of possible functionalities, the most popular for home use being a file server where all can share their files in a central location. All a server really needs is some hard drive space and a network card (along with functional components, but for this, I'll assume that the computer works). I would recommend at least 100GB of hard drive space, the more, the better, but 100GB should do for starters. The first choice is what operating system will it run. If you're more comfortable with Windows and the desktop will run XP, you can go with that. The other choice is Linux, which as I've stated before has become significantly more easy to use, and in my opinion Ubuntu is the perfect candidate for this. Linux does have a slight learning curve, but its nothing that can't be overcome with some time and effort, so if you're willing to try it, Linux makes a perfect candidate to run as a server. I chose Ubuntu to set as the Linux distribution for this tutorial. Windows 2000 can also be used, but I would strongly recommend Ubuntu over Windows 2000. And if you're worried that if you host a file server under Linux, Windows and OS X won't recognize it, worry no longer, the shares will be accessible for all operating systems. Ubuntu Linux 7.10 Ubuntu Linux 7.10 Gutsy Gibbon is Ubuntu's latest version of their popular Linux Distribution and it's a pretty good one. The first thing you want to do is go to http://www.ubuntu.com and download the i386 desktop CD. I'd say the server version but I want to gear this tutorial to a basic user so it'd be a help for them to have a graphical desktop to help them out. Once you finish downloading the .iso file, burn the image to a CD using your CD burning software such as Nero or Roxio. Okay, now you have your CD burned so insert it into your CD drive and boot your computer up from the CD. At the initial menu, choose the option to Install Ubuntu. This will actually start Ubuntu as a live CD which means that you will be able to see basically how your system will look when its all finished. Keep in mind though that any changes you make won't be saved at this time. When you're ready, you should see an icon on the left of your desktop that says "Install". Double click on that to bring up the installer. Follow the prompts and choose the selections until you get to the partitioning menu. Make sure to note what you named the computer in the Hostname field. I don't have any real way to actually get screen shots for you easily so here's a link that will help with the entire setup, including partitioning. http://psychocats.net/ubuntu/installing My personal recommendation is that you set aside double the amount of RAM you have (so if you have 512MB of RAM, use 1GB) for your swap partition, give 10-20GB for the root (/) partition and then use the rest for data storage. You have to choose a name for the mount point which must begin with the forward slash (/). I mount my drives as '/data1', '/data2', etc but you can choose whatever names you'd like. The swap partition should be formatted as 'swap' and the others are probably best formatted as 'ext3'. After this just follow the prompts and let the system install. Ok, I'm now going to assume that the system is all installed, you rebooted and are now looking at your brand new Ubuntu desktop. The first thing you're going to want to do is to get the file share tool up and running. To do this, open up your terminal and type in the following sudo apt-get install samba smbfs It's going to prompt you for your password. That command will download and install Samba and the Samba file system. The next thing you will need to do is set up the shares. Now is the time when you have to decide how you want to arrange your files and shares. You can share multiple folders so don't worry about trying to fit all the folders and files into one folder if you want to organize it differently. If you open up your home folder, and then click on Filesystem, you can then navigate to where you mounted your data partition during the install. you can create folders in here for the directories you want to share, just remember what the locations are. The next part we're going to do the old fashioned way because I've always had more success this way so bear with me. The way I configure my shares is through the configuration file. It may sound difficult, but its actually not terribly difficult so bear with me. The first thing we want to do is to set up a samba user account. This is necessary for other computers to be able to connect as it sets up the credentials. First navigate to samba's directory. Open up a terminal window and type: cd /etc/samba when there type the following command to add a user to the list: sudo smbpasswd -a username The first thing its probably going to ask for is your password for the server itself. The next two prompts will be for you to enter the samba user's password and then to re-enter for confirmation. After that is done, the user is all set up and you're ready to go set up the shares themselves. In the same folder you're in now, you should see an 'smb.conf' file. This is the file you need to edit to add the shares. The first thing you should do is create a backup of it just in case something goes wrong, so run this command: sudo cp smb.conf smb.conf.backup This will create a backup file called 'smb.conf.backup' in the same directory should something go awry. Ok, now lets get into the actual configuration. Type in the command: sudo gedit smb.conf This will bring up a text editor to edit the file in. scroll all the way to the bottom of the file. This is where you're going to put the shares. It's important to know that each share will follow the following template: [share name]
One more comment, on the writeable section, you want to put yes if you want users to be able to write to the share (aka delete, move, copy files to). If all you want is just for a read-only share, then by all means put no instead. So now lets show an actual example. Lets say I want to share a family pictures folder with other computers in the house. I want people to be able to copy their photos into the share and be able to view the pictures. Let's also say that I created a directory /data1/photos to store the pictures. Here is how I would add the entry into the smb.conf file [photos]
That's it, not too hard at all, right? You can add all the shares you need to just make sure to put the share name in [ ] brackets to separate them. After you're done with that save the file and close the text editor. You should be brought back to the terminal window. There's one last thing you need to do in order for it to work. You need to restart the samba server for the changes to take place. To do so, just type the following command: sudo /etc/init.d/samba restart It will tell you that the samba service is stopping and then starting back up. Once you get to a prompt, thats it, the shares are all set, so go ahead and give it a try. In windows, go to Start - Run and type in: \\servername\share Where servername is the computer's name or hostname, which you set during the install process. So for my photo share if I named my server "Darker" then I would enter: \\darker\photos This should then ask you for a username and password (the one you set up using the smbpasswd command earlier), or if your windows username and password are the same as the samba username and password you set, then it should just bring up an explorer window with your share. In Windows, you have the option of mapping shares to drives so a share would be given an actual drive letter like a hard drive and DVD drive are given. To do this, right click on My Computer and select 'Map Network Drive'. The following dialog box should come up. The first field will let you choose which drive letter to assign it to, it doesn't matter so pick one. (it won't let you choose one that's already in use). The second field is where you type in your share name, which we went over in the last paragraph. The final checkbox determines whether the share should connect every time you log in. Since I'm going to assume that you want to be able to access the share all the time, you can just leave it checked. Just click 'Finish'. If it asks for a username and password, then enter it, otherwise it should pop up an explorer window showing the contents of the share. So there you have it, you now have your very own file server to host your files on. While this may sound obvious to some, in order for people to be able to access the shares you create, you must keep the server turned on. Some other uses for your server could also be as a MySQL database server, an Apache/PHP web server, if you're a developer, a subversion repository, as well as countless other possibilities. If any of this peaked your interest, feel free to do some research into them, Linux has a lot of potential that if you choose to put some time into, you can unlock. Also if you're brave enough, you can set up an ssh server on your server so you can access your server's terminal remotely. Next week, I'll go over how to create a server using Windows XP as the operating system. If you have any questions, need clarification, have comments, or have an alternate way of doing things, or more insight or help, then please, comment and let me know. Tags: ubuntu, linux, fileserver, howto |
| 2 Comments |






