In OX App Suite Server Installation for Dummies you can read how to quickly install OX App Suite in a well prepared Debian Jessie Vagrant image. This is nice to quickly get a system in a virtual machine up and running, but in case you prefer to install and configure the OX App Suite system requirements in your own machine, here is a simplified version of the script that I used to prepare the Vagrant image:
Please note that the script simply assumes that dovecot and postfix haven’t been configured before. An old /etc/dovecot/dovecot.conf will simply be overwritten, and some stuff will blindly be appended to the /etc/postfix/master.cf.
After running the installation script from above, reboot the machine or restart the services for postfix and mysql.
If you want to test this in a fresh vanilla Debian Jessie Vagrant VM, you can simply get one by doing more or less the same steps as described in the previous article:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/usr/bin/env bash
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
set -e
apt-get update -y
apt-get upgrade -y
apt-get install -y openssh-server
apt-get install -y openssh-server ntp ntpdate apt-transport-https openjdk-7-jre-headless
apt-get install -y apache2 mysql-server postfix dovecot-core dovecot-imapd
#configure mysql
mysqladmin -u root password secret
#configure postfix
echo alias_maps = hash:/etc/aliases >> /etc/postfix/main.cf
echo alias_database = hash:/etc/aliases >> /etc/postfix/main.cf
echo local_recipient_maps = proxy:unix:passwd.byname $alias_maps >> /etc/postfix/main.cf
echo mailer-daemon: postmaster >> /etc/aliases
echo nobody: postmaster >> /etc/aliases
echo hostmaster: postmaster >> /etc/aliases
echo usenet: postmaster >> /etc/aliases
echo news: postmaster >> /etc/aliases
echo webmaster: postmaster >> /etc/aliases
echo www: postmaster >> /etc/aliases
echo ftp: postmaster >> /etc/aliases
echo abuse: postmaster >> /etc/aliases
/usr/bin/newaliases
sed -i 's/^mail:x:8:/mail:x:8:postfix/g' /etc/group
#configure dovecot
echo 'disable_plaintext_auth = no' > /etc/dovecot/dovecot.conf
echo 'mail_privileged_group = mail' >> /etc/dovecot/dovecot.conf
echo 'mail_location = mbox:~/mail:INBOX=/var/mail/%u' >> /etc/dovecot/dovecot.conf
echo 'userdb {' >> /etc/dovecot/dovecot.conf
echo ' driver = passwd' >> /etc/dovecot/dovecot.conf
echo '}' >> /etc/dovecot/dovecot.conf
echo 'passdb {' >> /etc/dovecot/dovecot.conf
echo ' args = %s' >> /etc/dovecot/dovecot.conf
echo ' driver = pam' >> /etc/dovecot/dovecot.conf
echo '}' >> /etc/dovecot/dovecot.conf
echo 'protocols = " imap"' >> /etc/dovecot/dovecot.conf
echo 'protocol imap {' >> /etc/dovecot/dovecot.conf
echo ' mail_plugins = " autocreate"' >> /etc/dovecot/dovecot.conf
echo '}' >> /etc/dovecot/dovecot.conf
echo 'plugin {' >> /etc/dovecot/dovecot.conf
echo ' autocreate = Trash' >> /etc/dovecot/dovecot.conf
echo ' autocreate2 = Sent' >> /etc/dovecot/dovecot.conf
echo ' autosubscribe = Trash' >> /etc/dovecot/dovecot.conf
echo ' autosubscribe2 = Sent' >> /etc/dovecot/dovecot.conf
echo '}' >> /etc/dovecot/dovecot.conf
echo 'service auth {' >> /etc/dovecot/dovecot.conf
echo ' unix_listener /var/spool/postfix/private/auth {' >> /etc/dovecot/dovecot.conf
echo ' group = postfix' >> /etc/dovecot/dovecot.conf
echo ' mode = 0660' >> /etc/dovecot/dovecot.conf
echo ' user = postfix' >> /etc/dovecot/dovecot.conf
echo ' }' >> /etc/dovecot/dovecot.conf
echo '}' >> /etc/dovecot/dovecot.conf
echo 'ssl=required' >> /etc/dovecot/dovecot.conf
echo 'ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem' >> /etc/dovecot/dovecot.conf
echo 'ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key' >> /etc/dovecot/dovecot.conf
echo 'submission inet n - - - - smtpd' >> /etc/postfix/master.cf
echo ' -o syslog_name=postfix/submission' >> /etc/postfix/master.cf
echo ' -o smtpd_tls_wrappermode=no' >> /etc/postfix/master.cf
echo ' -o smtpd_tls_security_level=encrypt' >> /etc/postfix/master.cf
echo ' -o smtpd_sasl_auth_enable=yes' >> /etc/postfix/master.cf
echo ' -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject' >> /etc/postfix/master.cf
echo ' -o milter_macro_daemon_name=ORIGINATING' >> /etc/postfix/master.cf
echo ' -o smtpd_sasl_type=dovecot' >> /etc/postfix/master.cf
echo ' -o smtpd_sasl_path=private/auth' >> /etc/postfix/master.cf
|
- run “vagrant init oxdev/debian-jessie-x64“
- In the same directory, create a file install.sh with the content from above
- run “vagrant up“
- run “vagrant ssh“
- run “sudo /vagrant/install.sh“
Now you have basically the same like when using the Vagrant image oxdev/oxappsuite-base, just that the scripts for installing and configuring OX App Suite are missing.
Vagrant will automatically mount the root folder of your Vagrant project to /vagrant, so copy all other scripts that you want to access there. For example, copy the OX App Suite installation scripts from the oxdev/oxappsuite-base VM. They are all located in /home/vagrant.
Disclaimer: The script above is for demonstration purpose only. For a production system, make sure to use secure passwords and configurations.