Your SlideShare is downloading. ×
Installing Lamp Stack on Ubuntu Instance
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Installing Lamp Stack on Ubuntu Instance

308
views

Published on

second part of deploying play framework on amazon web services

second part of deploying play framework on amazon web services

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
308
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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
  • 8. Setting up Apache
  • 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
  • 19. Installing MySQL
  • 20. try sudo apt-get install mysql-server sudo apt-get install php5-mysql
  • 21. Installing PHPMyAdmin
  • 22. sudo apt-get install phpmyadmin
  • 23. select apache2 web server
  • 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)
  • 27. Confirming the password
  • 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