Install Drupal on Ubuntu Server 14.04 on Azure

posted Apr 4, 2016, 6:41 AM by Andrew Chadick   [ updated Dec 6, 2016, 12:39 PM ]
Sep 19, 2014 Drupal, CMS, LAMP Stack Ubuntu
All credit for this post goes here:
https://www.digitalocean.com/community/tutorials/how-to-install-drupal-on-an-ubuntu-14-04-server-with-apache




PCWizardsInc Note: if you setup the mail host being a relay to a smart host, this will install Postfix in to the server. If you use Gmail as your email backend for your domain, you will need to setup an account for your website to use, then enable 2 factor on the account. Once 2 factor is enabled, create an application specific password, and give that password to your Drupal server for its smart host relay. This will resolve the problem where Postfix errors out when trying to authenticate using non-modern methods.





Postfix Notes:> sudo nano /etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes

> sudo nano /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 USERNAME@gmail.com:APP SPECIFIC PASSWORD


> sudo chmod 400 /etc/postfix/sasl_passwd > sudo postmap /etc/postfix/sasl_passwd


> sudo cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem

> sudo /etc/init.d/postfix reload


If you set the Application Specific Password correctly, it should work by using this:
> echo "Test mail from postfix" | mail -s "Test Postfix" you@example.com


Useful Links:
http://linoxide.com/ubuntu-how-to/install-drupal-7-x-apache-2-x-ubuntu/

Site backup:
https://www.drupal.org/upgrade/backing-your-site-command-line

Postfix:
https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/
http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html

Comments