#!/bin/bash


sudo apt-get update
sudo apt-get -y install nginx
sudo apt-get -y install php5-fpm
sudo sed -i 's/# multi_accept on;/multi_accept on;/g' /etc/nginx/nginx.conf
sudo sed -i 's/# server_tokens off;/server_tokens off;/g' /etc/nginx/nginx.conf
sudo sed -i 's/# gzip/gzip/g' /etc/nginx/nginx.conf
sudo apt-get -y install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get -y install php5-gd libssh2-php snmp
sudo service php5-fpm restart
sudo service nginx reload
sudo service nginx restart
cd /var/tmp/
wget http://yanivp.net/wp-content/uploads/2016/08/default
sudo cp /var/tmp/default /etc/nginx/sites-enabled/default
sudo service php5-fpm restart && sudo service nginx reload && sudo service nginx restart
cd /usr/share/nginx/html/
sudo rm index.html
sudo mkdir /var/www
sudo mkdir /var/www/html
cd /var/www/html
sudo apt-get -y install mysql-server
mysqladmin -u root -p create dbname;
cd /var/tmp/
sudo wget http://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz
sudo rm /var/www/html/index.php
sudo cp -avr /var/tmp/wordpress/* /var/www/html/
sudo chown -R www-data /var/www/html
sudo apt-get -y install phpmyadmin 
#don’t select apache  and select No in dbconfig open print screen #
sudo ln -s /usr/share/phpmyadmin/ /var/www/html
#show my ip#
wget http://ipinfo.io/ip -qO -

