Difference between revisions of "Server instance Setup"
m (→Local SMTP server) |
m (→Update DNS resolver, if necessary) (Tag: visualeditor) |
||
Line 19: | Line 19: | ||
=== Update DNS resolver, if necessary === | === Update DNS resolver, if necessary === | ||
− | <pre>$ sudo nano /etc/ | + | <pre>$ sudo nano /etc/resolv.conf</pre> |
<blockquote><pre>search MSF.ORG | <blockquote><pre>search MSF.ORG | ||
nameserver 8.8.8.8</pre></blockquote> | nameserver 8.8.8.8</pre></blockquote> |
Revision as of 01:09, 5 September 2017
Contents
Install Ubuntu Xenial on the target hosting server
The installation can be absolutely minimal; a few software packages that are required on the hosting server itself will be configured along the way. In most cases, this step will be performed by your ICT department, Internet Service Provider or the Support specialist.
Firstly, add the *nano* editor:
$ sudo apt-get install nano
Name the server and set the timezone
$ sudo nano /etc/hostname
GATITUX
$ sudo nano /etc/hosts
127.0.0.1 localhost 192.168.50.117 GATITUX.MSF.ORG GATITUX 127.0.0.1 kobo.msf.org 127.0.0.1 kc.msf.org 127.0.0.1 ee.msf.org
$ sudo dpkg-reconfigure tzdata $ sudo apt-get install ntp
Update DNS resolver, if necessary
$ sudo nano /etc/resolv.conf
search MSF.ORG nameserver 8.8.8.8
Local SMTP server
Different services running on the Host will attempt sending emails. Our own kobo-backup
script, for example, will email its output through cron
handler. Unattended OS upgrades will also try to email notifications, etc. A system-wide sendmail
service, which is a commonplace on Unix/Linux installations, is required to handle all those.
Please note: The KoBo Toolbox itself does not require sendmail
functions, it rather uses external SMTP service configured in Kobo Docker Setup.
A fully functional ESMTP server, like Postfix or Exim, can be installed on the Host. Configuring ESMTP server can be a daunting task even for a professional Unix admin, and is out of the scope of this manual. In short, challenges are
- SMTP configuration: message headers, including security info, are the deciding factor for successful delivery (i.e. avoiding blacklists, rejections and spam filters)
- Security configuration: SMTP servers are prone to unsolicited sending if not configured tightly, spamming en-masse using Host's resources and bandwidth.
Instead, we are going to use an SMTP server surrogate, which will provide sendmail
services on the Host using an external Email service with a standard mailbox access. Since there is actually no SMTP server, security aspect mentioned above does not apply, while SMTP configuration aspect is handled by the external service, in this case Office365.com.
We will use package ssmtp
, which is included in most Ubuntu Xenial images. If it is not pre-installed, you can add it with apt-get install ssmtp
.
$ sudo nano /etc/ssmtp/ssmtp.conf
Root=Kobo-OCB@brussels.msf.org UseTLS=YES UseStartTLS=YES AuthUser=Kobo-OCB@brussels.msf.org AuthPass=DertVzer98 AuthMethod=LOGIN rewriteDomain=brussels.msf.org hostname=GATITUX.MSF.ORG FromLineOverride=MO Debug=NO
$ sudo nano /etc/ssmtp/revaliases
root:Kobo-OCB@brussels.msf.org:smtp.office365.com:587 vladimir.maric@localhost=vladimir.maric@mreznisistemi.rs:smtp.office365.com:587 Francois-Xavier.Dosogne@localhost=Francois-Xavier.Dosogne@brussels.msf.org:smtp.office365.com:587 Manuel.Silva.Gallego@localhost=Manuel.Silva.Gallego@brussels.msf.org:smtp.office365.com:587
Try sending a test email:
$ echo "This is a test message" | sudo mail -s "Test subject" vladimir.maric@mreznisistemi.rs
Why sudo? The Linux user that initiates needs to be defined in revaliases
above, and currently root is the only local user there.
Install Docker engine
The process is exceptionally straigh-forward; just a few short commands to get to the first test: hello-world container doing what it does best. For additional information, please refer to official Installation Guide for Ubuntu.
$ sudo apt-get install apt-transport-https ca-certificates $ sudo apt-get install linux-image-extra-$(uname -r) $ sudo apt-get install apparmor git docker-engine $ sudo service docker start $ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
$ sudo curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose $ docker-compose --version