How to install Horde Webmail on Debian 10

How to install Horde Webmail on Debian 10

Horde Groupware is a free open source collaboration suite that provides calendars, notes, tasks, file managers and more. It has a dynamic, basic, and mobile-friendly web-based interface and provides unlimited resources for each user. It runs on any web server with PHP support and most operating systems including Linux, Windows, MacOS and Solaris.

In this tutorial, we will learn how to install Horde Groupware on a Debian 10 server.

prerequisites

  • A server running Debian 10.
  • A valid domain name pointing to the server IP. In this tutorial, we will use the test.example.com domain.
  • A root password is configured on your server.

getting Started

Before you start, it’s a good idea to update your system to the latest version. You can use the following command to update the system:

apt-get update -y apt-get upgrade -y

After updating the system, restart it to implement the changes.

Install Apache, MariaDB and PHP

Horde runs on a web server written in PHP and uses MariaDB to store its data. Therefore, you will need to install Apache, MariaDB, PHP and other required dependencies in your system. You can install them all by running:

apt-get install apache2 mariadb-server php php-pear libapache2-mod-php php-common php-curl php-mbstring php-xmlrpc php-mysql php-gd php-xml php-intl php-ldap php-imagick php-tidy php-json php-cli -y

After installing all packages, open the php.ini file and make some changes:

nano /etc/php/7.3/apache2/php.ini

Change the following lines:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

Save and close the file when you are finished.

Configuration database

By default, MariaDB root password is not configured in Debian 10. Therefore, you need to set it up first.

To do this, log in to the MariaDB shell using the following command:

mysql

After logging in, set your MariaDB root password using the following command:

MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("rootpassword");

Next, create a database and user for Horde using the following command:

MariaDB [(none)]> CREATE DATABASE hordedb; MariaDB [(none)]> CREATE USER 'hordeuser'@'localhost' IDENTIFIED BY 'password';

Next, grant all privileges to the Horde database using the following command:

MariaDB [(none)]> GRANT ALL ON hordedb.* TO 'hordeuser'@'localhost' WITH GRANT OPTION;

Next, refresh the privileges and exit from the MariaDB shell using the following command:

MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;

When you are done, you can proceed to the next step.

Install and configure the tribe

In order to install the tribe, you will need to register for the tribal pear channel. You can use the following commands:

pear channel-discover pear.horde.org

You should see the following output:

Adding Channel "pear.horde.org" succeeded
Discovery of channel "pear.horde.org" succeeded

Next, install the tribal character using the following command:

pear install horde/horde_role

You should see the following output:

downloading Horde_Role-1.0.1.tgz ...
Starting to download Horde_Role-1.0.1.tgz (10,977 bytes)
.....done: 10,977 bytes
install ok: channel://pear.horde.org/Horde_Role-1.0.1
horde/Horde_Role has post-install scripts:
/usr/share/php/PEAR/Installer/Role/Horde/Role.php
Horde_Role: Use "pear run-scripts horde/Horde_Role" to finish setup.
DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES

Next, you will need to set up the tribal file system directory. You can use the following commands to set it up:

pear run-scripts horde/horde_role

You will be asked to provide the tribal directory path as follows:

Including external post-installation script "/usr/share/php/PEAR/Installer/Role/Horde/Role.php" - any errors are in this script
Inclusion succeeded
running post-install script "Horde_Role_postinstall->init()"
init succeeded
Filesystem location for the base Horde application : /var/www/horde
Configuration successfully saved to PEAR config.
Install scripts complete

Finally, install the tribal components using the following command:

pear install -a -B horde/groupware groupware-install

You will be asked to provide some settings such as database backend, database user, password, database, tribe administrator user and password as shown below:

Installing Horde Groupware

Configuring database settings

What database backend should we use? 
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (oci8) Oracle
    (pgsql) PostgreSQL
    (sqlite) SQLite

Type your choice []: mysql

Username to connect to the database as* [] hordeuser
Password to connect with 
How should we connect to the database? 
    (unix) UNIX Sockets
    (tcp) TCP/IP

Type your choice [unix]: unix

Location of UNIX socket []  

Database name to use* [] hordedb

Internally used charset* [utf-8] 
Use SSL to connect to the server? 
    (false) No
    (true) Yes

Type your choice []: false
Split reads to a different server? 
    (false) Disabled
    (true) Enabled

Type your choice [false]: 
Should Horde log all queries. If selected, queries will be logged at the DEBUG level to your configured logger. 
    (1) Yes
    (0) No

Type your choice [0]: 

Writing main configuration file... done.

Creating and updating database tables... done.

Configuring administrator settings

Specify a user name for the administrator account: [email protected]
Specify a password for the administrator account:

Writing main configuration file... done.

Thank you for using Horde Groupware.

After installation is complete, create a temporary directory for Horde using the following command:

mkdir /var/www/horde/tmp

Next, set the tribal password tool using the following command:

pear install -a -B horde/passwd

Next, grant the appropriate permissions to the tribal directory using the following command:

chown -R www-data:www-data /var/www/horde/

When you are done, you can proceed to the next step.

Configure Apache for the tribe

Next, you will need to configure the Apache virtual host profile for Horde. You can create it using:

nano /etc/apache2/conf-available/horde.conf

Add the following lines:

Alias /Microsoft-Server-ActiveSync /var/www/horde/rpc.php
Alias /horde /var/www/horde
ServerName test.example.com
DocumentRoot /var/www/horde

           DirectoryIndex index.php
           Options +FollowSymLinks
           AllowOverride All
           Require all granted
           AddType application/x-httpd-php .php
           php_value include_path ".:/usr/share/php"
           php_value open_basedir "none"
           php_value upload_tmp_dir "/var/www/horde/tmp/"

Save and close the file when you are finished. Then, enable the tribal profile using the following command:

a2enconf horde

Finally, restart the Apache service to apply the changes:

systemctl restart apache2

Access tribal components

Now, open your web browser and enter the URL http://test.example.com/horde. You will be redirected to the Horde Groupware login page:

Provide your administrator username, password, and click recording in Button. You should see the Horde Groupware default dashboard in the following pages:

Tribal webmail

in conclusion

Congratulations! You have successfully installed and configured Horde Groupware on your Debian 10 server. Now you can start exploring tribes and expanding functionality. If you have any questions, feel free to ask me.

Source

Sidebar