SlideShare a Scribd company logo
1 of 2
installing and configuring LAMP on Ubuntu ­ Part 1


         In this multi­part article, I'm going to be showing you how to install the popular LAMP stack 
­ that's Linux, Apache, the MySQL database system and PHP (in this example, although you can 
have Perl, Python etc. instead) for running your own website or web development server.
The LAMP stack is a very popular setup and many websites run on it (including FOSSwire!). Best 
of all, all four of the tools in the stack are free and open source and really easy to get started with. 
For this tutorial, I'm going to be showing you how to install LAMP on Ubuntu 7.04 Feisty Fawn, but 
the process is very similar for other Linux distributions too. By the way, if you have a Windows 
machine that you want to do this on, check out this tutorial on our sister site GizBuzz instead for a 
nice easy WAMP setup.


Step One ­ get the software
All the stuff you need is pre­loaded into Ubuntu's software repositories, and it's really simple to 
install everything you need. If you're doing a new install, you may want to take a look at the server 
edition of Ubuntu as it allows for a pre­configured profile that you can pick at install time.
For this tutorial, I'm going to assume you've already got your Ubuntu desktop up and running, 
though.
To get stuff installed, you need to install the following packages:
•apache2 
•php5­mysql 
•libapache2­mod­php5 
•mysql­server
The most universal and quickest way to do this is to pop open a terminal and type in the following 
command:
      $ sudo apt­get install apache2 php5­mysql libapache2­mod­php5 mysql­server


Step Two ­ do some minimal configuration
Let that download and install. Once that's all finished, we need to do just a little bit of configuration 
before we can start using our new LAMP setup and that is to set a root password for the MySQL 
database server (without this step, you will have an insecure setup).
It's pretty simple to do:
      $ mysqladmin ­u root password yournewrootpassword

That will set your MySQL root password, which you can now use to log in to your MySQL server.


Step Three ­ start using it!
That's pretty much all the configuration you need to do, so you can now grab any web applications 
you want and install them. Don't use the root MySQL user for your databases though if you are 
working in an environment where you need things to be secure. Set up a user and database for each 
application you install (you can use something like PHPMyAdmin for this).
In the next part of this tutorial, I'll be looking at some awesome tweaks you can make to your 
LAMP setup and how to easily install some of the most popular web applications.


Tips and tricks
To start and stop the servers independently of rebooting (for example after changing configuration 
files, you can use these commands):

Apache and PHP
      $ sudo /etc/init.d/apache2 restart

Replace 'restart' with either 'start' or 'stop', as needed.

MySQL
      $ sudo /etc/init.d/mysql restart

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

configure website lamp stack in ubuntu output

  • 1. installing and configuring LAMP on Ubuntu ­ Part 1 In this multi­part article, I'm going to be showing you how to install the popular LAMP stack  ­ that's Linux, Apache, the MySQL database system and PHP (in this example, although you can  have Perl, Python etc. instead) for running your own website or web development server. The LAMP stack is a very popular setup and many websites run on it (including FOSSwire!). Best  of all, all four of the tools in the stack are free and open source and really easy to get started with.  For this tutorial, I'm going to be showing you how to install LAMP on Ubuntu 7.04 Feisty Fawn, but  the process is very similar for other Linux distributions too. By the way, if you have a Windows  machine that you want to do this on, check out this tutorial on our sister site GizBuzz instead for a  nice easy WAMP setup. Step One ­ get the software All the stuff you need is pre­loaded into Ubuntu's software repositories, and it's really simple to  install everything you need. If you're doing a new install, you may want to take a look at the server  edition of Ubuntu as it allows for a pre­configured profile that you can pick at install time. For this tutorial, I'm going to assume you've already got your Ubuntu desktop up and running,  though. To get stuff installed, you need to install the following packages: •apache2  •php5­mysql  •libapache2­mod­php5  •mysql­server The most universal and quickest way to do this is to pop open a terminal and type in the following  command: $ sudo apt­get install apache2 php5­mysql libapache2­mod­php5 mysql­server Step Two ­ do some minimal configuration Let that download and install. Once that's all finished, we need to do just a little bit of configuration  before we can start using our new LAMP setup and that is to set a root password for the MySQL  database server (without this step, you will have an insecure setup). It's pretty simple to do: $ mysqladmin ­u root password yournewrootpassword That will set your MySQL root password, which you can now use to log in to your MySQL server. Step Three ­ start using it! That's pretty much all the configuration you need to do, so you can now grab any web applications  you want and install them. Don't use the root MySQL user for your databases though if you are