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:
- Install openSUSE in a new VirtualBox virtual machine.
- Download openSUSE (I used openSUSE 12.1).
- Create a new virtual machine (VM) in VirtualBox, and run the installation from the ISO you just downloaded.
- You shouldn't need to manually install VirtualBox Guest Additions because they get installed with the openSUSE installation.
- Some useful instructions here and here.
- Install Sun Java JDK. This does not come installed or even available in the default repositories.
- I've come across a few programs that either require or work better with Sun Java JDK (like SmartGit and PhpStorm).
- 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.
- 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>.
- Add and auto-mount a shared folder from the Windows 7 host environment.
- Add a shared folder through the VirtualBox VM Settings.
- Follow instructions in the 5th post on this page (that is the procedure that worked for me).