Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).

Installing Open-Xchange on Ubuntu 12.04

4 min read

I thought of starting my day today with Open-Xchange. I had Vmware Workstation installed on one of Windows 7 Enterprise machine. I installed a minimal Ubuntu 12.04 as VM and ready to install. Here it goes:

ox

1. Pre-Requisite:

Installed Ubuntu 12.04

With apt-get utility working.(Internet Connectivity)

Ensure you have a FQDN name under /etc/hosts

iRedMail(Mail Server) software downloaded from http://iredmail.org/download.html

2. Edit the /etc/apt/sources.list and add the following entry:

deb http://download.opensuse.org/repositories/server:/OX:/ox6/xUbuntu_12.04/ /

3. Import the key:

$sudo wget http://software.open-xchange.com/oxbuildkey.pub-O – | apt-key add –

Ensure it showing as “Ok”.

4. Update the machine:

sudo apt-get update

4. Lets install iRedMail server

$ apt-Get install bzip2

$ cd / root

$ mkdir install

$ cd /root/install

$ wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.8.4.tar.bz2

$ tar xjf iRedMail-0.8.2.tar.bz2

$ cd / root/install/iRedMail-0.8.2 /

$ bash iRedMail.sh

It will finish as shown below:

********************************************************************

* Start iRedMail Configurations

********************************************************************

< INFO > Create self-signed SSL certification files.

< INFO > Create required system accounts: vmail, iredapd, iredadmin.

< INFO > Configure Apache web server and PHP.

< INFO > Configure MySQL database server.

mysqladmin: connect to server at ‘localhost’ failed

error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

< INFO > Configure Postfix (Message Transfer Agent).

< INFO > Configure Policyd (postfix policy server, code name cluebringer).

< INFO > Configure Dovecot (pop3/imap/managesieve server, version 2).

< INFO > Configure ClamAV (anti-virus toolkit).

< INFO > Configure Amavisd-new (interface between MTA and content checkers).

drop_priv: No such username:

< INFO > Configure SpamAssassin (content-based spam filter).

< INFO > Configure iRedAPD (postfix policy daemon).

< INFO > Configure iRedAdmin (official web-based admin panel).

< INFO > Configure Fail2ban (authentication failure monitor).

< INFO > Configure Awstats (logfile analyzer for mail and web server).

< INFO > Configure Roundcube webmail.

< INFO > Configure phpMyAdmin (web-based MySQL management tool).

*************************************************************************

* iRedMail-0.8.4 installation and configuration complete.

*************************************************************************

< Question > Would you like to *REMOVE* sendmail now? [Y|n]Y

< INFO > Removing package(s): sendmail

Reading package lists… Done

Building dependency tree

Reading state information… Done

Package sendmail is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 107 not upgraded.

< Question > Would you like to use firewall rules provided by iRedMail now?

< Question > File: /etc/default/iptables, with SSHD port: 22. [Y|n]n

< INFO > Skip firewall rules.

< INFO > Deliver administration emails to postmaster@ubuntu.mail.com.

< INFO > Updating ClamAV database (freshclam), please wait …

ClamAV update process started at Fri Jun 21 08:18:21 2013

WARNING: DNS record is older than 3 hours.

WARNING: Invalid DNS reply. Falling back to HTTP mode.

Downloading main.cvd [100%]

main.cvd updated (version: 54, sigs: 1044387, f-level: 60, builder: sven)

Reading CVD header (daily.cvd): OK (IMS)

daily.cvd is up to date (version: 17389, sigs: 1361238, f-level: 63, builder: guitar)

Reading CVD header (bytecode.cvd): OK (IMS)

bytecode.cvd is up to date (version: 214, sigs: 41, f-level: 63, builder: neo)

Database updated (2405666 signatures) from db.local.clamav.net (IP: 203.178.137.175)

********************************************************************

* URLs of installed web applications:

*

* – Webmail: httpS://ubuntu.localdomain/mail/

* – Admin Panel (iRedAdmin): httpS://ubuntu.localdomain/iredadmin/

* + Username: postmaster@ubuntu.mail.com, Password: ajeetraina@ubuntu.mail.com

*

********************************************************************

* Congratulations, mail server setup completed successfully. Please

* read below file for more information:

*

* – /root/install/iRedMail-0.8.4/iRedMail.tips

*

* And it’s sent to your mail account postmaster@ubuntu.mail.com.

*

* Please reboot your system to enable mail services.

6. Now install Open-Xchange server through the below command:

aptitude install \

open-xchange open-xchange-authentication-database \

open-xchange-admin-client open-xchange-admin-lib \

open-xchange-admin-plugin-hosting open-xchange-admin-plugin-hosting-client \

open-xchange-admin-plugin-hosting-lib open-xchange-configjump-generic \

open-xchange-admin-doc open-xchange-contactcollector \

open-xchange-conversion open-xchange-conversion-engine \

open-xchange-conversion-servlet open-xchange-crypto \

open-xchange-data-conversion-ical4j open-xchange-dataretention \

open-xchange-genconf open-xchange-genconf-mysql \

open-xchange-imap open-xchange-mailfilter \

open-xchange-management open-xchange-monitoring \

open-xchange-passwordchange-database open-xchange-passwordchange-servlet \

open-xchange-pop3 open-xchange-publish open-xchange-publish-basic \

open-xchange-publish-infostore-online open-xchange-publish-json \

open-xchange-publish-microformats open-xchange-push-udp \

open-xchange-resource-managerequest open-xchange-server \

open-xchange-settings-extensions open-xchange-smtp \

open-xchange-spamhandler-default open-xchange-sql open-xchange-subscribe \

open-xchange-xerces-sun open-xchange-subscribe-json \

open-xchange-subscribe-microformats open-xchange-subscribe-crawler \

open-xchange-templating open-xchange-threadpool open-xchange-unifiedinbox \

open-xchange-admin-plugin-hosting-doc open-xchange-charset \

open-xchange-group-managerequest open-xchange-i18n open-xchange-jcharset \

open-xchange-sessiond open-xchange-calendar-printing \

open-xchange-user-json open-xchange-gui-wizard-plugin \

open-xchange-report-client \

open-xchange-configjump-generic-gui \

open-xchange-gui open-xchange-gui-wizard-plugin-gui \

open-xchange-online-help-de \

open-xchange-online-help-en open-xchange-online-help-fr open-xchange-gui-lang-community-ru-ru \

9. Run this command:

$ /etc/init.d/mysql restart

10.

echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc &&. ~/.bashrc

11.

echo “GRANT ALL PRIVILEGES ON *.* TO ‘openexchange’@’localhost’ IDENTIFIED BY ‘open_password’;” > /tmp/openXchange_pri.sql

12. $ mysql -u root < /tmp/openXchange_pri.sql mysql -p

13.

$ /opt/open-xchange/sbin/initconfigdb –configdb-pass=open_password

14.

$/opt/open-xchange/sbin/initconfigdb –configdb-pass=open_password

15.

$ /opt/open-xchange/sbin/oxinstaller –no-license –servername=oxserver \

–configdb-pass=open_password –master-pass=open_master_password –ajp-bind-port=localhost –servermemory 1024

$ /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P mysql123

16.

mkdir /var/opt/filestore

chown open-xchange:open-xchange /var/opt/filestore

17.

/opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P mysql123 \

-t file:/var/opt/filestore -s 1000000

18.

/opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P mysql123 \

-n oxdatabase -p mysql123 -m true

19.

$ a2enmod proxy proxy_ajp proxy_balancer expires deflate headers rewrite mime setenvif

20.

$ /etc/init.d/apache2 force-reload

21.

mcedit /etc/apache2/conf.d/proxy_ajp.conf

22.

$ vim /etc/apache2/sites-available/default <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /var/www/> AllowOverride None Order allow,deny allow from all RedirectMatch ^/$ /ox6/ Options +FollowSymLinks +SymLinksIfOwnerMatch </Directory> # deflate AddOutputFilterByType DEFLATE text/html text/plain text/javascript application/javascript text/css text/xml application/xml text/x-js application/x-javascript # pre-compressed files AddType text/javascript .jsz AddType text/css .cssz AddType text/xml .xmlz AddType text/plain .po AddEncoding gzip .jsz .cssz .xmlz SetEnvIf Request_URI “\.(jsz|cssz|xmlz)$” no-gzip ExpiresActive On <Location /ox6> # Expires (via ExpiresByType to override global settings) ExpiresByType image/gif “access plus 6 months” ExpiresByType image/png “access plus 6 months” ExpiresByType image/jpg “access plus 6 months” ExpiresByType image/jpeg “access plus 6 months” ExpiresByType text/css “access plus 6 months” ExpiresByType text/html “access plus 6 months” ExpiresByType text/xml “access plus 6 months” ExpiresByType text/javascript “access plus 6 months” ExpiresByType text/x-js “access plus 6 months” ExpiresByType application/x-javascript “access plus 6 months” ExpiresDefault “access plus 6 months” Header append Cache-Control “private” Header unset Last-Modified Header unset Vary # Strip version RewriteEngine On RewriteRule v=\w+/(.+) $1 [L] # Turn off ETag Header unset ETag FileETag None </Location> <Location /ox6/ox.html> ExpiresByType text/html “now” ExpiresDefault “now” Header unset Last-Modified Header set Cache-Control “no-store, no-cache, must-revalidate, post-check=0, pre-check=0” # Turn off ETag Header unset ETag FileETag None </Location> <Location /ox6/index.html> ExpiresByType text/html “now” ExpiresDefault “now” Header unset Last-Modified Header set Cache-Control “no-store, no-cache, must-revalidate, post-check=0, pre-check=0” # Turn off ETag Header unset ETag FileETag None </Location> </VirtualHost>22.$ sudo /etc/init.d/apache2 restart
23.
sudo /etc/init.d/open-xchange-groupware start
24.$ /opt/open-xchange/sbin/createcontext -A oxadminmaster -P open_master_password -c 1 \-u oxadmin -d “Context Admin” -g Admin -s User -p admin_password -L defaultcontext \-e oxadmin@company.com -q 1024 –access-combination-name=all

svn –password “” –username anonymous co https://svn.open-xchange.com/ox-quickinstall/

http://paste.ubuntu.com/5789872/

http://paste.ubuntu.com/5789888/

Next,

$ /opt/open-xchange/sbin/createcontext -A oxadminmaster -P mysql123 -c 1 \

-u oxadmin -d “Context admin” -g aAdmin -s User -p mysql123 -L defaultcontext \

-e oxadmin@clevercircuits.com -q 1024 –access-combination-name=all

$ /opt/open-xchange/sbin/createcontext -A oxadminmaster -P mysql123 -c 1 \

-u oxadmin -d “Context admin” -g admin -s User -p mysql123d -L defaultcontext \

-e oxadmin@clevercircuits.com -q 1024 –access-combination-name=groupware_standard

$ /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P mysql123 -u testuser \

-d “Test User” -g test -s User -p secret -e testuser@clevercircuits.com \

–imaplogin testuser –imapserver 127.0.0.1 –smtpserver 127.0.0.1

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server