HumHub is a free and open-source social networking platform that can be used to create your own social network. In this tutorial, we will walk you through the steps to install HumHub on Debian latest release.
Before starting the installation process, ensure that you have the following prerequisites:
To get started, update your system’s package list and install all the required packages using the following commands:
sudo apt-get update
sudo apt-get install unzip wget curl git mariadb-server mariadb-client apache2 php php-common php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
Confirm that all the packages were installed correctly before proceeding to the next step.
Composer is a dependency manager for PHP. It is used to manage the HumHub PHP dependencies. To install Composer, use the following command:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Once installed, test that Composer has been installed correctly:
composer --version
Download the latest version of HumHub from their official website:
wget https://www.humhub.org/en/download/start?version=latest -O humhub.zip
Once downloaded, extract the files to the web directory on your server:
sudo unzip humhub.zip -d /var/www/html/
HumHub requires MySQL or MariaDB for storing its data. Use the following commands to create a database and a user for HumHub to use:
sudo mysql -u root -p
CREATE DATABASE humhub;
CREATE USER 'humhubuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON humhub.* TO 'humhubuser'@'localhost';
FLUSH PRIVILEGES;
exit;
HumHub requires a web server to function correctly. If you have not installed Apache, use the following command to install it:
sudo apt-get install apache2
Next, create a virtual host for HumHub using the following commands:
sudo nano /etc/apache2/sites-available/humhub.conf
Paste the following configuration in the file:
<VirtualHost *:80>
ServerName your_server_domain_or_IP
DocumentRoot /var/www/html/humhub
<Directory /var/www/html/humhub>
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/humhub_error.log
CustomLog ${APACHE_LOG_DIR}/humhub_access.log combined
</VirtualHost>
Ensure to replace your_server_domain_or_IP
with your server domain or IP.
Save the configuration file by pressing Ctrl+x -> y -> Enter
.
Now, disable the default Apache site and enable the newly created HumHub site:
sudo a2dissite 000-default
sudo a2ensite humhub
Finally, restart Apache for the changes to take effect:
sudo systemctl restart apache2
Before running the HumHub installation commands, navigate to the HumHub directory:
cd /var/www/html/humhub/
Install the dependencies using the command:
sudo composer install --no-plugins --no-scripts
Now setup the HumHub application using the following command:
sudo php yii installer/setup
The installer will prompt you for your database details. Enter your database name, user and password that you created in Step 4.
Once the installer finishes configuring HumHub, run the following commands to set the correct file permissions for the HumHub directory:
sudo chown -R www-data:www-data /var/www/html/humhub/
sudo chmod -R 755 /var/www/html/humhub/
Now you can access the HumHub installation wizard by navigating to http://your-server-domain-or-ip. Follow the on-screen instructions to finish the installation process.
Congratulations, you have successfully installed HumHub on Debian latest!
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!