SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Installing LAMP Stack on Ubuntu Instance
Deploying Play Framework in EC2 - part # 2
kamarul kawnayeen
Preface
This is the second part of deploying playframewok in EC2 tutorial series. In the
previous part, I’ve showed how to setup a virtual server on AWS. I setup ubuntu
14.04 LTS there. In this part I’m going to complete setting up LAMP stack.
Considering LAMP, I will use :-
➢ Apache as web server
➢ MySQL as database
➢ PHP as programming language
First, we are going to configure corresponding security
group. The security group acts as a firewall allowing you to
choose which protocols and ports are open to computers
over the internet.
Configuring Security Group
select your instance & check the security group associated with it
click “Security Groups” from left panel and select the
one associated with your instance
Click on Inbound and then Click Edit
Add this 4 rules.
The Custom TCP
Rule (port 9000)
will be needed for
play application
Setting up Apache
Connect with your remote server using terminal & update your ubuntu
sudo apt-get update
sudo apt-get dist-upgrade
Install apache using the following command :
sudo apt-get install apache2
Now, we have to enable .htaccess file. To do so we have to edit the “000-
default.conf” file at “/etc/apache2/sites-available/” directory
So, move to the sites-available directory and execute the following command
sudo nano 000-default.conf
look for /var/www/html directory and make sure it contains AllowOverride
All
save & exit the nano editor via CTRL-X, “y” and Enter
Enable the rewrite module in Apache :
sudo a2enmod rewrite
Install PHP 5
sudo apt-get install libapache2-mod-php5
Restart Apache
sudo /etc/init.d/apache2 restart
Type the ip address of your instance & check
whether apache is running
Allow ubuntu user to work with the /var/www/html directory:
sudo adduser ubuntu www-data
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R g+rw /var/www/html
Now we are going to test php installation. Go to the /var/www/html directory
and create a file name phptest.php
cd /var/www/html
sudo vi phptest.php
hit i key to enter insert mode and just call the phpinfo() function
hit esc to exit insert mode and type :wq to save and quit vi editor
type
ip address of your
instance/html/phptest.
php
at your browser to test
php
Installing MySQL
try
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
Installing PHPMyAdmin
sudo apt-get install phpmyadmin
select apache2 web server
select yes while asking for configuring database for phpmyadmin
Enter password of database’s administrative user and hit Ok
Enter password for phpmyadmin (optional)
Confirming the password
Now we have to link phpmyadmin at /var/www/html directory
sudo ln -s /usr/share/phpmyadmin /var/www/html
check out phpmyadmin
at your browser

Más contenido relacionado

La actualidad más candente

La actualidad más candente (18)

Atom IDE
Atom IDEAtom IDE
Atom IDE
 
Using the fork_cms deploy gem
Using the fork_cms deploy gemUsing the fork_cms deploy gem
Using the fork_cms deploy gem
 
Pentesting Cloud Environment
Pentesting Cloud EnvironmentPentesting Cloud Environment
Pentesting Cloud Environment
 
Denial of service attack part 2
Denial of service attack part 2Denial of service attack part 2
Denial of service attack part 2
 
How to run appache spark on windows(in sbt console)
How to run appache spark on windows(in sbt console)How to run appache spark on windows(in sbt console)
How to run appache spark on windows(in sbt console)
 
Compcon 2016 Workshop
Compcon 2016 WorkshopCompcon 2016 Workshop
Compcon 2016 Workshop
 
Vagrant development environment
Vagrant   development environmentVagrant   development environment
Vagrant development environment
 
Aws amazon ec2
Aws amazon ec2Aws amazon ec2
Aws amazon ec2
 
Instalar ebs 12 2 8
Instalar ebs 12 2 8Instalar ebs 12 2 8
Instalar ebs 12 2 8
 
Como instalar aeroo en open erp 6
Como instalar aeroo en open erp 6Como instalar aeroo en open erp 6
Como instalar aeroo en open erp 6
 
Debian
DebianDebian
Debian
 
Ansible 2.2
Ansible 2.2Ansible 2.2
Ansible 2.2
 
Puppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon ValleyPuppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon Valley
 
How To Create EC2 instance Linux Server
How To Create EC2 instance Linux ServerHow To Create EC2 instance Linux Server
How To Create EC2 instance Linux Server
 
How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...How to start Django automatically after restarting development or local syste...
How to start Django automatically after restarting development or local syste...
 
Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)
 
instaling
instalinginstaling
instaling
 
Cool Things in Clojure 1.9
Cool Things in Clojure 1.9Cool Things in Clojure 1.9
Cool Things in Clojure 1.9
 

Destacado

The ACP Pacemaker 11
The ACP Pacemaker 11The ACP Pacemaker 11
The ACP Pacemaker 11
Logan Aimone
 
Den Globale Landsbyen
Den Globale LandsbyenDen Globale Landsbyen
Den Globale Landsbyen
ketil vigdal
 
Pla de Ciutadania i Immigració 2009 - 2012
Pla de Ciutadania i Immigració 2009 - 2012Pla de Ciutadania i Immigració 2009 - 2012
Pla de Ciutadania i Immigració 2009 - 2012
tribunavirtual
 
Papers d'Acció Social num.18
Papers d'Acció Social num.18Papers d'Acció Social num.18
Papers d'Acció Social num.18
tribunavirtual
 
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
tribunavirtual
 

Destacado (20)

Understanding ASP.NET MVC
Understanding ASP.NET MVCUnderstanding ASP.NET MVC
Understanding ASP.NET MVC
 
Ubuntu OS and it's Flavours
Ubuntu OS and it's FlavoursUbuntu OS and it's Flavours
Ubuntu OS and it's Flavours
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
 
Creating Ubuntu apps with Qt an Python
Creating Ubuntu apps with Qt an PythonCreating Ubuntu apps with Qt an Python
Creating Ubuntu apps with Qt an Python
 
Ubuntu 12.04 Persian Release Party
Ubuntu 12.04 Persian Release PartyUbuntu 12.04 Persian Release Party
Ubuntu 12.04 Persian Release Party
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
Cloud Ubuntu Open Stack, Juju, MaaS - Ua Deck Nov 2013
Cloud Ubuntu Open Stack, Juju, MaaS - Ua Deck Nov 2013Cloud Ubuntu Open Stack, Juju, MaaS - Ua Deck Nov 2013
Cloud Ubuntu Open Stack, Juju, MaaS - Ua Deck Nov 2013
 
Sources Of Energy(Sideshow)
Sources Of Energy(Sideshow)Sources Of Energy(Sideshow)
Sources Of Energy(Sideshow)
 
The ACP Pacemaker 11
The ACP Pacemaker 11The ACP Pacemaker 11
The ACP Pacemaker 11
 
Print, Pixels & People 11
Print, Pixels & People 11Print, Pixels & People 11
Print, Pixels & People 11
 
Den Globale Landsbyen
Den Globale LandsbyenDen Globale Landsbyen
Den Globale Landsbyen
 
3 contabilidad
3  contabilidad3  contabilidad
3 contabilidad
 
Pla de Ciutadania i Immigració 2009 - 2012
Pla de Ciutadania i Immigració 2009 - 2012Pla de Ciutadania i Immigració 2009 - 2012
Pla de Ciutadania i Immigració 2009 - 2012
 
Papers d'Acció Social num.18
Papers d'Acció Social num.18Papers d'Acció Social num.18
Papers d'Acció Social num.18
 
Spectra from Correlation
Spectra from CorrelationSpectra from Correlation
Spectra from Correlation
 
The ACP Pacemaker 10
The ACP Pacemaker 10The ACP Pacemaker 10
The ACP Pacemaker 10
 
The NSPA Pacemaker, Fall 2011
The NSPA Pacemaker, Fall 2011The NSPA Pacemaker, Fall 2011
The NSPA Pacemaker, Fall 2011
 
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
Guia de Recomanacions sobre Gestió de la Diversitat a les Empreses i d'Altres...
 
PARAWACS: color halftoning with a single selector matrix
PARAWACS: color halftoning with a single selector matrixPARAWACS: color halftoning with a single selector matrix
PARAWACS: color halftoning with a single selector matrix
 
For Advisers Iowa 11
For Advisers Iowa 11For Advisers Iowa 11
For Advisers Iowa 11
 

Similar a Installing Lamp Stack on Ubuntu Instance

Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
franbow
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2
IMC Institute
 

Similar a Installing Lamp Stack on Ubuntu Instance (20)

Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Linux for programmers
Linux for programmersLinux for programmers
Linux for programmers
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
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
 
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
 
Linux
LinuxLinux
Linux
 
Lumen
LumenLumen
Lumen
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linux
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Definitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source softwareDefinitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source software
 
Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 

Último

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Installing Lamp Stack on Ubuntu Instance

  • 1. Installing LAMP Stack on Ubuntu Instance Deploying Play Framework in EC2 - part # 2 kamarul kawnayeen
  • 2. Preface This is the second part of deploying playframewok in EC2 tutorial series. In the previous part, I’ve showed how to setup a virtual server on AWS. I setup ubuntu 14.04 LTS there. In this part I’m going to complete setting up LAMP stack. Considering LAMP, I will use :- ➢ Apache as web server ➢ MySQL as database ➢ PHP as programming language
  • 3. First, we are going to configure corresponding security group. The security group acts as a firewall allowing you to choose which protocols and ports are open to computers over the internet. Configuring Security Group
  • 4. select your instance & check the security group associated with it
  • 5. click “Security Groups” from left panel and select the one associated with your instance
  • 6. Click on Inbound and then Click Edit
  • 7. Add this 4 rules. The Custom TCP Rule (port 9000) will be needed for play application
  • 9. Connect with your remote server using terminal & update your ubuntu sudo apt-get update sudo apt-get dist-upgrade
  • 10. Install apache using the following command : sudo apt-get install apache2
  • 11. Now, we have to enable .htaccess file. To do so we have to edit the “000- default.conf” file at “/etc/apache2/sites-available/” directory So, move to the sites-available directory and execute the following command sudo nano 000-default.conf
  • 12. look for /var/www/html directory and make sure it contains AllowOverride All save & exit the nano editor via CTRL-X, “y” and Enter
  • 13. Enable the rewrite module in Apache : sudo a2enmod rewrite Install PHP 5 sudo apt-get install libapache2-mod-php5 Restart Apache sudo /etc/init.d/apache2 restart
  • 14. Type the ip address of your instance & check whether apache is running
  • 15. Allow ubuntu user to work with the /var/www/html directory: sudo adduser ubuntu www-data sudo chown -R www-data:www-data /var/www/html sudo chmod -R g+rw /var/www/html
  • 16. Now we are going to test php installation. Go to the /var/www/html directory and create a file name phptest.php cd /var/www/html sudo vi phptest.php
  • 17. hit i key to enter insert mode and just call the phpinfo() function hit esc to exit insert mode and type :wq to save and quit vi editor
  • 18. type ip address of your instance/html/phptest. php at your browser to test php
  • 20. try sudo apt-get install mysql-server sudo apt-get install php5-mysql
  • 22. sudo apt-get install phpmyadmin
  • 24. select yes while asking for configuring database for phpmyadmin
  • 25. Enter password of database’s administrative user and hit Ok
  • 26. Enter password for phpmyadmin (optional)
  • 28. Now we have to link phpmyadmin at /var/www/html directory sudo ln -s /usr/share/phpmyadmin /var/www/html
  • 29. check out phpmyadmin at your browser