You should already be in the vagrant server with vagrant ssh
.
sudo su
apt-get update
apt-get upgrade -y
exit # root
exit # exit vagrant (to reboot)
From outside the vagrant server reboot then ssh back in.
vagrant reload
vagrant ssh
We want MySQL 5.5.
sudo su
apt-get install mysql-server mysql-client -y
# MySQL Password: F9iYMLHKd7iVnx
This will help to be able to add PPA repos.
apt-get install python-software-properties -y
This is the latest stable version.
add-apt-repository ppa:nginx/stable -y
apt-get update
apt-get install nginx -y
/etc/init.d/nginx start
Install PHP 5.5.
add-apt-repository ppa:ondrej/php5 -y
apt-get update
apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt -y
cd /usr/share/nginx/html
mkdir www.example.com
wget -O /etc/nginx/sites-available/www.example.com https://gist.githubusercontent.com/7hunderbird/9787446/raw/ed223970a182d402bebf665356b57463166f1025/example.conf
cd /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/www.example.com www.example.com
rm default
cd ~
mkdir src
cd ~/src/
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
cd ~/src/wordpress/
cp -R * /usr/share/nginx/html/www.example.com/
mysql -uroot -pF9iYMLHKd7iVnx -e "create database wordpress";
cd /usr/share/nginx/html
find /usr/share/nginx/html/ -type d -exec chmod 755 {} \;
find /usr/share/nginx/html/ -type f -exec chmod 644 {} \;
chown -R www-data:www-data /usr/share/nginx/html/www.example.com
chmod -R 755 /usr/share/nginx/html/
/etc/init.d/nginx restart
/etc/init.d/php5-fpm restart