#install nginx php mysql

apt install -y nginx php7.0 php7.0-mysql mysql-server mysql-client
apt install -y php7.0 php7.0-gd php7.0-xml php7.0-curl php7.0-mbstring php7.0-mcrypt php7.0-xmlrpc

#activate mod_rewrite

a2enmod rewrite ssl
a2ensite default-ssl.conf

#modify mysql setting

update user set plugin='' where User='root';
update user set Password=PASSWORD('newpasswd') where USER='root';
flush privileges;