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.
Next set the description to something that pleases you.
Now set the network interface card to Bridged mode. This is very important.
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.
Now turn off all of these, we will not be needing them.
Finally create the virtual machine and download it to your hard drive.
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.
Click next on this screen.
Change the download location to wherever you want to install it or leave it as default. Click next.
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.
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.
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)
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.
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.)
As soon as the player starts click on Devices –> CD/DVD (IDE) –> Disconnect.
Now click on Devices –> CD/DVD (IDE) –> Connect to Disk Image File (iso).
Now locate the Ubuntu server image that we downloaded earlier (hopefully it is done by now) and double click it.
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.
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.
Now choose your language again. Once does not seem to be enough.
Choose your country.
Detect keyboard layout? I say no. I can figure out what country I am from just fine, thanks.
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.
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”.
Select your proper time zone. I am selecting Central time. Now some more hardware detection will occur but it should not last long.
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.
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.
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.
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”.
Now type in your chosen login name. This is the name you will actually use to login to the system.
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.
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.
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.
Now select how you want Ubuntu to handle updates. I am selecting “Install security updates automatically”
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.
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.
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”.
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!
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:
- 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...




































November 16th, 2008 at 3:19 am
How innovative…finally getting the information I have been searching for…This is Awesome…step by step was easy to follow…just signed up for Techweisers updates and can hardly wait for part two…Thanks
November 18th, 2008 at 1:39 am
Just received My first update from Techweiser and all I can say is…Thank You…This site is Great…everything is explained in such detail and guides me through with ease…getting ready to install part two…
William’s last blog post..Step by step - How to setup a virtual LAMP web server and Wordpress - Part Two