# setup basic firewall UFW
sudo ufw app list
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status
### Mysql
# Step 1: Update your system by typing the following command
sudo apt update
sudo apt dist-upgrade
# Step 2: Install mysql version 5.7 on Ubuntu 16.04
sudo apt install mysql-server
# Step 3: Run mysql_secure_installation to secure your installation
sudo mysql_secure_installation
### Apache
# Step 1: install apache
apt install apache2
# If you look at the Apache Full profile, it should show that it enables traffic to ports 80 and 443:
sudo ufw app info "Apache Full"
# Allow incoming traffic for this profile:
sudo ufw allow in "Apache Full"
sudo ufw allow in "OpenSSH"
# fiing error: apache2: Could not reliably determine the server's fully qualified domain name
touch /etc/apache2/conf-available/servername.conf
# put inside servername.conf
ServerName srv.webium.me
# assuming you called the file added to conf-available on step 1 'servername.conf'
sudo a2enconf servername
# turn on mods for drupal
a2enmod rewrite headers
# install unzip
apt install unzip
service apache2 reload
### PHP
sudo apt install php libapache2-mod-php php-mcrypt php-mysql
# move index.php to the start of line
vi /etc/apache2/mods-enabled/dir.conf
# install required by drupal php modules
apt install php7.0-curl php7.0-xml php7.0-gmp php7.0-gd php7.0-mbstring php7.0-xmlrpc php7.0-zip
# you can search for php modules this way
apt-cache search php7.0 | less
# restart apache2
service apache2 restart