||Integration of Amazon RDS with the WordPress||

aws ec2 run-instances — image-id ami-08e0ca9924195beba — count 1 — instance-type t2.micro — key-name new2 — user-data file://my_script.txt
yum install httpd -y
systemctl start httpd
setenforce 0
amazon-linux-extras install php7.2 -y
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
yum install php-mysqlnd php-fpm mariadb-server httpd tar curl php-json wget -y
amazon-linux-extras install php7.3
curl https://wordpress.org/latest.tar.gz --output wordpress.tar.gz
tar xf wordpress.tar.gz
cp -r wordpress /var/www/html
systemctl start httpd
systemctl enable httpd
setenforce 0
aws ec2 run-instances --image-id ami-08e0ca9924195beba --count 1 --instance-type t2.micro --key-name <key_pair_name> --security-groups <security_group_name> --user-data file://<file_name>.txt
aws rds create-db-instance --db-name "taskdb" --db-instance-identifier "mydbinstance" --master-username "admin" --master-user-password "bvcoew123" --db-instance-class "db.t2.micro"  --allocated-storage "20" --max-allocated-storage "1000" --vpc-security-group-ids "sg-014b635a5ac473dbd" --availability-zone "ap-south-1a" --engine mysql
# vim /var/www/html/wordpress/wp-config.php
systemctl restart httpd

Thank you!!!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store