lamp Step by step - How to setup a virtual LAMP web server and Wordpress - Part Oneubuntu-logo Step by step - How to setup a virtual LAMP web server and Wordpress - Part Onevmware-logo Step by step - How to setup a virtual LAMP web server and Wordpress - Part One

So, you are attempting to setup your own server and have been scouring the internet for help.  Lucky for you, you have finally arrived on the page you were looking for.  There are a billion partial guides out there that leave you hunting the internet for information and assume you know what to do in the gigantic chasms of information they leave out.  I decided that I am going to break that trend and finally lay it all down for you in one spot.  I don’t care how many pages it takes, or how many screenshots must be made.  This will be a complete guide and I will skip nothing.

In this series we will accomplish the following:

  • Install Ubuntu 8.10 in a VMWare virtual machine
  • Install Webmin and other necessary software
  • Configure Apache for name based virtual hosts (for multiple web site hosting)
  • Install WinSCP and PuTTY for SFTP and SSH console access
  • Install Wordpress 2.6.3 and configure things like Permalinks
  • Install the Wordpress plug-ins that you don’t even know you need yet (and tell you why)
  • Secure your files and folders with chmod, chgrp, and .htaccess files

We have a lot to do so lets get started by downloading the necessary server software:

While Firefox is chewing on those two downloads, let’s go over to EasyVMX and generate a virtual machine file to install Ubuntu in.

On the EasyVMX screen you will have to fill in a few blanks and change a couple options but it is fairly straight forward.  First change the name of the virtual machine, select Ubuntu as the guest operating system and set the amount of memory you want the VM to use.  256 MB would be the minimum I would set, but I am going to go with 512.

virtual hardware

Next set the description to something that pleases you.

virtual machine description

Now set the network interface card to Bridged mode.  This is very important.

network interface cards

Select your virtual hard disk size.  I am going with 20gb but put whatever you want.  The actual size of the VM will only expand as you load data into it so it will not start at this size, it is only a limit.

hard disk drives

Now turn off all of these, we will not be needing them.

sounds and i/o ports

Finally create the virtual machine and download it to your hard drive.

create virtual machine ubuntu server download

By now VMWare player should be finished downloading.  We should go and install it since we have this shiny new virtual machine and nowhere for it to play!

Go and locate your VMWare player download and run it.

vmware player installer

Click next on this screen.

vmware next

Change the download location to wherever you want to install it or leave it as default.  Click next.

destination folder

Choose what shortcuts you want VMWare to create.  I always uncheck Quick Launch toolbar on anything because I hate junk trying to fill up my Quick Launch for no reason or benefit to me.  Click next.

vmware shortcuts

Now click install on this screen and watch the pretty bar roll to the right.  When it’s all done just click finish.  If VMWare Player wants to restart your computer, bookmark this page and come back after your intermission.

vmware install

Ok we’re back!  Now that we have our player software installed lets take a look at the file we downloaded from EasyVMX.

Locate the .zip file and extract it.  It will create it’s own folder.  (I use WinRAR but you can use whatever inferior archiving software your computer came with, it will work too)

unzip vmx

You will end up with a folder containing your new VM.  Move the folder to wherever you want the server to reside and open it up.

ubuntu server

The .vmx file is the one that we use to start the server.  The rest are the virtual hard drive.  Why do they use so many files for one hard drive?  It is one of life’s mysteries.  Double click the .vmx file.  (If you do not see the extensions on your files click on Tools   –> Folder Options then click the “View” tab and uncheck “Hide extensions for known file types”.  There, that’s better.)

ubuntu vm files[6]

As soon as the player starts click on Devices –> CD/DVD (IDE) –> Disconnect.

disconnect cd drive

Now click on Devices –> CD/DVD (IDE) –>  Connect to Disk Image File (iso).

connect to iso

Now locate the Ubuntu server image that we downloaded earlier (hopefully it is done by now) and double click it.

find iso

Now click in the VMWare player window with your handy mouse pointer and hit CTRL-ALT-DELETE.  You should now get the Ubuntu installation screen. (If the task manager opens, just close it)  Select your language.  I am selecting English.  If you get stuck in the VMWare window and want to switch back to this article, just hit CTRL-ALT on your keyboard to release the mouse.

ubuntu installer

Now you will see the installation options.  Press enter on “Install Ubuntu Server”.  The screen inside the player will go nuts for a second and then you will go to the language selection screen.

install ubuntu server

Now choose your language again.  Once does not seem to be enough.

choose language

Choose your country.

choose your country

Detect keyboard layout?  I say no.  I can figure out what country I am from just fine, thanks.

detect keyboard layout

Now the installer will ask where your keyboard is from.  This is likely where you are from.  If you do not know where you are from then hit “Go Back”.  Otherwise select the country you reside in.  I selected USA and then USA on the next screen.  The virtual machine will now do some hardware detection and configure the bridged network adaptor via DHCP.  It will pull it’s own address from the router so it will look like just another computer on your network.

origin of the keyboard

You now have to pick a hostname for your system.  Make sure it is not something that another computer on your network is using.  If you have no ubuntu or linux computers at your location already then leaving it as ubuntu should be a safe enough bet.  Feel free to change this to whatever you want.  In this installation I am going to use the default “ubuntu”.

ubuntu host

Select your proper time zone.  I am selecting Central time.  Now some more hardware detection will occur but it should not last long.

time zone

Now it is time to partition the virtual disk.  You may do this any way you want but for our purposes Guided - Use entire disk will suffice.

partitioning-thumb1 Step by step - How to setup a virtual LAMP web server and Wordpress - Part One

Now select the disk to partition.  There should only be one choice unless you did something differently than I did on the EasyVMX web site.

select hard disk

Now you must write the changes to the disk.  Select “Yes” on this screen.  The partitions will now be created and the Ubuntu Server installation will automatically begin.

finalize partitions

You will now be asked to type your full name.  Use whatever you would like for this.  On this installation I am simply using “user”.

user setup

Now type in your chosen login name.  This is the name you will actually use to login to the system.

login name

Now choose a password.  I am using what I always use which is ***************.  On the next screen type this again.  Do not forget this password.  Write it down now while I go get the next screenshot.

password-thumb1 Step by step - How to setup a virtual LAMP web server and Wordpress - Part One

You are now given the choice to setup an encrypted private directory.  I am choosing no as I never plan to put anything on this server but web sites.

private directory

On the next screen it will ask for proxy information.  If you are behind a proxy enter the address here.  If you have no idea what I am talking about, leaving it blank is probably a safe bet.  If you are this far into the article and have no idea what I am talking about, I am quite proud of you and give you a gold star.  Select continue.

proxy-thumb1 Step by step - How to setup a virtual LAMP web server and Wordpress - Part One

Now select how you want Ubuntu to handle updates.  I am selecting “Install security updates automatically”

automatic updates

This is where we give our server it’s LAMP juice.  I am selecting LAMP server, OpenSSH and Samba file server.  I recommend you do the same.

software selection

You will now be asked to set a MySQL password.  Again, either never forget this or go and write it down.  DO NOT leave this blank.  Verify it on the next screen.

mysql root password

After a few minutes of installing the system will need to restart.  Don’t worry about ejecting the .iso file we connected to earlier, just hit “Continue”.

finish installation

If your virtual machine rebooted and you have a screen like this, congratulations!  We are now ready to login and start installing the additional modules we are going to need such as Webmin!

ubuntu login

This concludes Part One of the series.  In Part Two we will focus on installing Webmin for web-based server administration and all the other necessary settings we are going to need to get our site up and running.

Related posts:

  1. Step by step - How to setup a virtual LAMP web server and Wordpress - Part Two Last time we ended with a completed Ubuntu 8.10...