Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. PUBLIC_IP=54.x.x.x
  2. SSH_KEY=~/.ssh/MYKEY.pem
  3. MYSQL_PASS=myPassword
  4. ssh-add ${SSH_KEY}
  5. ssh ubuntu@${PUBLIC_IP} <<- EOF
  6. sudo apt-get update -y
  7. sudo apt-get install apache2 -y
  8. sudo apt-get install php5 php5-cli libapache2-mod-php5 -y
  9. echo "mysql-server-5.1 mysql-server/root_password password ${MYSQL_PASS}" | debconf-set-selections
  10. echo "mysql-server-5.1 mysql-server/root_password_again password ${MYSQL_PASS}" | debconf-set-selections
  11. sudo apt-get -y install mysql-server-5.1
  12. sudo /etc/init.d/apache2 restart -y
  13. cd /var/www/html/
  14. sudo mv index.html index.php
  15. sudo chown ubuntu index.php
  16. echo "<?php echo 'PHP works'; ?>" > index.php
  17. EOF
  18. google-chrome ${PUBLIC_IP}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement