Dealing with PHP and MySql will some day lead the web developer to scripting on another OS than Microsoft Windows.
WAMP solutions under Windows
In order to run a dynamic PHP-MySql website on a local Microsoft Windows machine, the developer needs to install a WAMP software (i.e. Windows, Apache, MySql, Php) like WampServer (my favourite) or EasyPhp (the development of which stayed inactive for a while, some years ago, but which has now been updated). Those webdevelopment platforms all come from LAMP solutions, an acronym for Linux, Apache, MySql, Php. LAMP is free software and is part of many Linux OS distributions.
Choosing a Linux OS
As Netcraft states it, websites across the net are mainly run under Apache Servers. Developing websites under a Linux OS may be the right solution if the developer :
- feels at ease with Linux terminal command lines
- can find hardware driver versions developed for Linux OS
- can adapt to linux softwares
If the above requirements can be fulfilled, the developer is ready to change OS and choose the Linux distribution that suits him best. A large number of free solutions are available on the internet. If he is hesitating about the right distribution to choose, he may take the Linux distribution Chooser test (multi-lingual).
Once the distro is chosen, let’s see how it can be installed.
Having tried some Live CDs and DVDs beforehand, the developer will have a good idea of the Desktop environment (KDE or Gnome). My experience led me to choose the linux Server Distro OpenSuse.org.
Md5sum check of the downloaded distro
Once downloaded as an ISO file, OpenSuse DVD should be checked before install. This is easily done by checking the md5sum of the downloaded file. You can run Fastsum to achieve this. The result Fastsum gives you after analysis must be strictly equivalent to the md5sum provided by OpenSuse.org.
Where and how to install?
For my first Linux install as a newbie, I bought a new sata hard disk (HD). I did not want to run any risk with my Windows HD. I disconnected my Windows HD and connected the brand new HD.
I started the computer and changed configuration of the boot sequence in BIOS for my computer to start checking the DVD drive instead of the HD. So at reboot, Opensuse DVD inserted, my computer boots on the DVD drive and setup loads.
Opensuse is provided with a graphic install interface that allows you to install it by clicking (no command line knowledge necessary at this stage).
Just follow the steps and configure your OS. I chose KDE Desktop as environment because it provides me with softwares I need as a developer.
It is of course possible to start Windows from Linux. Remember I chose to install Linux and Windows on 2 physical separate HD. My OpenSuse is my primary HD. I then connected my secondary Windows HD. Under Linux, you’ll have to change GRUB to be able to start Windows from Linux prompt. Indeed, Windows won’t start if it is not primary HD.
As root, you’ll have to change grub loader in /boot/grub/menu.lst. Change the line concerning Windows (or add it if necessary) :
map (hd0) (hd1)
map (hd1) (hd0)
This will re-map your HD and make the system believe HD0 is the Windows HD.
Whatever your hardware configuration, it should run (somehow) under Linux. Linux is only delivered with Open Source drivers, so you may have surprises at first boot with your graphics card, for example. Refer to the Internet for support in this matter. Nvidia has developed specific drivers for Linux.
Netcraft survey – November 2009
Linux distribution Chooser