22 C
Texas
Muhammad Nabeel
Network and System Administrator

How to install Elgg on Debian 10?

Today there are applications for all kinds of projects. Including social network engines that we can deploy to have an internal blog system. Or an internal social network where we can upload information and post on our internal network. For this, we have Elgg as a great help. It is a wonderful application that is very complete in functionalities. So, in this post, I will show how to install Elgg on Debian 10.

Briefly, what is Elgg?

So, what is Elgg? On the project website we find the best definition by the development team:

Elgg is an award-winning open source social networking engine that provides a robust framework on which to build all kinds of social environments, from a campus wide social network for your university, school or college or an internal collaborative platform for your organization through to a brand-building communications tool for your company and its clients.

So as you can see, the possibilities Elgg offers us are quite profitable. Also in a business environment, it is quite useful.

So, let us get to work.

Install Elgg on Debian 10

  • - Advertisement -

    MySQL 5.5.3.

PHP 7.1+ with the following extensions:

  • GD (for graphics processing)
  • PDO (for database connection)
  • JSON (for AJAX responses, etc.)
  • XML (for reading plugin manifest files, etc.)
  • Multibyte String support (mbstring)
  • Proper configuration and ability to send email through an MTA

The web server with support for URL rewriting:

  • Apache server
    • Apache with the rewrite module enabled
    • PHP running as an Apache module
  • Nginx server
    • Nginx with PHP-FPM using FastCGI

All this information can be obtained in a better way if you consult the official documentation.

1) Install LAMP on Debian 10

First, you need a functional web server. In this case, we will use Apache and the LAMP stack. It is one of the functional and simple ones that we will be able to use.

Read, How to install LAMP on Debian 10?

However, we need to install MySQL instead of MariaDB. So, run this command to download the MySQL repo file.

:~$ wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb

Then, install it with gdebi. If you do no have it, you can install it.

:~$ sudo gdebi mysql-apt-config_0.8.13-1_all.deb

Install the MySQL repository
Install the MySQL repository

Then, install MySQL.

:~$ sudo apt update && sudo apt install mysql-server mysql-community-server mysql-client mysql-community-client mysql-community-server-core mysql-community-client-core

In the PHP modules, take into account the requirements I have taught above:

php php-cli php-gd php-xml php-mbstring php-pdo php-json php-pear

2) Create a new database for Elgg

It is now necessary to create a new database for Elgg. Besides this, you will also have to create a new user. This as a security measure.

To do this, go to the MariaDB console and start the process:

:~$ sudo mysql -u root -p
> CREATE DATABASE elggdb;
> CREATE USER 'elgguser'@'localhost' IDENTIFIED BY 'Elggpss1234.';
> GRANT ALL PRIVILEGES ON elggdb.* TO 'elgguser'@'localhost';
> FLUSH PRIVILEGES;
> exit;

1.- Creating the new databases and user
1.- Creating the new databases and user

3) Download and install Elgg on Debian 10

The next step is to download and install Elgg. For this, we will use one terminal tool that we must have installed.

:~$ sudo apt install unzip

Now yes, we proceed to install the latest stable version of Elgg.

:~$ wget https://elgg.org/about/getelgg?forward=elgg-3.1.1.zip -O elgg.zip

2.- Download Elgg on Debian 10
2.- Download Elgg on Debian 10

Then unzip it.

:~$ unzip elgg.zip

Now, move it to /var/www/html/ and set the proper permissions. Equally, create a new folder for the elgg data and set the permissions.

:~$ sudo mv elgg-3.1.1/ /var/www/html/elgg
:~$ sudo chown -R www-data:www-data /var/www/html/elgg/
:~$ sudo chmod -R 755 /var/www/html/elgg/
:~$ sudo mkdir /var/www/html/data
:~$ sudo chown -R www-data:www-data /var/www/html/data
:~$ sudo chmod -R 755 /var/www/html/data

Now, we need to create a new VirtualHost for Elgg. So, create a new configuration file.

:~$ sudo nano /etc/apache2/sites-available/elgg.conf

And add the following:

<VirtualHost *:80>
    DocumentRoot /var/www/html/elgg/
    ServerName elgg.osradar.lan

    <Directory /var/www/html/elgg/>
       Options FollowSymlinks
       AllowOverride All
       Require all granted
    </Directory>
ErrorLog ${APACHE_LOG_DIR}/elgg.osradar.lan_error.log
CustomLog ${APACHE_LOG_DIR}/elgg.osradar.lan_access.log combined
</VirtualHost>

4.- Creating the new virtualhost
4.- Creating the new virtual host

Replace elgg.osradar.lan by your server name.

Then, enable the new virtualhost and the Apache rewrite module.

:~$ sudo ln -s /etc/apache2/sites-available/elgg.conf /etc/apache2/sites-enabled/elgg.conf
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2

4.- Applying the new configuration
4.- Applying the new configuration

4) Complete the installation using the web interface

Now open a web browser and go to your web server to complete the installation. You will see this image:

6.- Elgg welcome screen
6.- Elgg welcome screen

The installer will then check the requirements. After that, you will have to write the credentials from the database.

7.- Databases Credentials
7.- Databases Credentials

Then, you have to set up the website. Things like name, email address, you can configure in this section.

Now you will have to set up the administrator account.

In the end, you will see this message indicating that everything went well.

8.- Elgg installation successfully completed
8.- Elgg installation successfully completed

And that is it.

Conclusion

Elgg is a web application that works excellently to deploy our own internal social network. To make the most of it, a competent web server is enough. No other world. On the other hand, installing Elgg on Debian 10 is quite simple.

So, please share this post with your friends and join our Telegram channel.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article