create a new Lightsail instance or EC2 instance From the AWS Management Console.
Once you create it, download the associated .pem file. you can be downloaded the default SSH key from your account page. we need to move it to the ~/.ssh directory. You can do so by executing
mv ~/Downloads/pemfile.pem ~/.ssh/pemfile.pem
if the directory might not exist. You can create the directory by
mkdir ~/.ssh
now change permissions for our .pem file. We can do so by executing
sudo chmod 600 ~/.ssh/pemfile.pem
to connect remotely to our instance, we can do so by executing
ssh -i ~/.ssh/pemfile.pem [email protected]
note: You can find your instance’s IP and username in either your EC2 or Lightsail dashboard.
we are going to install PHP 7.3, We will need to make sure you have the following package installed so you can add repositories
sudo apt-get install software-properties-common
You will need the repository from Ondrej
sudo add-apt-repository ppa:ondrej/apache2
Before installing Apache, you need to update the package list for upgrades and new packages.
sudo apt-get update
install Apache2
sudo apt-get install apache2
if you navigate to the public IP of the instance from a browser, you will see the familiar Apache Welcome Page.
now install the PHP 7.3 and several other packages
You will need the repository from Ondrej
sudo add-apt-repository ppa:ondrej/php
Before installing PHP, you need to update the package list for upgrades and new packages.
sudo apt-get update
install php 7.3
sudo apt-get install php7.3 php7.3-xml php7.3-gd php7.3-opcache php 7.3-mbstring
You can check your installed PHP version
php -v
To download the latest repositories, enter
wget –c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
first before we go, need root password to use it in installation steps.
if you don't have you can change root password by this command
sudo passwd
To install the repositories, enter the command:
sudo dpkg –i mysql-apt-config_0.8.13-1_all.deb
Any time you’re installing new software, you should refresh the software cache to ensure you are installing the latest release
sudo apt-get update
install mysql
sudo apt install mysql-server