Skip to content

Instantly share code, notes, and snippets.

@Valtervieira
Created March 16, 2017 15:28
Show Gist options
  • Save Valtervieira/165a50e8534d5818047b9e168734bf46 to your computer and use it in GitHub Desktop.
Save Valtervieira/165a50e8534d5818047b9e168734bf46 to your computer and use it in GitHub Desktop.
#!/bin/bash
yum update -y
yum install -y httpd24 php56 mysql55-server php56-mysqlnd
service httpd start
chkconfig httpd on
groupadd www
usermod -a -G www ec2-user
chown -R root:www /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} +
find /var/www -type f -exec chmod 0664 {} +
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
sudo service mysqld start
#sudo mysql_secure_installation
# responder Y para as próximas 5 perguntas
sudo service mysqld stop
sudo chkconfig mysqld on
# Instalar PHPMYAdmin
sudo yum --enablerepo=epel install phpmyadmin -y
sudo ln -s /usr/share/phpMyAdmin /data/www/html/phpMyAdmin
sudo chmod 0700 /etc/httpd/conf.d/phpMyAdmin.conf
sudo yum install mlocate -y
sudo updatedb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment