DEV Community

Cover image for instal drupal and xampp on ubuntu to enable the running of a full stack application on amazon web services
SandraMeshack
SandraMeshack

Posted on

instal drupal and xampp on ubuntu to enable the running of a full stack application on amazon web services

Starting an Instance
The first thing is to start an amazon instance and this can be achieved by following the steps listed below:
•Go tohttps://aws.amazon.com/console.
•Log into your aws account withcredentials(username/password).
•Go to services and click on instances.
•Create a new instance and give it a name of your choosing.
•Choose ubuntu as the operating system for web browser and launch ubuntu.
•Create a new key pair and give it a name of your choice.•
Download the key pair (This can only be downloaded once)

Firewall Security settings
After creating the instance and downloading the instance, the firewall security settings would need to be edited. Thiscan be achieved by following the steps below:
•Click on the running instance by selecting the instance box.
•Scroll towards the left side of the page until security groups is seen.
•Click on the security group of the instance.•Click on inbound at the bottom of the screen.
•Add http rule for web server and change the source to anywhere.
•Add https rule for web server and change the source to anywhere.
•Add SSH rule for web server and change the source to anywhere.
•Add Custom/TCP rule for web server, give it port 8080 and change the source to anywhere.

Linking instance to Elastic IP
In order to get a stable IP, link the amazon instance with an elastic IP with the steps listed below.
•Scroll down the left side of the page until you see network and security.
•Click on Elastic IPs.
•Click on Allocate new address.
•Click on Associate new address.
•Choose the instance you created earlier.

Connecting to Ubuntu
This document focuses on what was done using a windows computer therefore connecting to ubuntu and the procedure may be different for other operating systems.To achieve this follow the underlisted steps:
•Go to the folder where the downloaded key-pair was stored.
•Hold down the shift button of your computer and right click on the folder.
•Click on open with windows power shell.
•ssh -i "key pair" ubuntu@"elastic ip".
•Sudo su(connecting to the root server)
•Update Ubuntu Os Package by running this command - "sudo apt-get update".

Download Xampp for Ubuntu
64 bits Xampp for Ubuntu was downloaded and used for this project. This was achieved by following the description below.
•Go to https://www.apachefriends.org/download.html.
•Right click on xampp for linux and copy link address.
•Use the ’wget’ function to download xampp directly into ubuntu by running the following command ’wget "copied link"’.

Executing Xampp Connection
Xampp connections can be executed by following the below instructions.
•Run this command "sudo ./"file copied above".
•say yes to all the notifications.
•Run Xampp by executing: sudo /opt/lampp/lampp start
•Go to http://elasticIpaddressgottenfromaws.
•Notice that there is an access forbidden screen because xampp hasn’t been configured.

Configuring Xampp
Xampp can now be configured by running the following commands.
•vi /opt/lampp/etc/extra/httpd-xampp.conf
•Scroll to the end of the page and follow the instructions.

Restarting Xampp and Updating Xampp Security Settings
Restart Xampp to enable the latest changes take effect.
To restart Xampp and update security settings,run the followingcommands.
•sudo /opt/lampp/lampp restart .
•sudo /opt/lampp/xampp security .
•Follow the command.

Top comments (0)