Linux + Netbook = Server

At school I used Linux to run a 24/7 Music sharing box. Me and a few friends combined music libraries into one which I loaded onto my linux box, Then loaded the library into a music sharing program that iTunes can communicate with. So in the end all of our music was always available without the need for each guy to have his iTunes running. It was very nice.
 
Hey agent, I'm verry interested in doing this to a HP x9300 Workstation in about a year (or less). I was wondering how you did a few of these things, plus one more.

I was wondering with what programs/if you have a tutorial to:

  • Firewall/router
  • SSH
  • SSH Port Forwarding
  • Private IM
  • IRC BNC
  • Mail Server
  • Proxy
Additionally, I was wondering how you could set up a file server on it.

Thanks in advance! :D
 
I wish you the best of luck when it comes to QoS - but I didn't have a very good experience when I tried.

I absolutely LOVE routers capable of running tomato firmware - you can turn a $30 ASUS router into a beast that has features you won't find on consumer grade hardware, with an awesome interface. Go google tomato firmware and pick up a compatible router... you can thank me later :D

Anyhow, that's a little tangential to the point. It has QoS features, and I tried to do Bittorrent and TF2 at the same time by classifying BT at a very low priority related to TF2 connections. I'm sure it was configured properly, (the GUI for tomato is awesome and showed me the connections and their classes in graphical format) but my ping was still taking a major hit and I still had a lot of lag.

I don't know if the tomato QoS stuff was to blame, or if it is just really, really hard to do QoS with something as connection and bandwidth heavy as BitTorrent and balance that with something as latency sensitive as online gaming.

I'll be interested to hear how it turns out in the end.

I installed Tomato on my Linksys WRT54G about 6 months ago, and I love it. The QoS options and the variety of small settings you can tweak is what caused me to love it.

QoS on Tomato is extremely powerful. You can set port, bandwidth limit, classification, etc. I set bittorrent (port 50000 - 50010) to lowest, and my Steam ports to highest. I can torrent a small file while barely affecting my ping in-game.

I don't know if I just had a stroke of good luck with setting up QoS, but in the end, it worked great.
 
Hey agent, I'm verry interested in doing this to a HP x9300 Workstation in about a year (or less). I was wondering how you did a few of these things, plus one more.

I was wondering with what programs/if you have a tutorial to:

  • Firewall/router
  • SSH
  • SSH Port Forwarding
  • Private IM
  • IRC BNC
  • Mail Server
  • Proxy
Additionally, I was wondering how you could set up a file server on it.

Thanks in advance! :D

Sure Cheese. For this level of stuff, I'd suggest installing Linux. I'll provide my own experiences, but really, the only way to learn is to try and fail and try some more. Be prepared to be frustrated at first, but keep at it, and before you know it things will fall into place. There's plenty of docs on the internet for almost everything, so keep that in mind.

I'm a RedHat fan, personally, so I generally use either Fedora Core or CentOS (which is their 'enterprise linux' repackaged for free). Fedora Core 10 should be pretty straightforward with good documentation. They have a torrent for a DVD that is probably the easiest. After you burn it, boot with it in the drive and the installer will walk you through the whole process. It has some smart defaults where most things are concerned. Make sure you take note of the root password, it is very important! There is only one 'administrator' account on a linux machine, and that is root.

I think by default you're going to get a GUI interface, but most of the things I'm going to suggest are command line operations... There should be an option to open a terminal window, and you can also drop to a console prompt by pressing Alt and one of the function keys, f1->f6. Each one is its own terminal. Use Alt-F7 to get back to the GUI, if it is running.

As with everything else, there are GUI tools and command line tools for everything... as I said, I suggest learning the command line stuff. The first thing you should learn is the 'man' command. Typing 'man' and then the name of a command will tell you almost everything you need to know about that command. You can use the arrow keys to navigate, and press 'q' to exit the manual. (man actually uses the 'less' command to display text - learn to use less and you can get better at using man!) A quick rundown of core commands includes:
  • ls, cd, mv, rm, cp - basic 'move files around' kinds of commands
  • less, nano, tail - view/edit text files
  • su, yum - basic system administration commands
  • chkconfig, service - RedHat-style service management (ie, stuff that runs all the time)

Most of this stuff will also require root access. If you're at the terminal prompt:

[username@machine ~]$

Use 'su -' to login as root. Then the prompt changes:

[root@machine ~]#

The benefit of a major distribution like Fedora Core or Ubuntu is that most of the time, installing software is a snap. Most popular packages are available with just one quick command, and it will even install the dependencies, so you never have to worry about what requires what.

I'll try to list packages available for FC10. To install, use yum, like so:

[root@machine ~]# yum install packagename

And so on. You can yum one thing at a time, or a bunch of things at once. Yum has a bunch of other features, like:

[root@machine ~]# yum update

Which grabs all updates to installed packages. There's also:

[root@machine ~]# yum list pack*

Which will list all possible packages that start with 'pack' - you can use wildcards during install as well, keep that in mind.

Remember, you can find out more with 'man COMMAND' and google.

Note that when you go read documentation on the following packages, you should skip over the 'download/compile/install' steps - that's what yum does for you.

  • Firewall/router
    I've used shorewall in the past, and liked it. It is a bit tricky to set up and I don't think it is standard for FC10. There is something called 'firestarter' that seems popular and readily available. I think it even has a GUI tool for managing the firewall, which may be of use.
  • SSH & SSH Port Forwarding
    SSH should be installed by default on practically any Linux system. It is a very basic tool for administration. You'll need a client, on Windows, use PuTTY. *nix systems generally have one built-in, its called ssh. A quick google for 'putty port forwarding' turned up about a dozen good references. Get the basics (ie, logging in from another machine) down first.
  • Private IM
    The XMPP protocol is an open standard, and there are several implementations. You probably know it as 'jabber'. I'm using ejabberd on linux, along with Pidgn on my windows machines. There's some decent docs on the ejabberd site that can aid in setup, and I'll share my config changes if you get stuck.
  • IRC BNC
    I used ZNC, and it does practically everything I could ask for. (the package name is znc on FC10). Check out the online docs, I set up a real basic config including the 'perform' plugin to log in to AuthServ on startup.
  • Mail Server
    I think the shipping server on FC10 is cyrus-imapd. I remember it being rather painful to set up... Perhaps you should leave that towards the end when you get more experience :)
  • Proxy
    We just talked about proxy stuff, look at squid (big, but feature-packed) or tinyproxy (smaller, easier to configure)
  • File serving
    If you want to transfer files to and from your linux machine, you can use SFTP, go grab FileZilla for windows and make sure you set it for SFTP login. This is fine for a few files, and occasional transfers, but you'll probably want to integrate windows-style file sharing at some point. The package for that is samba. There's also a web front-end that can help some with config, its samba-swat.

So, lets run through one real quick, lets say... a HTTP server.

First, we find the package we want (httpd) and install it:
[root@machine ~]# yum install httpd

Then, maybe we want to edit the configuration a bit. Reading the manual online or with 'man httpd' might point us to where it is. Also, on most linux systems, the configuration files are stored under /etc.
[root@machine ~]# nano /etc/httpd/conf/httpd.conf

We noodle around a bit, maybe change some settings, although most of the time the defaults are fine. Generally the default directory for files to be shared via the web is /var/www/html. Maybe we edit index.html?
[root@machine ~]# nano /var/www/html/index.html

OK, now we've got a little test page up. Time to start the server:
[root@machine ~]# service httpd start

Ooh, working OK, but maybe a quick config change is in order.
[root@machine ~]# nano /etc/httpd/conf/httpd.conf
[root@machine ~]# service httpd restart

Perfect. Now, we want to start httpd every time the machine starts up:
[root@machine ~]# chkconfig httpd on

Great! OK, now, usually only the administrator account (root) has access to change files available on the web. We might want to set up a directory for a regular user, so we don't have to log in as root to make changes:
[root@machine ~]# cd /var/www/html
[root@machine ~]# mkdir webfiles
[root@machine ~]# chown OURUSERNAME webfiles

(clearly, you need to replace OURUSERNAME with whatever your 'normal' login account is... and you can call 'webfiles' whatever you want)

This is only the beginning though, getting better at this means you'll have more things you can try, and the more you try things, the easier everything will be.

I don't have a problem answering specific questions via IRC either, if you can track me down in there :) Remember also that there are tons of forums on the internet, and lots of documentation, on most of the more common things you can do with Linux. Don't be afraid to get out there and ask silly questions!
 
I wish you the best of luck when it comes to QoS - but I didn't have a very good experience when I tried.

I absolutely LOVE routers capable of running tomato firmware - you can turn a $30 ASUS router into a beast that has features you won't find on consumer grade hardware, with an awesome interface. Go google tomato firmware and pick up a compatible router... you can thank me later :D

Anyhow, that's a little tangential to the point. It has QoS features, and I tried to do Bittorrent and TF2 at the same time by classifying BT at a very low priority related to TF2 connections. I'm sure it was configured properly, (the GUI for tomato is awesome and showed me the connections and their classes in graphical format) but my ping was still taking a major hit and I still had a lot of lag.

I don't know if the tomato QoS stuff was to blame, or if it is just really, really hard to do QoS with something as connection and bandwidth heavy as BitTorrent and balance that with something as latency sensitive as online gaming.

I'll be interested to hear how it turns out in the end.

Yeah, I knew about Tomato / DD-WRT firmware going into this project. I do have a compatible router for DD-WRT, currently, but since it's on a lease from Comcast, I certainly don't want to take a chance and end up bricking their router.

Honestly, this was more of a summer project for me, more than anything. I wanted to turn the few junk computers/parts I had lying around into a single working, and useful machine... Make something out of nothing. If it wasn't for 2 out of the 3 NICs being fried, I would be up and running already.

As it is now, I hope to get a cheap ($10-$15 tops) NIC from a local computer exchange/repair store near me, and move along with my project. If I have to invest much more than that, though, I agree I would be better off just get a cheap router to flash, and finding another use for this machine.
 
for the record... I hate you guys.

I just started my own served for tf2 as noted in another thread and started to think about my own server, but the power thing turned me away... The atom would be awesome... It really is enough power for a tf2 served as well? Damn... I am going to get me a netbook now!
 
Yeah, I knew about Tomato / DD-WRT firmware going into this project. I do have a compatible router for DD-WRT, currently, but since it's on a lease from Comcast, I certainly don't want to take a chance and end up bricking their router.

Honestly, this was more of a summer project for me, more than anything. I wanted to turn the few junk computers/parts I had lying around into a single working, and useful machine... Make something out of nothing. If it wasn't for 2 out of the 3 NICs being fried, I would be up and running already.

As it is now, I hope to get a cheap ($10-$15 tops) NIC from a local computer exchange/repair store near me, and move along with my project. If I have to invest much more than that, though, I agree I would be better off just get a cheap router to flash, and finding another use for this machine.

Yeah, bricking that router might be a bad thing for you, although you could always claim ignorance :) I don't think I've ever come close to bricking either of the two tomato-compatible routers I have.

Also, like I said, the QoS of TF2 vs BT stuff didn't really work when I tried, so if that's your reason for the project, then you're better off trying something else first.

If you can't find a NIC in the price range you're looking for, let me know. I think I've got a few spares and I can probably surplus one to you. I cleaned out recently though, so I don't want to make any promises. Also, you'll have to wait a couple of weeks, I'm moving and don't have access to my spares at the moment.
 
for the record... I hate you guys.

I just started my own served for tf2 as noted in another thread and started to think about my own server, but the power thing turned me away... The atom would be awesome... It really is enough power for a tf2 served as well? Damn... I am going to get me a netbook now!

I don't know how well it scales, to be honest. I am only using it for fewer than 4 players, generally just for testing. If you're running it on a home network and hoping to serve the public internet, the bottleneck is likely to be with your internet connection rather than the hardware. Like we were saying in the QoS sub-thread, network games tend to be very sensitive to latency, which is something you're going to have a serious problem with on a 'consumer' grade internet hookup.

I bet I could probably do 16 or 24 players on it if I was just playing on a LAN. Since this is a single core (hyperthreaded, at least) I wouldn't think that multiple instances on the same machine would be worth it.
 
The server I have is just for a few of us to mess around in and even without being together on a LAN (about 5 miles apart) we all still manage a ping of less than 15... So for my needs, this would be fine :-) we all use the regular ego servers for real playing. This really interests me because it can serve up my low traffic web served too with very low power usage...
 
Sweet. Linux, nice choice. Windows servers are higher maintenance, and most of the time not as reliable.
And it's free ;)
 
Agent86 have you played with wine? I was experimenting with trying to get TF2, DoD and some other things working with that. From what I've read some of it is possible without too much loss.

I got too busy though and stoped working on it. I haven't a clue where I left off since its been a few months however so I would have to start over. My thoughts would be to run on Linux for my primary with some VMs for a few other systems I'm playing with.

Let me know if you've gotten TF2, DoD, or CoD4 to run with wine.
 
Agent86 have you played with wine? I was experimenting with trying to get TF2, DoD and some other things working with that. From what I've read some of it is possible without too much loss.

I got too busy though and stoped working on it. I haven't a clue where I left off since its been a few months however so I would have to start over. My thoughts would be to run on Linux for my primary with some VMs for a few other systems I'm playing with.

Let me know if you've gotten TF2, DoD, or CoD4 to run with wine.

We chatted in IRC about this, but for completeness sake...

I think people have used wine on linux for gaming, and there are special branches of wine for just such a purpose (cedega and crossover come to mind) but I don't do it, I have no plans to do it, and I don't recommend it. As I've said, I think using Linux as a desktop OS is overrated, although people do it and more power to them. I don't think you'll fully utilize your hardware running your games under wine on linux, for the simple reason that 'emulated' (that's probably not the exact word, but I can't think of a better one) windows system calls aren't going to be as fast as real ones.
 
We chatted in IRC about this, but for completeness sake...

I think people have used wine on linux for gaming, and there are special branches of wine for just such a purpose (cedega and crossover come to mind) but I don't do it, I have no plans to do it, and I don't recommend it. As I've said, I think using Linux as a desktop OS is overrated, although people do it and more power to them. I don't think you'll fully utilize your hardware running your games under wine on linux, for the simple reason that 'emulated' (that's probably not the exact word, but I can't think of a better one) windows system calls aren't going to be as fast as real ones.

Upon further findings... multiplayer won't work in games that use Punk Buster. No compatibility. It does seem that there are many games that would somewhat work for the casual gamer though not interested in PB games. I found some sites saying that it is possible to get TF2 type games to work but some require some work arounds and such. Not really a good place for someone who doesn't know a little about this stuff already. I would be impressed to see someone who manages to get a steam game working. I think I'm gonna take it as a challenge when I get some spare time just to show to myself it can be done.
 
I've gotten TF2 to run under CrossOver before. It was really effortless to get it to work. But for some reason it would only work under DX8, and I wasn't all geeked up to force DX9. But yeah TF2 will run in Linux fo sho.
 
Fragabit, did you notice any performance hits due to running it under CrossOver?
 
I ordered my HP mini a few days ago for $200 and change.

At some point, I should take a pic of the two for comparison. My wife uses a HP mini 1000 that I got for her a while back on clearance. I think I paid about ~$180 or so, which I wish I'd gotten more at that price...

Speaking of which, today's woot is exactly the one I have, the 900a. $175 shipped, new. I got a slightly better deal on mine refurb'ed though.

http://www.woot.com/

(If you're new to the woot concept, they only sell one thing per day, and it changes every day, generally speaking - this will only be valid for today, 6/8)
 

Latest posts

Back
Top