Home Notes Other Installing openSUSE (in VirtualBox) with a LAMP server

Installing openSUSE (in VirtualBox) with a LAMP server E-mail
Tuesday, 07 February 2012 23:18

I wanted to install openSUSE in VirtualBox, and set up a LAMP development environment in it.  The "how to" information I found is already available, but it's scattered in different places (blogs, wiki posts, videos, etc.), so I decided to note it down in one place for future reference.  I am focusing on the openSUSE part of the installation process and not the VirtualBox part of it, since that's pretty easy to do.


The steps I followed are as follows, along with references to useful instructions:

  1. Install openSUSE in a new VirtualBox virtual machine.
    1. Download openSUSE (I used openSUSE 12.1).
    2. Create a new virtual machine (VM) in VirtualBox, and run the installation from the ISO you just downloaded.
    3. You shouldn't need to manually install VirtualBox Guest Additions because they get installed with the openSUSE installation.
    4. Some useful instructions here and here.
  2. Install Sun Java JDK.  This does not come installed or even available in the default repositories.
    1. I've come across a few programs that either require or work better with Sun Java JDK (like SmartGit and PhpStorm).
    2. Follow instructions here (the procedure for the x64 version is in the right column).  One point to note is that the author recommends not using the RPM version of the installer.
  3. Set up the LAMP server (instructions here).  openSUSE comes with a "pattern" for installing all the required packages in one easy step!
    Note: openSUSE by default creates a /public_html directory in your /home directory.  Apache/PHP store files in /srv/www/htdocs, but you can also store them in your /home/<username>/public_html directory and access them via http://localhost/~<username>/<filename>.
  4. Add and auto-mount a shared folder from the Windows 7 host environment.
    1. Add a shared folder through the VirtualBox VM Settings.
    2. Follow instructions in the 5th post on this page (that is the procedure that worked for me).