Add repositories


Our repositories are available at https://download.kopano.io/supported/ for customers and partners with a valid subscription. 
The serial is needed to access these repositories.


Create a file called kopano.list in /etc/apt/sources.list.d/  and add the following.

Take note that the following is an example for Debian 8. Adjust them according to your specific distribution if needed, such as Ubuntu_16.04

#Core
deb https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/Debian_8.0/ ./ 

Our packages are signed so we need to add the key as well.

$ sudo curl https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/Debian_8.0/Release.key | apt-key add -


All our packages are signed by the same key so you only need to add the key once


Create a file called kopano.repo in /etc/yum.repos.d/kopano.repo and add the following.

Take note that the following is an example for RHEL 7 and CentOS 7. Adjust them according to your specific distribution if needed

[Kopano-core] 
name=Final repository for Kopano-core (RHEL_7) 
type=rpm-md 
baseurl=https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/RHEL_7/
gpgcheck=1
gpgkey=https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/RHEL_7/repodata/repomd.xml.key
enabled=1 



Create a file called kopano.repo in /etc/zypp/repos.d/kopano.repo and add the following.

Take note that the following is an example for SLE 12. Adjust them according to your specific distribution if needed.

[Kopano-core] 
enabled=1
autorefresh=0
baseurl=https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/SLE_12/
gpgcheck=1
gpgkey=https://serial:<INSERT_SERIALKEY>@download.kopano.io/supported/core:/final/SLE_12/repodata/repomd.xml.key
type=rpm-md 





Install Kopano packages 

We will now install kopano-server-packages and the MySQL server.

kopano-server-packages is a meta package that has a dependency to the basic kopano-core packages

The following is installed with kopano-server-packages

Install Kopano and MySQL/MariaDB


First install apt-transport-https 

sudo apt install apt-transport-https 

 

Update the apt database so the Kopano repositories are added

$ sudo apt update

and install

$ sudo apt install mysql-server kopano-server-packages




$ sudo yum install kopano-server-packages mariadb-server mariadb

If you want to enable the kopano-packages and mariadb services

$ sudo systemctl enable mariadb
$ sudo systemctl enable kopano-server
$ sudo systemctl enable kopano-dagent
$ sudo systemctl enable kopano-spooler
$ sudo systemctl enable kopano-gateway




$ zypper install mariadb-server kopano-server-packages




Configure SQL database


Now create a Kopano user in the MySQL server.

$ sudo mysql -u root -p   
mysql> CREATE USER 'kopano'@'localhost' IDENTIFIED BY '<password>'; 
mysql> GRANT ALL PRIVILEGES ON kopano.* TO 'kopano'@'localhost';


On RPM bases distributions example config files are placed in /usr/share/doc/kopano/example-config/. If you need to change a config file, you need to copy it to /etc/kopano/

Change the MySQL password in the /etc/kopano/server.cfg

# The user under which we connect with MySQL 
mysql_user = kopano 
# The password for the user (leave empty for no password)
mysql_password = <kopano-user-password>

 

User backend

The preferred way to manage users in a professional environment is OpenLDAP, but Kopano supports several other user backends as well;




To install OpenLDAP, please use this guide

Add the kopano schema to the ldap server

$ zcat /usr/share/doc/kopano/kopano.ldif.gz | sudo ldapadd -H ldapi:/// -Y EXTERNAL


Change the user_plugin  in the /etc/kopano/server.cfg

# Name of the plugin that handles users
# Required, default = db
# Values: ldap, unix, db, ldapms
user_plugin     = ldap

# configuration file of the user plugin, examples can be found in /usr/share/doc/kopano/example-config
user_plugin_config  = /etc/kopano/ldap.cfg


Copy the ldap.cfg to /etc/kopano

$ sudo cp /usr/share/doc/kopano/example-config/ldap.cfg  /etc/kopano/

The ldap.cfg has only the options that need to be save all other options are listed in /usr/share/kopano/ldap.openldap.cfg.

If you need to change an other option just add it to the ldap.cfg. ldap.openldap.cfg in /usr/share/kopano/ is not marked as config file so you changes will be removed after a upgrade.

Edit /etc/kopano/ldap.cfg

Add your LDAP bind user and password if you do not use anonymous bind;

ldap_bind_user = cn=admin,dc=kopano,dc=example
ldap_bind_password = kopano

Change the search base so it matches our organisation
ldap_search_base = dc=kopano,dc=example

Now start  the kopano-server

$ sudo systemctl start kopano-server

 


Download the latest version of the AD exstension from our site https://download.kopano.io/supported/adextension:/final/

Make sure you excecute the msi file with a schema master user

Depending on your needs choose for the Typical install of Custom setup

The Typical setup will install the schema and the MMC Snap-in(Active directory tabs)

When the installer is finisched go the Active directory and open one of the user

You should now have to kopano tabs (Kopano, Kopano Features)

Now start  the kopano-server

$ sudo systemctl start kopano-server

 



It is known that Samba 4 can be slow if you u have more the 25 users. This is due the lack of index capabilities of Samba 4 at the moment.

Therefore we do not recommend using Samba 4 if you have more then 25 users.


Download the ldif and installer from https://stash.kopano.io/projects/KC/repos/kopano-ads-source/browse/samba/kopano-samba-ads

Run kopano_schema_add.sh

bash 4.0 or higher is required


$sudo bash kopano_schema_add.sh

Download the latest version of the AD exstension from our site https://download.kopano.io/supported/adextension:/final/

Make sure you excecute the msi file with a schema master user

Depending on your needs choose for the Typical install of Custom setup

The Typical setup will install the schema and the MMC Snap-in(Active directory tabs)

When the installer is finisched go the Active directory and open one of the user

You should now have to kopano tabs (Kopano, Kopano Features)


Change the user_plugin  in the /etc/kopano/server.cfg

# Name of the plugin that handles users
# Required, default = db
# Values: ldap, unix, db, ldapms
user_plugin     = ldap

# configuration file of the user plugin, examples can be found in /usr/share/doc/kopano/example-config
user_plugin_config  = /etc/kopano/ldap.cfg


Copy the ldap.cfg to /etc/kopano

$ sudo cp /usr/share/doc/kopano/example-config/ldap.cfg  /etc/kopano/

The ldap.cfg has only the options that need to be save all other options are listed in /usr/share/kopano/ldap.active-directory.cfg.

If you need to change an other option just add it to the ldap.cfg. ldap.active-directory.cfg in /usr/share/kopano/ is not marked as config file so you changes will be removed after a upgrade.

Edit /etc/kopano/ldap.cfg

Switch the ldap.active-directory.cfg config

#!include /usr/share/kopano/ldap.openldap.cfg
!include /usr/share/kopano/ldap.active-directory.cfg

Add your LDAP bind user and password if you do not use anonymous bind;

ldap_bind_user = cn=admin,dc=kopano,dc=example
ldap_bind_password = kopano

Change the search base so it matches your organisation
ldap_search_base = dc=kopano,dc=example

Now start  the kopano-server

$ sudo systemctl start kopano-server

 



You do not have to change anything if you use the Database backend, as this already is the default value for user_plugin

user_plugin = db

Now start  the kopano-server

$ sudo systemctl start kopano-server

 You can now create a user

$ sudo kopano-cli --create -u john --fullname "john doe" --password john --email john@doe.com





To see if the kopano-server is started and contains users, use kopano-cli --list-users


$ sudo kopano-cli --list-users
User list for Default (2):
            User           Full Name          Homeserver                                   Store
------------------------------------------------------------------------------------------------
          SYSTEM              SYSTEM              Kopano        8962FFEFFB7B4D639BC5967C4BB58234
            john            john doe              Kopano        8ECC5FB292CB42C1A5DE59C369ECBFF7


Please check server.log in /var/log/kopano if you get the following error.

$ sudo kopano-cli --list-users
Unable to open Admin session: network error (0x80040115)
The server is not running, or not accessible through "default:".
Using the -v option (possibly multiple times) may give more hints.