<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Blog::Quibb &#187; lamp</title> <atom:link href="http://blog.quibb.org/tag/lamp/feed/" rel="self" type="application/rss+xml" /><link>http://blog.quibb.org</link> <description>Software development and more.</description> <lastBuildDate>Mon, 21 Nov 2011 05:12:26 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Setting up a VirtualBox LAMP Server</title><link>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/</link> <comments>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/#comments</comments> <pubDate>Wed, 17 Feb 2010 03:20:38 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[lamp]]></category> <category><![CDATA[virtualbox]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=144</guid> <description><![CDATA[Introduction I recently decided to play around with web development a little bit. Not being familiar with setting up a web server, I decided to setup a VirtualBox LAMP server. Since I couldn&#8217;t find a good guide that went through all the steps of setting up a VirtualBox LAMP Server in one place, I decided [...]]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>I recently decided to play around with web development a little bit.  Not being familiar with setting up a web server, I decided to setup a <a title="VirtualBox" href="http://www.virtualbox.org/">VirtualBox</a> <a title="LAMP" href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29">LAMP</a> server.  Since I couldn&#8217;t find a good guide that went through all the steps of setting up a VirtualBox LAMP Server in one place, I decided to write about my experience.  I wanted a LAMP Server that I could access from any machine on my local network.  In retrospect, it isn&#8217;t very hard to do, but having all the information in one place is nice.</p><h2>Installing VirtualBox</h2><p>Start by installing VirtualBox.  The open source edition (OSE) should be good enough to use for the purposes of this guide.  I was installing the full edition on <a title="openSuSE 11.2" href="http://www.opensuse.org/en/">openSuSE 11.2</a>, and there were some issues.  The issue I had was solved with this command: <strong>sudo chmod +x /usr/lib/virtualbox/VirtualBox and remove /tmp/*vbox*</strong>.  Generally speaking it&#8217;s fairly easy to install VirtualBox on Windows.  When creating a new virtual machine, I allocated 512MB of RAM and 12GB of HD space.</p><p>For additional Linux troubleshooting look here (It applies to more than just OpenSuSE): <a title=" Sun’s VirtualBox on OpenSUSE 11.1" href="http://ryan.rawswift.com/2009/01/27/suns-virtualbox-on-opensuse-111/">Sun’s VirtualBox on OpenSUSE 11.1</a></p><h2>Installing LAMP</h2><p>I chose Ubuntu for my LAMP server largely because there are many documents on how to setup a LAMP server on top of Ubuntu.  I&#8217;ll do a quick overview here, and provide a link to <a title="setting up a LAMP server on Ubuntu (Hardy Heron)" href="http://www.ubuntugeek.com/ubuntu-804-hardy-heron-lamp-server-setup.html">setting up a LAMP server on Ubuntu (Hardy Heron)</a>.  I liked this guide more than the guide for Jaunty because this one tells you to install the <a title="OpenSSH" href="http://www.openssh.com/">OpenSSH</a> server, and being able to administer the VM remotely is a good idea.</p><p>Start by downloading the <a title="Ubuntu Server Edition" href="http://www.ubuntu.com/server">Ubuntu Server Edition</a>.  I tried downloading and installing Hardy Heron, which is the latest Long Term Support (LTS) release, but I kept getting a Kernel Panic when trying to boot in VirtualBox 3.1.2.  It may have been the combination of VirtualBox version and Ubuntu version.  Eventually, I ended up going with Karmic Koala.  The installation process is almost identical to the Hardy Heron installation, and it provides both the LAMP and OpenSSH options that the guide suggests.</p><h2>Network Configuration</h2><p>Click on your newly created virtual machine, and open the settings dialog.  Then click the <em>Network</em> settings area.  For Adapter 1, make sure that the <em>Enable Network Adapter</em> checkbox is checked.  Adapter 1 is attached to <em>NAT</em> by default, switch it to <em>Bridged Adapter</em> for it to look like a regular PC to the rest of your network.  It will acquire an IP address from your router, like a normal computer.  If you only want your host computer to be able to access it the <em>Host-only Adapter</em> option seems like an appropriate choice, but I did not use or test this option.  After changing the setting, start up the virtual machine.  To get the IP of the virtual machine use the <strong>ifconfig</strong> command.  If you point your browser at that IP, you should see the apache welcome page.</p><h3>Static IP</h3><p>Setting a static IP address for the virtual machine is a good idea so you can always access the same IP address.  These are the instructions for setting a static IP in Ubuntu.</p><p>Edit the /etc/network/interfaces file using vim or nano:</p><pre>sudo [your_editor] /etc/network/interfaces</pre><p>Find this line:</p><pre>iface eth0 inet dhcp</pre><p>Change it to:</p><pre>iface eth0 inet static
address 192.168.1.99
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1</pre><p>These settings worked well for my Linksys router.  By default, the DHCP service the router provides starts using IP addresses starting with 192.168.1.100.  By using 192.168.1.99 it was outside of that range.  The Linksys router defaults to using 192.168.1.1 for its own IP, which is why the gateway is set to that.</p><h2>Pure-FTPd FTP Server</h2><p>The last step is setting up an FTP Server on it so you can easily transfer files.   For this I chose <a title="Pure-FTPd" href="http://www.pureftpd.org/project/pure-ftpd">Pure-FTPd</a> because the project prides itself on is being easy to configure.  It largely worked right out of the box without any configuration.</p><p>To install it:</p><pre>sudo apt-get install pure-ftpd</pre><p>Some Pure-FTPd configuration:</p><pre>CD to the configuration directory located here:
/etc/pure-ftpd/conf

Set display dot files to on (so you can see your .htaccess file):
echo yes &gt; DisplayDotFiles

Restart Pure-FTPd:
sudo /etc/init.d/pure-ftpd restart

Get your user connected to the /var/www directory:
CD to your home folder and create a symbolic link to /var/www
ln -s /var/www www

Change ownership /var/www to your user, so you can write to this directory.
chown -R  /var/www

Change to 755 permissions
chmod -R 755 /var/www</pre><p>You should now be able to connect to the FTP server from anywhere on your network by pointing your FTP client at: 192.168.1.99 (or any IP you may have chosen).  It should have no problem running PHP files.</p><p>If any part of this short guide was confusing or didn&#8217;t work, leave a comment so I can look into it and update the guide.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 2/10 queries in 0.003 seconds using disk
Object Caching 297/308 objects using disk

Served from: blog.quibb.org @ 2012-02-05 12:31:58 -->
