SlideShare a Scribd company logo
1 of 3
Installing LAMP 
 LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very 
little knowlegde of using Linux.
 Install Apache
To start off we will install Apache. 
1. Open up the Terminal (Applications > Accessories > Terminal).
2. Copy/Paste the following line of code into Terminal and then press enter:
sudo apt­get install apache2
3. The Terminal will then ask you for you're password, type it and then press enter. 

 Testing Apache
To make sure everything installed correctly we will now test Apache to ensure it is working 
properly. 
1. Open up any web browser and then enter the following into the web address:
http://localhost/
You should see a folder entitled apache2­default/. Open it and you will see a message saying "It 
works!" , congrats to you! 
 Install PHP
In this part we will install PHP 5. 
Step 1. Again open up the Terminal (Applications > Accessories > Terminal). 
Step 2. Copy/Paste the following line into Terminal and press enter:
sudo apt­get install php5 libapache2­mod­php5
Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the 
following code in Terminal to do this:
sudo /etc/init.d/apache2 restart
 Test PHP
To ensure there are no issues with PHP let's give it a quick test run. 
Step 1. In the terminal copy/paste the following line:
sudo gedit /var/www/testphp.php
This will open up a file called phptest.php. 
Step 2. Copy/Paste this line into the phptest file:
<?php phpinfo(); ?>
Step 3. Save and close the file. 
Step 4. Now open you're web browser and type the following into the web address:
http://localhost/testphp.php
The page should look like this:




                                   
Congrats you have now installed both Apache and PHP! 
Install MySQL
To finish this guide up we will install MySQL. (Note ­ Out of Apache and PHP, MySQL is the most 
difficult to set up. I will provide some great resources for anyone having trouble at the end of this 
guide.)
Step 1. Once again open up the amazing Terminal and then copy/paste this line:
sudo apt­get install mysql­server
Step 2 (optional). In order for other computers on your network to view the server you have created, 
you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnf file. 
gksudo gedit /etc/mysql/my.cnf
Change the line
bind­address = 127.0.0.1
And change the 127.0.0.1 to your IP address. 
Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal:
mysql ­u root
Following that copy/paste this line:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
(Make sure to change yourpassword to a password of your choice.) 
Step 4. We are now going to install a program called phpMyAdmin which is an easy tool to edit 
your databases. Copy/paste the following line into Terminal:
sudo apt­get install libapache2­mod­auth­mysql php5­mysql phpmyadmin
After that is installed our next task is to get PHP to work with MySQL. To do this we will need to 
open a file entitled php.ini. To open it type the following:


                                                <!­­
                              document.write('<div align="center">');
                       //­­>document.write('<scr'+'ipt language="javascript" 
src="http://ad.doubleclick.net/adj/idgt.howtoforge.en/article_below;net=idgt;u=,idgt­6266599_1274
                   243740,118a58882508409,virtualization,idgt.virtualization_H­
cm.li_ros;;tile=3;ord1=100336;fold=below;sec=article;sz=300x250;contx=virtualization;btg=idgt.vi
rtualization_H;btg=cm.li_ros;ord=2170577179034190?"></scr'+'ipt>'); <!­­
                                   document.write('</div>');
                                             //­­>
gksudo gedit /etc/php5/apache2/php.ini
Now we are going to have to uncomment the following line by taking out the semicolon (;). 
Change this line:
;extension=mysql.so
To look like this:
extension=mysql.so
Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart

More Related Content

What's hot (8)

WordPress Tunbridge Wells #WPTW : Spencer Nash, SGN Media, November 2017 Spe...
WordPress Tunbridge Wells #WPTW : Spencer Nash, SGN Media, November 2017  Spe...WordPress Tunbridge Wells #WPTW : Spencer Nash, SGN Media, November 2017  Spe...
WordPress Tunbridge Wells #WPTW : Spencer Nash, SGN Media, November 2017 Spe...
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
 
Using Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal AppsUsing Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal Apps
 
Setting up a debugging environment for Drupal
Setting up a debugging environment for DrupalSetting up a debugging environment for Drupal
Setting up a debugging environment for Drupal
 
Schedule and monitor in mule
Schedule and monitor in muleSchedule and monitor in mule
Schedule and monitor in mule
 
Terryb Opsmanager
Terryb OpsmanagerTerryb Opsmanager
Terryb Opsmanager
 
Integrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureIntegrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azure
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 

Viewers also liked

Viewers also liked (7)

Linux Edtitors
Linux EdtitorsLinux Edtitors
Linux Edtitors
 
My self learing -Php
My self learing -PhpMy self learing -Php
My self learing -Php
 
Babitha5.php
Babitha5.phpBabitha5.php
Babitha5.php
 
Vlaamse ardennen
Vlaamse ardennenVlaamse ardennen
Vlaamse ardennen
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha5.php
Babitha5.phpBabitha5.php
Babitha5.php
 

Similar to Lamp instal

Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
alexjones89
 
Installing configuringdevelopingwithxampp
Installing configuringdevelopingwithxamppInstalling configuringdevelopingwithxampp
Installing configuringdevelopingwithxampp
vimalnambiar
 
Suji May12
Suji May12Suji May12
Suji May12
ksujitha
 

Similar to Lamp instal (20)

Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsHow to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on Windows
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
php lesson 1
php lesson 1php lesson 1
php lesson 1
 
How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04
 
Troubleshooting guide for apache 2.2 service.
Troubleshooting guide for apache 2.2 service.Troubleshooting guide for apache 2.2 service.
Troubleshooting guide for apache 2.2 service.
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
phpTutorial1
phpTutorial1phpTutorial1
phpTutorial1
 
phpTutorial1
phpTutorial1phpTutorial1
phpTutorial1
 
mush With Xampp
mush With Xamppmush With Xampp
mush With Xampp
 
Installing configuringdevelopingwithxampp
Installing configuringdevelopingwithxamppInstalling configuringdevelopingwithxampp
Installing configuringdevelopingwithxampp
 
Suji May12
Suji May12Suji May12
Suji May12
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Lamp instal