1

This may be a bit of a long one, since I'm not exactly sure what I'm looking for so I'll be giving as much info as I can to help. Also I'm basically new to Linux.

So, my plan is to either take the family PC which is soon to be no longer used and make it into a server to learn. If I'm lucky I'll get an old PC from my dad's work. I'm still not sure which Linux distro to put on it (family PC specs at the bottom) and I also don't have full reign to do whatever I want with the PC yet.

So I'll be testing in a VM. The problem is, I want it to work the same way as it would when the real thing is set up. The set up will be the server will sit wired to the network, possibly headless, not sure how to do a headless install. It's not going to take the place of the router or anything like that.

The point will be to have the server as my Linux box, so I can SSH or FTP or remote desktop into it and use it from my laptop while at home, school or wherever, so I can program on it, learn about running a server and maybe test web stuff or stream media to my TV through a device.

So now that I've explained the set up and what I think it'll be for, keeping in mind I know nothing about Linux still, how can I simulate this on a VM on the laptop I would be accessing this future server from? Basically I would want to connect to this VM the same way I would be connecting to this future server.


Now I know this is a lot to ask but I'm really hoping to get the same quality help I've gotten from Stack Overflow on programming issues. It's basically a bunch of questions that should span multiple questions but I'm hoping to figure it out at once. If I haven't been clear on something let me know and I'll attempt to clarify.


Family PC Specs:

The family PC is a Pentium 4 @ 2 GHz with 768MB of RAM and an integrated card. I'll definitely be replacing the hard drive since it's just old and smaller drives are cheap. Maybe the RAM too to 2GB since it costs the same as the hard drive I'm looking at.

3 Answers 3

4

If you're new to Linux, I would recommend a new-user-oriented distro like Ubuntu to start with. This comes with a lot of stuff pre-installed and bundled with propietary drivers as well, so you shouldn't have any issues installing it, specially on an old hardware machine.

For the VM, I would go with either VMWare or VirtualBox, both gave me very good results. I guess you would still have a monitor and keyboard to install the virtual machine, so the headless install has no use for now. There shouldn't be any problem to test with a VM instead of the real thing (if you forget hardware problems/configurations). You can setup the VM to be recognized as a separate entity on the network, as a completely independent host.

Also do not forget to configure your router to allow inbound connections from outside the network, although I would first test on local network before opening any ports to the Internet.

I would recommend you don't put your server on the same local network than other "private" machines. Create a network setup with a DMZ and a private zone to minimize possible security threats.

Have fun ;)

11
  • Should I install server-specific versions of Ubuntu? Also, how would I set up the second network exactly? Would it require another router? I assume a cheap wired-only router would be fine as long as it's fairly new? Third, is it easy to set up the VM the way you described? Fourth, I guess after setting it up I would need to figure out where to go from there. Maybe that should require it's own thread? Aug 26, 2011 at 4:21
  • 1
    I don't think server-specific Ubuntu is required for now. Get yourself comfortable on Linux first, then you can install a new one. I wouldn't recommend Ubuntu as server for anything serious tbh. About setting up the DMZ, there are a bunch of tutorials on the net, such as this one. You can use an old PC to act as router/firewall (he needs 3 NICs though). Setting up the VM is very easy, you just choose bridged network. And I think a new thread would be best, yes :)
    – m0skit0
    Aug 26, 2011 at 7:07
  • Thanks. Well, since the old PC is becoming the server that won't work. :P Any recommendations for a decently cheap wired or wireless router that will be configurable enough? Then I assume the way I would connect it is by having the cable come out of one of the numbered ports on the main router into the internet port of the router for the server? Also, I remember from Security now that when doing this I would need 3 routers, in a Y-pattern as shown here: digitaldiner.org/files/2008/09/091608-0305-lesliaisons1.png Or is this not needed when following the method you suggested? Aug 27, 2011 at 4:14
  • The other thing I was wondering is does being behind multiple routers make it harder to connect to from the outside? Or am I just thinking it's more complicated than it is? Aug 27, 2011 at 4:15
  • I suggest you getting a router that supports installing OpenWrt on it. I don't think you need 3 routers. 2 are enough: Private LAN -> Router/Firewall 1 -> DMZ -> Router 2 -> Internet. And about the difficulty of connecting from the outside, well no, since you'll be connecting to the DMZ. I wouldn't recommend letting connections directly from the outside to the private LAN.
    – m0skit0
    Aug 27, 2011 at 11:31
2

At this point of time, i'd recommend virtualbox over VMware server, since VMware seems to have EOLed vmware server.

Use a bridged networking option (which will give you an IP address on the lan) for the VM with a wired connection to the host, and its almost identical to a actual system sitting on the network.

As for a headless system, do the initial setup when you do the physical box with a monitor and keyboard, set the bios to boot even if there's no keyboard plugged in - otherwise its a pain to do, and very few distros are designed to be installed headless, but most run headless fine.

Other than that, it depends on what you need - i'd suggest setting up a VM with 256 mb of ram, and 4-10 gb of hard disk space to start with, and increasing if need be.

Distrowise, for the first timer, ubuntu or debian is probably best.

2
  • Should I install server-specific versions of Ubuntu or Debian? Aug 26, 2011 at 4:15
  • i'd suggest one of the minimal builds instead - ubuntu minimal or debian netinstall, then installing just what you want/need. for example for a lamp stack, install tasksel, and select the lamp server role from that (or the packages needed). ubuntu server has no real advantage for personal servers, IMO
    – Journeyman Geek
    Aug 26, 2011 at 8:30
1

I suggest installing the latest version of VirtualBox on your laptop, and running a VM using the 32-bit version of Ubuntu Server 10.04 LTS.

For this VM, you can run it with about 64-256MB of memory, and probably about 1-4GB virtual disk, depending on your laptop specs.

I also suggest running a second VM with the same version of Ubuntu, but configure this one with a desktop login (adjust vm specs accordingly). This way you'll have a Windows and an Ubuntu client to connect to the server vm with. Use putty on Windows for ssh access to your server.

VirtualBox is easy to use for the basic stuff, but there are a lot of advanced configuration options buried in the command line tools. Spend some time reading the Vbox help file for networking, and you can simulate your home router connection, too. My choice for doing this would be to put the server vm on it's own subnet, behind another vm running as a router (Vyatta community edition is good for this), and connecting with the clients through the router. I think this is more flexible than Vbox routing, and more applicable to real common networking skills.

3
  • Why are you recommending the LTS version specifically? I'm just curious, all I know is the LTS versions are supported longer so you don't have to update as often. Aug 26, 2011 at 4:23
  • LTS is considered to be the more stable version, which is what you want on a server. Generally speaking, with all Linux distros, the closer you get to the latest release, the less stable it tends to be, because there has been less man hours involved in working out the issues. Note that I recommended Ubuntu because there's a lot of info available, but another good distro to look at is CentOS 5.6 or 6.0. CentOS is a clone of Red Hat Enterprise Linux, which is a major player in commercial Linux. FWIW, the Red Hat docs are excellent. But here's the thing... if you have a desktop... Aug 26, 2011 at 6:17
  • ...pc that's reasonably powerful, has a good amount of memory, and a large amount of storage space, then try as many distros as you want. It's very easy and convenient to do this with virtual machines, since you can still use your pc while the vm is doing it's thing in the background. This means you can work through online tutorials with the vm right next to you, and try stuff just to see what happens. It's a great learning tool. So yeah, set up your server with a stable server distro, and check out the newest stuff in a vm. Aug 26, 2011 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .