- yum update -y
- yum install -y httpd wget php-fpm php-mysqli php-json php php-devel mariadb105-server
- httpd -v
- php -v
- mysql --version
- systemctl start httpd
- systemctl enable httpd
- echo "" > /var/www/html/phpinfo.php
- Access the application using EC2 public IP like this (http://3.84.215.159/phpinfo.php) (Replace the IP with your EC2 public ip)
- systemctl start mariadb
- systemctl enable mariadb
- mysql_secure_installation
- By default, the root account does not have a password. Press Enter
- Type Y to set a password, and type a secure password twice
- Then type Y on every prompt till end of the process
- mysql -u root -p
- create database registration;
- 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
- cd /var/www/html
- wget https://github.com/sudhirr4u/php-latest-project/archive/refs/heads/main.zip
- unzip main.zip
- rm -rf main.zip
- cp -r php-latest-project-main/* .
- rm -rf php-latest-project-main/
- systemctl restart mariadb
- systemctl restart httpd
- http://3.84.215.159 (Replace the IP with your EC2 public ip)
- For first time register an user by entering the details
- Then try to login using registered user id and password