Skip to content

sudhirr4u/php-latest-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-latest-project

Steps for installing LAMP on Amazon Linux 2023

Update Amazon Linux 2023

  1. yum update -y

Install LAMP packages

  1. yum install -y httpd wget php-fpm php-mysqli php-json php php-devel mariadb105-server

Verify the installed versions

  1. httpd -v
  2. php -v
  3. mysql --version

Start the httpd service

  1. systemctl start httpd
  2. systemctl enable httpd

Verify if the PHP installed properly

  1. echo "" > /var/www/html/phpinfo.php
  2. Access the application using EC2 public IP like this (http://3.84.215.159/phpinfo.php) (Replace the IP with your EC2 public ip)

Secure the database server

  1. systemctl start mariadb
  2. systemctl enable mariadb
  3. mysql_secure_installation
  4. By default, the root account does not have a password. Press Enter
  5. Type Y to set a password, and type a secure password twice
  6. Then type Y on every prompt till end of the process

Login to the database and create a database as "registration"

  1. mysql -u root -p
  2. create database registration;
  3. then copy the mysql script from "dbscript.sql" to create the table

Download the application code from Github to the html folder, unzip and copy the all the files to html folder

  1. cd /var/www/html
  2. wget https://github.com/sudhirr4u/php-latest-project/archive/refs/heads/main.zip
  3. unzip main.zip
  4. rm -rf main.zip
  5. cp -r php-latest-project-main/* .
  6. rm -rf php-latest-project-main/

Restart the MariaDb and Httpd service

  1. systemctl restart mariadb
  2. systemctl restart httpd

Access the simple web application by the EC2 public ip

  1. http://3.84.215.159 (Replace the IP with your EC2 public ip)
  2. For first time register an user by entering the details
  3. Then try to login using registered user id and password

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published