How to Install Elgg on OpenSUSE Latest

Elgg is a powerful open-source social networking engine that can help you build your own custom social network. It is written in PHP and MySQL, making it one of the most widely used social network engines across the web. In this tutorial, we will show you how to install Elgg on OpenSUSE latest.

Prerequisites

Before we start installing Elgg, please make sure that you have the following prerequisites:

Step 1: Download the Elgg Package

First of all, you need to download the latest Elgg package from the official website. You can download it by clicking on the following link: https://elgg.org/download.

Download the latest version of Elgg and extract the zip file in the /var/www/html directory of your server. Rename the extracted folder to elgg.

Step 2: Create a Database

Elgg uses MySQL as its database, so we need to create a new database for it. Log in to your server as a root user, and then execute the following command to create a new database:

mysql -u root -p

After that, create a new database with the following command by replacing newdatabase with the desired name of your database:

CREATE DATABASE newdatabase;

Next, create a new user by executing the following SQL command. Replace newuser and password with your desired username and password, respectively:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

Finally, grant all privileges to the newly created user by the following SQL command:

GRANT ALL PRIVILEGES ON newdatabase.* TO 'newuser'@'localhost';

Once done, exit MySQL by typing exit.

Step 3: Configure Elgg

Open the elgg.php file located in the elgg\engine directory.

Find the following lines of code:

$config->dbuser = 'elgguser';
$config->dbpass = 'elggpass';
$config->dbname = 'elggdb';
$config->dbhost = 'localhost';

Replace elgguser with the username you created in Step 2, and elggpass with the password for that user. Replace elggdb with the name of the database you created in Step 2, and localhost with the name or IP address of your MySQL server.

Step 4: Set Permissions

Elgg needs write access to some of its directories and files, so we need to set the proper permissions. Execute the following command in the terminal:

chown -R wwwrun:www /var/www/html/elgg

Step 5: Configure Virtual Host

To access Elgg from a web browser, we need to set up a virtual host. Open the Apache configuration file:

nano /etc/apache2/httpd.conf

Add the following lines at the bottom of the file:

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/elgg
<Directory /var/www/html/elgg>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Replace yourdomain.com with your domain name. Save the changes and exit the editor.

Finally, restart the Apache web server by executing the following command:

systemctl restart apache2

Step 6: Access Elgg

Once done, we are ready to access Elgg. Open a web browser, and type in the following URL:

http://yourdomain.com

Follow the on-screen instructions to complete the installation process.

Conclusion

In this tutorial, we’ve shown you how to install Elgg on OpenSUSE latest. We hope that you found this tutorial helpful, and now you can start building your own custom social network.

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!