HumHub is a free and open-source social network platform that can be used for internal communication and collaboration within organizations. In this tutorial, we will show you how to install HumHub on Linux Mint.
Before we begin, make sure that you have the following:
sudo
privilegesIf you haven’t already done so, install Apache, MySQL, and PHP on your Linux Mint system using the following commands:
sudo apt update
sudo apt-get install apache2 mysql-server php7.4 php7.4-mysql php7.4-curl php7.4-json php7.4-gd php7.4-intl php7.4-mbstring php7.4-xml php7.4-zip
Once the installation is complete, start Apache and MySQL and enable them to start at boot with the following commands:
sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql
Download the latest version of HumHub from the official website or using the following command:
wget https://www.humhub.org/en/download/start?version=latest
Extract the downloaded archive to the web server root directory:
sudo tar -xf start?version=latest -C /var/www/html/
Next, give proper ownership to the extracted files and directories:
sudo chown -R www-data:www-data /var/www/html/humhub
Log in to the MySQL server using the following command:
sudo mysql -u root -p
Create a new database and a new user for HumHub with the following commands:
CREATE DATABASE humhubdb;
CREATE USER 'humhubuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON humhubdb.* TO 'humhubuser'@'localhost';
FLUSH PRIVILEGES;
Replace humhubdb
, humhubuser
, and password
with your desired database name, username, and password, respectively.
Rename the sample configuration file:
sudo mv /var/www/html/humhub/protected/config/common.sample.php /var/www/html/humhub/protected/config/common.php
Edit the common.php
file and modify the following parameters:
return [
'components' => [
'db' => [
'dsn' => 'mysql:host=localhost;dbname=humhubdb',
'username' => 'humhubuser',
'password' => 'password',
...
],
...
],
...
];
Replace humhubdb
, humhubuser
, and password
with your database name, username, and password from Step 3.
Create a new Apache virtual host configuration file:
sudo nano /etc/apache2/sites-available/humhub.conf
Add the following configuration to the file:
<VirtualHost *:80>
ServerName your_domain.com
DocumentRoot /var/www/html/humhub
<Directory /var/www/html/humhub>
AllowOverride None
Require all granted
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ index.php [L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/humhub_error.log
CustomLog ${APACHE_LOG_DIR}/humhub_access.log combined
</VirtualHost>
Replace your_domain.com
with your website domain if you have one.
Enable the virtual host and Apache rewrite module with the following commands:
sudo a2ensite humhub.conf
sudo a2enmod rewrite
Finally, restart the Apache web server for the changes to take effect:
sudo systemctl restart apache2
Visit your HumHub website installation URL in your web browser to access the installation wizard. Follow the on-screen instructions to complete the installation process.
Congratulations! You have successfully installed HumHub on your Linux Mint system.
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!