Installing HumHub on Fedora CoreOS
Introduction
HumHub is an open-source social network platform that is built with PHP language. It offers a comprehensive range of features and plugins, including user management, activity streams, private messaging, file sharing, and many others. This tutorial will guide you through the process of installing HumHub on the latest version of Fedora CoreOS.
Prerequisites
To proceed with the installation of HumHub, you need to have:
- A working instance of Fedora CoreOS
- SSH access to the server
- Root access to the server
- A domain name with DNS records set up for the server
Step 1: Update the system
Before proceeding with the installation, it is essential to update the system package repositories by running the following command:
dnf -y update
Step 2: Install Apache web server
HumHub requires a web server to function correctly. In this tutorial, we’ll use the Apache web server. To install it, run the command:
dnf -y install httpd
Step 3: Install MariaDB database
HumHub also requires a database management system (DBMS). In this tutorial, we’ll use MariaDB. To install it, run the command:
dnf -y install mariadb-server
After installation, start the MariaDB service and enable it to start automatically at boot:
systemctl start mariadb
systemctl enable mariadb
Then, run the post-installation security script to secure the MariaDB installation:
mysql_secure_installation
Step 4: Create a database
After securing the MariaDB installation, you can create a new database for HumHub. Login to the MariaDB shell using the command:
mysql -u root -p
Enter the MariaDB root password when prompted. Then, create a new database using the command:
CREATE DATABASE humhubdb;
Create a new user and grant all privileges to the user on the new database:
CREATE USER 'humhubuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON humhubdb.* TO 'humhubuser'@'localhost';
FLUSH PRIVILEGES;
Replace the password with your preferred strong password.
Step 5: Install PHP and PHP extensions
HumHub is built with PHP language. In this step, you’ll install PHP and the required extensions by running the following command:
dnf -y install php php-bcmath php-curl php-gd php-json php-mbstring php-mysqlnd php-xml php-zip
Step 6: Download and extract HumHub
In this step, you’ll download the latest version of HumHub and extract it to the web server root directory (/var/www/html).
cd /var/www/html
wget https://www.humhub.org/en/download/start
tar -xvzf humhub-*.tar.gz
mv humhub-* humhub
Step 7: Configure Apache virtual host
Create a new Apache virtual host configuration file by running the command:
nano /etc/httpd/conf.d/humhub.conf
Add the following content to the file:
<VirtualHost *:80>
ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/html/humhub
<Directory /var/www/html/humhub/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/humhub-error.log
CustomLog /var/log/httpd/humhub-access.log combined
</VirtualHost>
Replace your-domain.com with your domain name.
After adding the configuration, save the file by pressing Ctrl + X and then Y.
Step 8: Set file permissions
Set the correct directory and file permissions by running the following commands:
chown -R apache:apache /var/www/html/humhub
chmod -R 755 /var/www/html/humhub
Step 9: Restart Apache
Restart the Apache web server to apply the configuration changes:
systemctl restart httpd
Step 10: Complete HumHub installation
In this step, complete the installation of HumHub by accessing the domain name in your web browser. You’ll see the HumHub web installer interface.
Follow the instructions of the installer to complete the installation:
- Choose your default language
- Configure your database:
- Database Host:
localhost - Database Name:
humhubdb - Database Username:
humhubuser - Database Password:
password
- Database Host:
- Configure your website details:
- Website Name:
HumHub - Website E-Mail:
[email protected]
- Website Name:
- Create an administrator account
After finishing the installation, you can log in to your HumHub administration panel by accessing the /index.php?r=admin URL.
Conclusion
Congratulations! You have successfully installed HumHub on Fedora CoreOS. You can now create new users and start using the platform to build your social network. Don't forget to secure your server, keeping it up to date, and backup your data regularly.