views:

3068

answers:

6

I'm a very novice Linux user, and am in the market for a new (virtual) machine after my last (physical) server has annoyed me for the last time, and threatens to die at any moment taking years of hard work with it. I need a LAMP server for web-development (thus require LAMP + SVN + (Trac + Python) at a minimum).

Having trawled around the interweb, it appears that Ubuntu 8.04 is the distro of choice (although I am aware a new version is due to be released within the next few days). I also managed to find a good guide from Mariano Iglesias which I'll be following (but changing the various apps to the latest version, as that was written a couple of months ago) and hopefully that'll see me right. I plan to go with the desktop version, rather than the server version, because it seems to be the best way of getting my feet wet, and easiest way to get myself out of trouble should I find myself in trouble.

Before I commit myself to this route, I was wondering if anyone else had any better suggestions, or even better guides? My ultimate aim of this exercise is as follows:

  • Replace my aging server which consumes too much electricity, is slow, and sounds like it's about to die, with a nice new virtual machine on my new(ish) desktop pc
  • Learn how to administer linux (at the moment I rely soly on apt-get, which on my old Debian machine, won't install a newer version of SVN than 1.4.3 which is not ideal)
  • Be in control of what (and what version of) software is installed on the server

Thanks in advance for your replies :-)

+16  A: 

Firstly, if you go with Ubuntu, go with 8.04 for any sort of server environment, even if it's a testing server. It's a long service release, it will last you a good long time, and there will be updates for all the applications and things for a good long time too without having to deal with issues from trying to update to newer versions of Ubuntu.

LAMP based on Ubuntu will run nicely on a VM with 512-768MB of RAM (mostly for MySQL), but will still run decently on a minimal 256MB install.

VirtualBox is a very good little (free!) virtualisation platform (for running the VM/s inside), it even has a built-in RDP server if you don't want to use it via the graphical window.

I run a VirtualBox/Ubuntu/LAMP stack similar to what you want to run permanently with 768MB RAM set aside for it on my 2GB development machine and it doesn't skip a beat.

Another recommendation I'd have is if you want to go down the route of installing Ubuntu, download the full version of Xubuntu (Ubuntu, with XFCE instead of Gnome. XFCE is alot lighter on memory and other requirements) and install it all, including the GUI. It makes for a nice little interface for configuring things, and you can disable the GUI by using the Applications >> System >> Services option to turn off gdm. You can start it manually by running sudo /etc/init.d/gdm start from the command line later.

  • VirtualBox
  • Ubuntu / Xubuntu
  • Python is preinstalled to the best of my knowledge.
  • The AMP part can be (basically) installed with apt-get install apache2 php5 mysql-server-5.0, or installing those packages via Synaptic.
  • Subversion is in the subversion package, and the Apache modules are in libapache2-svn.
  • Configuring Subversion via Apache
  • You probably want to install a SSH server too, if for no other reason than that it's an easy way to setup a file transfer server (SFTP). Look for the openssh-server package. Otherwise, if you do go with VirtualBox, look into it's shared folders, although I personally consider this harder to setup.
Matthew Scharley
+2  A: 

I offer you two alternatives:

  1. A Debian stable/testing box. For a server, Ubuntu does not seem to offer as much compelling advantages as Debian. If you run testing you'll have very recent software, and Debian seems more "solidly backed" than Ubuntu in the server area.
  2. CentOS. It's a RHEL clone, meaning that it has an extremely long term support. You will get security patches for a "stable" system for a long time (2014 in the case of CentOS 5, IIRC). The RHEL documentation is great, it's a very popular distro in companies (meaning, you'll learn a very marketable skill) and you'll learn something different.
alex
Ubuntu's good enough for Wikipedia, so it's good enough for me.
ceejayoz
+6  A: 

Just a word of warning if you go the Ubuntu route: Many Apache/PHP related information you'll find is inherently RedHat (thus CentOS and Fedora) based. I admin linux boxes for a living in an all RHEL environment, and found the Debian way of doing things with Apache to be incredibly unintuitive. To that end, if you spent all your life in a Debian environment, the RHEL way of doing things will feel equally confusing(total assumption). I just wanted to throw that out there since you did mention your were a novice. I'm not knocking on Debian, if anything I'm knocking on Google. It seems to always bring me to RHEL based articles. I just don't care for all the assumptions that the Debian packages make about what it thinks I intend to do. Granted, that's them being cautious/secure, so it all depends on your side of the fence.

I personally love CentOS though. It has a small foot print, and it's super easy to get it up and running. Plus, I don't have Apache woes in the land of CentOS. When it comes to servers though, a lot of the arguments between distributions are pretty moot overall. You're going to be running a pretty stripped down environment for efficiency, so they're all going to feel basically the same in runlevel 3.

One last little point.. Ubuntu IS the cool kid on the block in *nix community, it gets all the ladies, the press, and the fanfare, that's for sure. On the other hand, all that publicity is in regards to being used as a desktop operating system. I know MetaWiki is using Ubuntu now for their servers, but most everyone else resides in the Debian or RHEL camps. (SUSE users, I said most, and Unix people, I'm not talking about you) :)

f4nt
A: 

Any distro, but i would recommand fedora 10 or ubuntu 8.10

Plus

http://www.apachefriends.org/en/xampp-linux.html

And about trac, svn, python:

use aptitude:

$ sudo aptitude

HTH

plan9assembler
A: 

I can recommend both Fedora or Ubuntu as a desktop + server VM, and use the built-in virtualization manage - KVM - as the virtualization solution.

But please take note of the following issue: while KVM is faster and easier then either VirtualBox or VMWare (using the opearting system GUI administration) when just creating a VM with the same OS as the host, it will be very difficult to create a VM for another type of OS - the GUI tools do not lend themselves well for that.

I personally have more experience and thus I find easier to manage Fedora servers then Ubuntu, but that is probably just me.

All the other software that you need is available as part of the operating system's package repositories, so don't be tempted to install external software like XAMPP. At any given time, the OS provided software will be more up to date, better supported and better performing.

Guss
A: 

Get Ubuntu Server Edition. Its a stripped down Ubuntu without X11. If you are later interested to use the Linux box also with a GUI, its very easy to "upgrade" to a full Ubuntu (apt-get install ubuntu-desktop or apt-get install kubuntu-desktop for the KDE based distribution).

I recommend Ubuntu Server, because I have some good experience with this version also on a huge loaded site where Debian failed (filesystem errors, problems with newer network cards...).

Grab the 64bit version of Linux. VM people say that it has better performance to run a 64Bit version also on a 32bit host.

Try both, Vmware and Virtualbox. I had some trouble while sharing folders with VirtualBox (source files are not updated correctly, bluescreens on windows while starting the application), so I recommend VMware. Its more stable and has more features (try the workstation or the free player version).

Debugging with Xdebug or ZendDebugger is working without problems. So you can use your preferred IDE (Aptana, PDT, Zend, Webuilder...) on Windows or Mac and use your VM with the LAMP server. But dont forget to setup the right allowed remote-ip in the php.ini. You can see the real IP from the host in the Apache log... Without this, debugging will not work.

devarni