How to install Elgg on EndeavourOS
Elgg is a free and open-source platform for building social networks, e-commerce sites, and web applications. In this tutorial, we will guide you through the installation of Elgg on EndeavourOS.
Prerequisites
Before we begin, ensure that you have:
- A working EndeavourOS installation.
- A user account with sudo privileges.
- A web server (Apache or Nginx) and a database server (MySQL or MariaDB) installed and configured.
Step 1: Install Elgg Dependencies
- Open a terminal and update all packages on your system:
sudo pacman -Syu
- Install Apache web server, PHP, and MariaDB:
sudo pacman -S apache php php-apache mariadb
- Install additional PHP modules required by Elgg:
sudo pacman -S php-gd php-xmlrpc
Step 2: Download and Extract Elgg
Download the latest stable release of Elgg from the official website at https://elgg.org/download.php.
Extract the downloaded archive to
/var/www/htmlwith administrative privileges:
sudo tar xzf elgg-*.zip -C /var/www/html/
- Rename the extracted directory to
elgg:
sudo mv /var/www/html/elgg-* /var/www/html/elgg
- Give Apache ownership of the web directory:
sudo chown -R http:http /var/www/html/elgg
Step 3: Configure the Database
- Log in to the MariaDB server with the administrative account:
sudo mysql -u root -p
- Create a new database for Elgg:
MariaDB [(none)]> CREATE DATABASE elgg_db;
- Create a new user for the new database:
MariaDB [(none)]> CREATE USER 'elgg_user'@'localhost' IDENTIFIED BY 'password';
- Grant the user full access to the database:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON elgg_db.* TO 'elgg_user'@'localhost';
- Save and exit the MariaDB prompt:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Step 4: Install and Configure Elgg
Open a web browser and navigate to http://localhost/elgg.
Follow the prompts in the installation wizard to configure your Elgg site. When prompted for the database credentials, enter the following:
- Database name: elgg_db
- Database username: elgg_user
- Database password: password
- Database host: localhost
- After completing the installation, delete the
installdirectory:
sudo rm -rf /var/www/html/elgg/install
- Modify the
.htaccessfile to enable URL rewriting:
sudo nano /var/www/html/elgg/.htaccess
- Uncomment the following line to enable URL rewriting:
#RewriteBase /elgg/
- Save and exit the file.
Step 5: Test Your Elgg Installation
- Restart the Apache web server to apply changes:
sudo systemctl restart httpd
Open a web browser and navigate to http://localhost/elgg.
Log in with the admin credentials you created during the installation process.
Explore Elgg and begin building your site!
Congratulations! You have successfully installed Elgg on your EndeavourOS machine.