This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum update -y # -y options is to auto accept the prompts | |
yum install httpd -y # This is to install apache server | |
yum install git -y # This is to install git for cloning repos | |
service httpd start # This is to start the apache server | |
service httpd status # This is to check the status of apache server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
— User Management | |
mysql> create user ‘bipin'@'localhost' identified by ‘jethwani’; | |
mysql> grant all on *.* to 'bipin'@'localhost’; | |
mysql> grant all on *.* to bipin@'%' identified by 'jethwani’; | |
mysql> FLUSH PRIVILEGES | |
mysql> select host, user, password from mysql.user; | |
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum update -y | |
yum install httpd -y | |
/sbin/chkconfig --levels 235 httpd on | |
service httpd start | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
region=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}') | |
echo "<h1>$instanceId</h1><br/><h3>This is to test AWS ELB with Auto Scaling Group</h3><h4> Bipin Jethwani</h4>" > /var/www/html/index.html | |
aws ec2 create-tags --resources "$instanceId" --tags Key=Name,Value="PROD-$instanceId" --region "$region" |
NewerOlder