Most of us know how to integrate and configure Apache-PHP-MySQL on windows. Let’s see the same on Linux. This process is termed as configuring LAMP server- L(inux)-A(pache)-M(ySQL)-PHP/Perl.
I have Windows and CentOS running in my PC so I directly configured LAMP on CentOS by installing each required package. However in case you do not have a linux installed separately you can use the vmware to run linux on your windows machine. Same steps are followed in configuring LAMP whether linux running on separate machine or running on windows using vmware.
Setup#1: How to run linux on windows- simple steps
Setup#1: How to run linux on windows- simple steps
First requirement: vmware player, download it here and install it just like any other program on windows
Now download your favourite linux flavour, here I have used fedora 13 (fedora-13-i686-live.iso) Download from here.
Now we have to make vmware player talk to linux for which you need to download a small file from wolphination.com site, however that file has been obsolete now from the official website of wolphination. So I am uploading the file here. It’s named as OS.zip file. Download and extract it in your C drive as C:\OS which contains two files OS.vmx and OS.vmdk. Now place your downloaded linux iso file in to this folder. So the folder C:\OS contains OS.vmx, OS.vmdk and fedora-13-i686-live.iso.
Now open OS.vmx using notepad and edit the line that says ide1:0.fileName “C:\Your file”. Edit this line and make it point to the Linux version you downloaded. So mine changes to C:\OS\ fedora-13-i686-live.iso and save this file.
You are all set to launch linux on windows using vmware player
Just double Click on OS.vmx and in a min or less time, depending on your RAM, the Linux will start up.
Setup#2: Installing LAMP using Yum
This is the easiest way to install LAMP using Yum. Make sure your PC has internet connection before starting installation.
Once you logged in, open terminal and type:
yum install httpd php mysql-server mysql
this will install httpd (apache web server) php, mysql-server and mysql
Once installation is complete, start the web server and mysql server by typing
service mysqld httpd start
Once both services are running, you can point your browser to http://localhost and you should see a welcome page from fedora, CentOS (depending on the flavour you are running). If you see that welcome page, you just installed everything successful.
To test if php is running, go to /var/www and create an index.php file with the content below using your favourite editor and save.
<?
php phpinfo();
?>
and refresh your browser again. If you see a purple PHP information page showing all the php configuration variables, then php is running now.
Congratulation, you just successfully installed LAMP in your machine. I configured it on fedora and CentOS and the installation steps are same whether you are running on vmware or on separate linux server.
No comments:
Post a Comment