- Clink on launch a virtual machine
- Select "Amazon Linux 2 LTS Candidate AMI 2017.12.0" A latest Amazon linux candidate 64 bit.
- Select "t2.micro" as Free tire instance.
- select auto option "Configure Instance Details"
- insert 30GB as storage.
- Create security group and assign port.
- click on launch using a new key pair (Remember you need to put .pem file at secure place.)
- Now your instance is ready.
ssh -i /web/KP-EC2.pem ec2-user@xxx.xxx.xxx.xxx
sudo yum update -y
11A.sudo amazon-linux-extras install lamp-mariadb10.2-php7.2
11B.sudo yum install -y httpd php mariadb-server php-mysqlnd
sudo service httpd start
12A.sudo systemctl start httpd
sudo chkconfig httpd on
13A.sudo systemctl enable httpd
chkconfig --list httpd
14A.sudo systemctl is-enabled httpd
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
- mysql_secure_installation
sudo yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
- Navigate to the Apache document root at /var/www/html
(cd /var/www/html)
. wget https://files.phpmyadmin.net/phpMyAdmin/4.8.0.1/phpMyAdmin-4.8.0.1-all-languages.zip
tar -xvzf phpMyAdmin-latest-all-languages.tar.gz
mv phpMyAdmin-4.7.5-all-languages phpMyAdmin
sudo systemctl start mariadb
- http://xxx.xxx.xxx.xxx/phpMyAdmin
sudo usermod -a -G apache ec2-user
- groups to know correct group.
sudo chown -R ec2-user:apache /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
Last active
April 27, 2018 06:16
-
-
Save msanjaypandit/c80c109ef9a2d8c849a945ab4a037f2a to your computer and use it in GitHub Desktop.
[LAMP on AMI] #AMI #AWS #EC-2 #Lamp #centos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment