2

I have both Ubuntu Server and Ubuntu Desktop on a hard drive. But I was wondering if there is a way to have the server running while I am on the Desktop version?

Does this make sense?

0

1 Answer 1

2

You can chroot into the server system, but getting it to work properly as a server this way would be complicated and unworthwhile.

Instead you should probably simply install the packages you need in the desktop system.

The only difference between Ubuntu Server and Ubuntu desktop is what packages are installed. An Ubuntu desktop system can be used as a server (and likewise, a GUI can be installed in Ubuntu Server).

For example, if you need the Apache web server, you can install the apache2 package.

For nginx (you tagged your question but didn't mention it explicitly), you can choose between the following packages: nginx-full, nginx-light, and nginx-naxsi. Related packages you may want or not want (depending on your needs) are nginx-naxsi-ui and nginx-extras.

If your goal is to create a teaching/learning or development box:

You later mentioned:

This isn't for production, but due to my job, I will need to learn how to setup/update/manage servers, so I thought I would turn an old PC into a server. I haven't used anything like virtual box as you cannot access it remotely (as far as I am aware).

VirtualBox (or another virtualization solution, if you prefer) is actually the best thing to use in this situation.

You can actually use VirtualBox and access it remotely, and since your goal is to practice with a system that works like a production server, it seems that's probably what you ought to do. The simplest and easiest way to make services on a virtual machine accessible to the outside physical network is to set up the VM's internet connection as bridged (rather than NAT).

As the VirtualBox manual says:

[...] open the Settings dialog of a virtual machine, go to the "Network" page and select "Bridged network" in the drop down list for the "Attached to" field. Finally, select desired host interface from the list at the bottom of the page, which contains the physical network interfaces of your systems.

Feel free to post a new question about this if you have trouble getting servers on a VirtualBox guest system with a bridged network adapater accessible from the outside. Usually, there are no complications.

While VirtualBox and other virtualization solutions generally can use an entire physical drive as a "virtual" device for a virtual machine--even, usually, an internal drive--you're not likely to succeed at making a VM use the single partition of a pre-existing system as its hard drive. So you'll have to create a new VM and install Ubuntu Server; you probably will not be able to make your VM run the copy of Ubuntu Server that is already installed. (Installing in the VM is easy though--it's the same procedure as installing on a physical machine, like you have done.)

4
  • Yes, I will be using Nginx, sorry for not mentioning this. But this all looks very complicated, but it should work in exactly the same way, and i could also ssh into it? (Sorry, i'm kinda new to this)
    – Melloorr
    Apr 7, 2013 at 20:40
  • @Melloorr Yes. If you want to SSH in, install the openssh-server package. But ...is this a production server? A production server should generally not be on the same box that's used for desktop work, which is why the server version of Ubuntu doesn't ship with a GUI pre-installed. Apr 7, 2013 at 20:43
  • This isn't for production, but due to my job, I will need to learn how to setup/update/manage servers, so I thought I would turn an old PC into a server. I haven't used anything like virtual box as you cannot access it remotely (as far as I am aware).
    – Melloorr
    Apr 7, 2013 at 20:52
  • @Melloorr I've added the information about how virtualization really is the best solution for your situation, and how you can make servers running on a VM in VirtualBox accessible to the outside physical network, to my answer. (It was important, and I decided it should constitute the second part of my answer.) Apr 7, 2013 at 21:47

You must log in to answer this question.

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