Also a nice solution to quickly set up a server is "amahi". Nice piece of software which runs on Fedora. Simply google it, should be the first hit. They also offer a free dns service for your box then.. But if you like to do things your own and keep it rather simple: nice guide!
Nice tutorial: easy, clean and simple to remember. Anyway, I still have to remind everybody that "Ubuntu" means "I'm not able to setup Debian" :) It's not a bad distro, but it is surely better when working with GUIs. Ubuntu Server should fit way better to a fileserver, also if it's still too much if you don't need to work in a cloud. Thank you anyway :) It's a great job and it will help many people getting them closer to the linux world :)
Love it! Now this is a tutorial I can forward to my friends-n-family. Not only that... I am also glad it's not a "Slide Show" type click <NEXT> tutorial. Thank you for that as well!
ageoflightwaves
And that's the reason kids, why you need an computer scientist to configure your server. Please think about these facts: 1. Use Debian (30 minutes) 2. Learn all about configuration files and use them(3 to 8 weeks) 3. Close ports (1 hour) 4. Change most used ports (20 minutes) 5. Test your system (4 hours)
This is a nice and simple layout of something that can be intimidating to many. However, I do agree with Dan Dart that installing a distro meant for a desktop with a GUI is pointless, especially for a headless server. I've used Debian (which Ubuntu is based on) which has the GUI or NO GUI options.
Otherwise, I like your approach here, very straightforward.
Wow..!Gr8. nice information...I never found such info before...
anDREW
I'm having a problem with step 5. Once I replace the contents of proftpd.conf and try to restart the server, I get the following error:
- Fatal: unknown configuration directive 'DisplayFirstChdir' on line 22 of '/etc/proftpd/proftpd.conf'
How can I fix this?
geoff
Can't figure out an error on proftpd restart, "Fatal: unknown configuration directive "DisplayFirstChdlr" on line 23. I've tried commenting it out & deleting it, and the same error reappears on restart. What am I doing wrong here?
Why not Ubuntu Server or Debian? It's foolish to install a desktop oriented distro on a server.
Clain
Bloody fool DAN Dart.. This tutorial is for novice guys... we are not going to set up gamil or rapidshare.. its a simple file sharing.... for that we do not need a server OS.... he he he
Me
I agree with Dude, FreeNX rocks.
HeLLFiRe
Or just use Ubuntu *SERVER* Edition! Why have a GUI if you are only going to ssh into a command prompt. Save the resources for other things!
Fred
I thought I could share my experience to answer some of the questions posed here.
1. I set this up using Ubuntu so yes ... other distros work ... at least w/ Ubuntu versions.
2. I modded the copy paste for like this:
-- added the * for the missing arguement as per old file this replaces. #Deny|All TransferRate RETR 50
---- Added to finish file w/ clse as per old (original) again.
That fixes glycolized's problem w/ proftpd.conf
Moe ... your IP address can be found by going to the home page of your router (or at least mine does ... I've only really played with mine) but prob same. I have 2 XP machines, Vista box and PIII running Ubuntu and all IPs are listed. I used port 22 as is -- just type in ip.
Lastly, remember step to mod samba.conf w/ your info ... I didn't first time around and had to do so. Cool though because I did it from terminal from Vista machine. Again ... checkout the original samba.conf file for what to enter (unless u named workgroup diff than WORKGROUP -- Obviously).
Fred
Sweet ... learned lots, thanks.
Nico
Can this be used to make a team fortress 2 server?
Yaro
Sorry, I wouldn't use Ubuntu on a server. The problem is that Ubuntu is built to be a desktop... and the server edition isn't that effective a repurposing.
Here's a sad cold fact about operating systems: When one is designed to be a desktop... it'll be crappy at being a server even with the appropriate tools installed because down at the low level it still wants to be a desktop.
That's why Windows Server stinks at running servers effectively and securely: It longs to run a desktop, not a server. Same goes for Ubuntu.
This is why I like core-installing Linux distributions like Arch. They're not built or configured to be anythign of particular at first. Just to be LINUX at its core. This allows Arch to be turned into a desktop solution, media center, server OS, embedded system, whatever you want.
The wiki beats the Ubuntu wiki easily, too. Very easy to get help on how to do something.
On top of that Arch assumes NOTHING. It wants you, the user, to configure it. Meaning that it can, whenever you install something, be minutely purposed toward the end goal of the system.
Same goes for server operating systems wanting to be a desktop. I wouldn't use Red Hat or CentOS on a desktop context.
At the very least you should start with the server edition of Ubuntu, not the standard.
akman
can someone please help me?
Section 5 like state has an error in the config. It isn't closed and there is not argument defined for directory. I need to know how to close the directory. I've been stuck here for quite awhile.
Thanks
justme
Or just use a purpose built linux like smeserver. See http://wiki.contribs.org just burn a CD boot from it and answer a few questions. Then manage your server with a web interface.
I wouldn't install an FTP server. After you get the SSH server installed you can use SFTP, which is uses SSH to handle File Transfers. Ftp uses no password encryption.
evan
it says download Xubuntu, would this be the desktop version or the server version? PS i know nothing about Xubuntu.
glycolized
Awesome...until I couldn't get past step five.
Someone above mentioned "missing arguments", and that is the error I have with that last step (restarting) ftp. I have no clue where to go from here.
Well, it's been fun for about 30 minutes or so!
Moe
I've followed all the instructions with no problem till the end. How do I connect to my new server from my windows PC? I tried your instructions they dont work. Whats my new IP address? Would it be localhost? Or would it be the IP address i get my typing in google whats my ip address. Or is the IP of my router, which is the generic 192.168.1.1? What about all the ports? 22? 21? 5901? 5900?
Can someone please explain this in detail for me.
MeeMeesiko
This is reall cool. I remember a friend of mine telling me that this kind of thing wasn't too difficult to set up. Looks like he was right.
I don't really have a use for a server, though. :P
FreeNX is my recommendation for a headless server. Way better than VNC.
knockNrod
I'm guessing here, but this tut is probably intended to appeal to windows users. NFS will frustrate users that aren't accustomed to the locking mechanisms, but there'd be no reason not to add it in addition to, rather than instead of.
It is bass-ackwards over using the GUI, but I never would have learned linux if it weren't for being able to start somewhere. Again, most non-linux users (the vast majority of people), would be frustrated within the first 10 minutes and move on. Using Xubuntu ensures a much higher rate of success.
There are a few, minor consequences of an amateur putting this directly on the internet. Ignoring the first in (I believe) a decade vulnerabilities mentioned in the press, linux doesn't really have the same problem with viruses as other OSs. However, a virus can be planted on the server and accessed by other, more susceptible systems on your network.
One cautionary comment -- there is a strong perception that Xubuntu is lighter-weight than Ubuntu. If that's the reason for Xubuntu, here, I suggest you read this article (http://www.linux-mag.com/cache/7520/1.html) on lubuntu, and reconsider. It turns out that Xubuntu may actually produce a larger footprint than Ubuntu.
Josh
Are there any security implications of an amateur putting a fresh desktop ubuntu install out on the internet like this?
Is there anything else that should be done to protect the server, besides having it behind a router?
Ned
Everything works fine for me until Open Terminal and set the password: "vncpasswd ~/.vnc/passwd
I get
vncpasswd command not found
DamnClown
Why not NFS instead of Samba?
Chris
What a bass-ackwards way to go about it. Download the server edition, and if you absolutely MUST have X, install it later.
There is absolutely no reason to install a desktop edition and strip it down.
AkshinJax
@TurboPunz
Yeah, it'll most likely work on that comp. Xubuntu is pretty lightweight.
And honestly, that system would be better off w/ linux than WinME.
That_Guy
apt-get install proftpd didn't work. didn't get the server to run with this tutorial.
TurboPunz
Will this work with a computer originally designed by Dell to run on Windows ME?
Ross
I've be toying with the idea of doing this for a while now as I have two old boxes kicking around doing nothing. thamks for all the info and links, I'll let you know how it went after my next spare weekend as it beggining to sound like arranging the free times gonna be harder than actually building the thing.
luisousa
On Section 5 you forgot to close the group, and needs a argument.
Xillver
Kyle M,
The best way to do this is to use a service like Dynamic DNS which allows you to point a domain name to your ever changing IP addy. Most likely, your router has built-in support for services like dyndns.com. If not, you can always download one of their Dynamic DNS clients to run on your box.
Isaac, thats fine for some purposes, but they are very limited in their functionality and security too. You would be reliant on the NAS manufacturer putting out updates.
Kyle M
Does anybody know of a method to automatically inform the user of changes in IP address. Most users of this tutorial will have not have a static IP address, so if the ISP changes your IP you can no longer access your server. You could always use something like gotomypc, but this is just adds to the confusion. So is a way to run a script within Linux that will email the user if their IP address changes?
olssy
Great tutorial for beginners, I wish something like this existed when I was starting to build my own servers. I encourage you to do more of these, maybe get a media server up and running to stream video.
Isaac
...or just use a cheap NAS, less power consumption and pretty much pre-configured for all sorts of access out of the box as well as other bells and whistles like DLNA, uPnP, torrent downloading etc. Tiny footprint compared to an old computer, quieter and probably comparable in cost if you didn't have all the spare bits to build your own server from scratch.
john
Or you could just use freenas, and be done in 1 step.
timbolt
What is the best way to connect to this file server setup from another location? Like, let's say I wanted to pull files from my home file server and get them onto my office computer - what is that best way?
dcode
@Karan
Because in ubuntu, there is most likely no root password setup. To switch to the root account, you would use sudo first which will prompt you for your own password. Try it.
nate
Err, #3 should have been
3) sudo passwd root && su
nate
Karen,
by default Ubuntu does not allow you to 'su' to root. It has no passwd and forces you to use sudo. To get around this you can do one of the following:
1) sudo su 2) sudo -s 3) passwd root && su
itzac
You don't know the root password at this stage. By default, I don't think it's even set in ubuntu. If you want to enable the root account you have to
>sudo passwd
An easier way to start would be to install ubuntu server, though you'd need to do everything from the command line.
rake74
'sudo su'?
Why not 'sudo -I'?
Karan: sudo is the better way. Google sudo vs su.
Karan
`sudo su`? Why not `su`?
r2s
Use Ubuntu server edition as others have said.
@qq Ubuntu server edition isn't bloated at all.
Tareeq Ali
Why not just install Ubuntu Server, and if you want a gui, then;
or apt-get whatever your preference is and if you want a graphical login then; sudo aptitude install gdm,
sudo dpkg-reconfigure xserver-xorg startx or sudo /etc/init.d/gdm start (if you want use GDM)
Toby
I've been running a little low-power Ubuntu server for the last two years. I wanted something small that would run quietly. Mine is built in a lunchbox, in fact:
I've since rebuilt it around a new Atom-based motherboard, and it only uses 30W (something to consider if you use an old tower, as you may be added $50-$100 a year to your electricity bill running a 250W machine nonstop).
As for not using a desktop version of Ubuntu, one good thing about the desktops is being to administer them via VNC, which is a bit friendlier than SSHing in and editing conf files.
qq
Pro tip: Try a more 'lightweight' distribution instead of a bloated Ubuntu, that's just as bad as Windoze.
Archlinux, Debian (haven't used though), FreeBSD are way better than Ubuntu for a file server.
If this is setup on a home network, where the server is not expected to be running all the time (like I have), are there any handy tips on how to minimize power consumption while the server is idle? My be auto suspend if LAN is idle, wake-on-lan?
Fredrik
A rely nice solution is to install ESXi and then freenas/openfiler for the NAS. after that a duple of virtual machines foe web server etc.
Ted
Imagine a beowulf cluster of these??
Adam K
You still need to deal with the firewall (sudo apt-get install firestarter). Also some sort of autobanning to fend off brute-force attacks (sudo apt-get install fail2ban)
I previously tried it out, but it did not work with my RAID card which I wanted to use. But I see they've upgraded. I may have to give it another shot. It was very fast, painless, and since it didn't have much of a GUI interface on the server, you didn't have to worry about performance being affected by so many "little extras".
Also, the user forums seemed to be very helpful as well. The last time I tried that one was about 3 years ago. At the time, I ended up just going back to Windows. If/when I get the time, I may very well give it another shot.
Also, the Ubuntu Server edition works well from what I've heard in person and read online. It's a little more difficult to install and setup, since it doesn't include the GUI interface. That's where these instructions seem to be helpful. Since most of us are used to a GUI interface, this would be the quickest route to get up and running.
ShadowPuppet
Um, Why are you doing it the complicated way? remove steps 3-6, use FreeNAS. (dot org)
Jason Q
I found that starting with the minimal then adding services is a better way to go. You should look at the minimal Ubuntu CD-ROM:
You install the base, then add the "type" of install you want later, like kubuntu, xubuntu, media desktop, server, and so on.
Joe Baloney
Many people mentioning Ubuntu Server, you can install Ubuntu Server and then apt-get install xubuntu-desktop which will install XFCE but leave out openoffice etc...
Only thing is its a bit slow to download everything...
Ascii King
This is an example of how a tutorial should be done. It doesn't matter if you think there is a better server out there, this tutorial is an excellent starting point.
It is, of course a very light overview. If I were to suggest anything it would be to add links to sites to check when each step goes wrong.
Good job!
What?
What? Why go to all that trouble? Ubuntu already has a server version. Just install Ubuntu Server version and you're done.
Instead of grabbing the xubuntu iso and then stripping out what you don't need. You can grab the ubuntu-server iso and install that. during the install it will even ask you if you what role you want the server to be (DNS, LAMP, FTP, etc) and install the appropriate services for you. Only cavet is there is no X-11 on it and you will have to do everything via command line. This is great for some one who is not afraid to get their hands dirty on the CLI :)
Nice simple breakdown, I like it. Although I would have installed SSH first, so you can then remove all your server peripherals (ie screen/keyboard) and then do everything else from your normal PC.
shush
Nice and quick, but too much work for not enough services. Try freenas (http://freenas.org/) Step one is the same (always need hardware) but the rest is just check boxes and simple web configuration.
You'll likely need to change BIOS settings so it doesn't halt on boot if there is no keyboard present.
Otherwise, great post!
homer
why would you not just install ubuntu server? BTW nice setup, lookin @ using ubuntu server, as file server. maybe you could also inc something abuout sharing out to PS3 or XBox 360
tommix
so very clear and logical. I wish all tutorials were like this! Bookmarked!
James
Will the machine be browsable on a Windows Network?
Xubuntu isn't really as small and fast as it advertises to be anyway. And you have to strip things down you don't need (and still be left off with a bunch of stuff thats clogging up the cpu that you don't even know about, not just the stuff that only takes up hd space)
Thanks for this brief descriptionof how to build a server. As they say: a picture is worth a 1,000 words. Your overview makes it seem to be very easy. Have to get the old metal out of the cellar and start working on it.
how is it possible? wow you have given a very good command oriented explanation. In our office once there was a networking guy who hails himself to be a best one and was not able to set up a server on Ubuntu, of course for five to ten systems which is not a big deal. Will this work for a group of computers???