This tutorial will guide you in installing Elgg, an open source social networking platform, on your FreeBSD Latest operating system.
sudo pkg update && sudo pkg upgrade
Elgg requires a web server to work. In this case, we'll be using Apache. To install Apache, run the following command:
sudo pkg install apache24
After installation is complete, start the Apache service using the following command:
sudo service apache24 start
To make Apache start automatically every time your system reboots, run:
sudo sysrc apache24_enable="YES"
Elgg is written in PHP, so you need to install the PHP package on your FreeBSD system. To install PHP, run the following command:
sudo pkg install php74
After installation is complete, you need to configure the PHP settings for Apache. To do this, edit the httpd.conf
file using the following command:
sudo nano /usr/local/etc/apache24/httpd.conf
Uncomment this line:
LoadModule php7_module libexec/apache24/libphp7.so
Save and exit the file.
Elgg requires a database to store user data. In this tutorial, we'll be using MySQL as the database management system. To install MySQL, run the following command:
sudo pkg install mysql57-server
After installation is complete, start the MySQL service using the following command:
sudo service mysql-server start
To make MySQL start automatically every time your system reboots, run:
sudo sysrc mysql_enable="YES"
Next, you need to create a database for Elgg to use. Log in to MySQL using the following command:
mysql -u root -p
Enter your MySQL root password when prompted.
Once you're logged in, create a new database for Elgg:
CREATE DATABASE elgg;
Create a new user for Elgg and grant all privileges on the database:
CREATE USER 'elgguser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON elgg.* TO 'elgguser'@'localhost';
Replace 'password' with a secure password of your choice.
Flush the privileges:
FLUSH PRIVILEGES;
Exit MySQL:
exit;
First, download the latest version of Elgg from the official website using the following command:
wget https://elgg.org/getelgg.php?forward=elgg-3.3.15.zip -O elgg.zip
After it's downloaded, extract the zip file using the following command:
sudo unzip -q elgg.zip -d /usr/local/www/apache24/data/
Change the ownership of the Elgg directory:
sudo chown -R www:www /usr/local/www/apache24/data/elgg/
Go to the Elgg directory you just extracted:
cd /usr/local/www/apache24/data/elgg/
Copy the sample configuration file and set the correct values:
sudo cp engine/settings.example.php engine/settings.php
sudo nano engine/settings.php
Set the database name, username, and password in the configuration file:
$CONFIG->dbname = 'elgg';
$CONFIG->dbuser = 'elgguser';
$CONFIG->dbpass = 'password'; //replace with your database password
Save and exit the file.
Open a web browser and navigate to http://your-ip-address/elgg/
. Follow the prompts to set up Elgg using the browser.
Enter the required information such as the site name, admin email, admin username, and admin password.
Click the "Install Elgg" button to complete the installation process.
Congratulations, you have successfully installed Elgg on your FreeBSD Latest system. You can now start building your own social networking platform using Elgg.
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!