Amazon AWS: Installing LAMP and dependencies

All the resources needed for you to install the TokenDash script easily.
Post Reply
Site Admin
Posts: 184
Joined: Tue Apr 03, 2018 2:12 pm

Amazon AWS: Installing LAMP and dependencies

Post by bitexchange »

Launching an INSTANCE on Amazon AWS

To launch an instance Open the Amazon EC2 console at

From the console dashboard, choose Launch Instance.

The Choose an Amazon Machine Image (AMI) page displays a list of basic configurations, called Amazon Machine Images (AMIs), that serve as templates for your instance. Select an HVM version of Amazon Linux 2.

On the Choose an Instance Type page, you can select the hardware configuration of your instance. Select the t2.micro type, which is selected by default. Notice that this instance type is eligible for the free tier.

Choose Review and Launch to let the wizard complete the other configuration settings for you.

On the Review Instance Launch page, under Security Groups, you'll see that the wizard created and selected a security group for you. You can use this security group, or alternatively, you can select the security group that you created when getting set up using the following steps:

Choose Edit security groups.

On the Configure Security Group page, ensure that Select an existing security group is selected.

Select your security group from the list of existing security groups, and then choose Review and Launch.

On the Review Instance Launch page, choose Launch.

When prompted for a key pair, select Choose an existing key pair, then select the key pair that you created when getting set up.

Alternatively, you can create a new key pair. Select Create a new key pair, enter a name for the key pair, and then choose Download Key Pair. This is the only chance for you to save the private key file, so be sure to download it. Save the private key file in a safe place. You'll need to provide the name of your key pair when you launch an instance and the corresponding private key each time you connect to the instance.


Don't select the Proceed without a key pair option. If you launch your instance without a key pair, then you can't connect to it.

When you are ready, select acknowledgment check box, and then choose Launch Instances.

A confirmation page lets you know that your instance is launching. Choose View Instances to close the confirmation page and return to the console.

On the Instances screen, you can view the status of the launch. It takes a short time for an instance to launch. When you launch an instance, its initial state is pending. After the instance starts, its state changes to running and it receives a public DNS name. (If the Public DNS (IPv4) column is hidden, choose Show/Hide Columns (the gear-shaped icon) in the top right corner of the page and then select Public DNS (IPv4).)

It can take a few minutes for the instance to be ready so that you can connect to it. Check that your instance has passed its status checks; you can view this information in the Status Checks column.

Now that you have launched the instance, Connect to your server using SSH terminal

Enter the command below in your Terminal, substituting the your_server_ip with the IP address of your Instance for and {path_to_serverkey} with the file path of the private SSH key we created earlier:

Code: Select all

$ ssh [email protected]_server_ip -i {path_to_serverkey}
When done, it will look like this:


Hit Enter. You will be prompted to enter the passphrase we created while creating this private key. Enter the password and press Enter again. If you are in Mac, you might be prompted to type your keychain password.

If everything went right, you will be logged in to the server and it will look like this:


3. Install Zip

We need to unzip the file we uploaded to the server in the previous step. To do so, we need to install Unzip in our server.

Enter the following commands in your Terminal and hit Enter:

Code: Select all

sudo apt-get install zip
4. Unzip the source code

Navigate to the HTML folder:

Code: Select all

cd /var/www/html
And type the unzip command in your Terminal and press Enter.

Code: Select all

Enter the TokenDash source code filename provided to you and add .zip at the last in the terminal.

5. Installing package dependencies:

Code: Select all

cd source_code_filename
Replace source code filename just like you did in the previous step and hit "Enter".

Code: Select all

composer install
Kindly hold as this may take a while.

6. Configure virtual host

Code: Select all

nano /etc/apache2/sites-available/000-default.conf
Press the down arrow until you reach DocumentRoot /var/www/html

Add /sourcecode_filename/public at the end of that. For sourcecode_filename enter the name you did in Step 3 or 4 in this document.

When you are finished, Press Control + O to save. And press Enter. Then press Control + X to exit.

Restart the apache server after this step by entering the following command in your terminal.

Code: Select all

sudo service apache2 restart
7. Setting up the database

Code: Select all

mysql -u root -p
Enter the password that was created during the installation of MySQL in the server.

Code: Select all

create database database_name; 
Substitute the database_name with the intended actual name of your database.

Code: Select all

Type "exit" and hit "Enter".
Post Reply

Return to “Installation Help”