Your SlideShare is downloading. ×
0
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...
First, we are going to configure corresponding security
group. The security group acts as a firewall allowing you to
choos...
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-availa...
look for /var/www/html directory and make sure it contains AllowOverride
All
save & exit the nano editor via CTRL-X, “y” a...
Enable the rewrite module in Apache :
sudo a2enmod rewrite
Install PHP 5
sudo apt-get install libapache2-mod-php5
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 /...
Now we are going to test php installation. Go to the /var/www/html directory
and create a file name phptest.php
cd /var/ww...
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 q...
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
Upcoming SlideShare
Loading in...5
×

Installing Lamp Stack on Ubuntu Instance

528

Published on

second part of deploying play framework on amazon web services

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide

Transcript of "Installing Lamp Stack on Ubuntu Instance"

  1. 1. Installing LAMP Stack on Ubuntu Instance Deploying Play Framework in EC2 - part # 2 kamarul kawnayeen
  2. 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. 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. 4. select your instance & check the security group associated with it
  5. 5. click “Security Groups” from left panel and select the one associated with your instance
  6. 6. Click on Inbound and then Click Edit
  7. 7. Add this 4 rules. The Custom TCP Rule (port 9000) will be needed for play application
  8. 8. Setting up Apache
  9. 9. Connect with your remote server using terminal & update your ubuntu sudo apt-get update sudo apt-get dist-upgrade
  10. 10. Install apache using the following command : sudo apt-get install apache2
  11. 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. 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. 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. 14. Type the ip address of your instance & check whether apache is running
  15. 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. 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. 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. 18. type ip address of your instance/html/phptest. php at your browser to test php
  19. 19. Installing MySQL
  20. 20. try sudo apt-get install mysql-server sudo apt-get install php5-mysql
  21. 21. Installing PHPMyAdmin
  22. 22. sudo apt-get install phpmyadmin
  23. 23. select apache2 web server
  24. 24. select yes while asking for configuring database for phpmyadmin
  25. 25. Enter password of database’s administrative user and hit Ok
  26. 26. Enter password for phpmyadmin (optional)
  27. 27. Confirming the password
  28. 28. Now we have to link phpmyadmin at /var/www/html directory sudo ln -s /usr/share/phpmyadmin /var/www/html
  29. 29. check out phpmyadmin at your browser
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×