Installing HumHub on Arch Linux

HumHub is a social networking platform that is designed for small to medium-sized businesses. It is an open-source solution that is easy to install on a variety of platforms. Arch Linux is an excellent choice for running HumHub as it is a lightweight and stable operating system that provides great performance.

This tutorial will guide you through the installation process of HumHub on Arch Linux.

Prerequisites

Before we get started, let's ensure that we have all the prerequisites installed.

Step 1: Install Apache Web Server

To install Apache Web Server, run the following command:

sudo pacman -S apache

Once Apache is installed, start and enable the service:

sudo systemctl start httpd.service
sudo systemctl enable httpd.service

You can verify that Apache is working by opening a web browser and navigating to http://localhost/. If you see the Apache welcome page, Apache is installed correctly.

Step 2: Install PHP and Required Extensions

To install PHP and the required extensions, run the following command:

sudo pacman -S php php-apache php-intl php-gd php-zip php-mbstring php-xml php-dom

Once PHP is installed, you will need to update the Apache configuration file to inform Apache to use PHP.

Open the Apache configuration file with your favorite text editor:

sudo nano /etc/httpd/conf/httpd.conf

Add the following lines at the end of the file:

LoadModule php_module modules/libphp.so
AddHandler php-script php
Include conf/extra/php_module.conf

Save and close the file. Restart the Apache service to apply the changes:

sudo systemctl restart httpd.service

To verify that PHP is working, create a PHP info file by running the following command:

sudo nano /srv/http/info.php

Add the following code to the file:

<?php
phpinfo();
?>

Save and close the file. Open your web browser and navigate to http://localhost/info.php. You should see a page with information about your PHP installation.

Step 3: Install MariaDB

To install MariaDB, run the following command:

sudo pacman -S mariadb

Start and enable the service:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Secure the MariaDB installation by running the following command:

sudo mysql_secure_installation

Follow the prompts to set a root password and secure the installation.

Step 4: Create a Database

To create a new database and user for HumHub, run the following commands:

sudo mysql -u root -p
CREATE DATABASE humhub;
GRANT ALL PRIVILEGES ON humhub.* TO 'humhubuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;

Replace password with a strong password of your choice.

Step 5: Install HumHub

Download the latest version of HumHub from the official website:

wget https://www.humhub.org/en/download/package/humhub-1.9.2.tar.gz

Extract the archive and move it to the Apache document root:

tar xfz humhub-1.9.2.tar.gz
sudo mv humhub-1.9.2 /srv/http/humhub

Ensure that the Apache user has permission to write to the protected/runtime directory:

sudo chown -R http:http /srv/http/humhub/protected/runtime/

Step 6: Configure HumHub

Create a new Apache virtual host configuration file for HumHub:

sudo nano /etc/httpd/conf/extra/humhub.conf

Add the following lines to the file:

<VirtualHost *:80>
    ServerName humhub.local
    DocumentRoot "/srv/http/humhub"

    <Directory "/srv/http/humhub">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Save and close the file. Restart the Apache service:

sudo systemctl restart httpd.service

Open your web browser and navigate to http://humhub.local. Follow the on-screen prompts to set up your HumHub installation, including database configuration and admin account creation.

Congratulations! You have successfully installed and configured HumHub on Arch Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!