Install Elgg on CentOS 7

Elgg is an open source social networking engine that allows the creation of social environments such as campus social networks and internal collaborative platforms for organizations. Elgg offers a number of social networking features including microblogging, messaging, file-sharing and groups. This tutorial will guide you through the process of installing Elgg on a CentOS 7 VPS.

Prerequisites

This tutorial assumes that you have already setup a fresh Vultr Cloud Compute instance with CentOS 7 and have root access.

Step 1: Install Apache, MySQL, and PHP

Elgg requires MySQL, PHP, and a web server. Before you can install Elgg, you will need to install the Apache web server, MySQL, and PHP.

Install the Apache web server.

sudo yum install httpd -y
systemctl enable httpd.service
systemctl start httpd.service

Open ports 80, (HTTP), and 443, (HTTPS), to be able to access the server from the internet.

firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

Install MySQL.

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server -y

Complete the MySQL installation.

systemctl enable mysqld.service
systemctl start mysqld.service
sudo mysql_secure_installation

When asked for the current password, press ENTER. During the installation, you will be asked to enter a root password. Enter a safe password. This will be the MySQL root password.

Set root password? [Y/n] Y    
New password: password
Re-enter new password: password
Remove anonymous users? [Y/N] Y
Disallow root login remotely? [Y/N] Y
Remove test database and access to it? [Y/N] Y
Reload privilege tables now? [Y/N] Y

The CentOS 7 repository comes with an older version of PHP (5.4). We will install PHP 7.2 from the Remi repository.

rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y install yum-utils
yum-config-manager --enable remi-php72

Install PHP 7.2 along with the PHP modules required by Elgg.

yum install php php-opcache php-common php-sqlite3 php-curl php-intl php-mbstring php-xmlrpc php-mysqlnd php-gd php-xml php-cli php-zip -y

Step 2: Create a MySQL database for Elgg

Elgg will require a MySQL database. Log into the MySQL console.

mysql -u root -p

When prompted for a password, enter the MySQL root password you set in step 1. Once you are logged in to the MySQL console, create a new database.

mysql>CREATE DATABASE elgg;

Create a new MySQL user and grant it privileges to the newly created database. You can replace username and password with the username and password of your choice.

mysql>GRANT ALL PRIVILEGES on elgg.* to 'username'@'localhost' identified by 'password';
mysql>FLUSH PRIVILEGES;

Exit the MySQL console.

mysql>exit

Step 3: Download and Install Elgg

Download the latest version of Elgg.

cd /var/www/html
wget https://elgg.org/download/elgg-2.3.7.zip

Unzip the downloaded archive and move the files to the root of the Apache web server.

yum install unzip -y
unzip elgg-2.3.7.zip
mv ./elgg-2.3.7/* .
rm -rf elgg-2.3.7.zip
rm -rf elgg-2.3.7

Create a data directory for Elgg.

sudo mkdir -p /var/www/html/data

Set the appropriate file permissions.

sudo chown -R apache:apache /var/www/html/
sudo chmod -R 755 /var/www/html/

Step 4: Configure Apache for Elgg

Create an Apache virtual hosts configuration file.

sudo vi /etc/httpd/conf.d/vhost.conf

Paste the following snippet to the file, replacing example.com with your own domain name.

<VirtualHost *:80>
     DocumentRoot /var/www/html/
     ServerName example.com
     <Directory /var/www/html/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>
     ErrorLog /var/log/httpd/elgg_error.log
     CustomLog /var/log/httpd/elgg_access.log combined
</VirtualHost>

Restart the Apache server.

 sudo systemctl restart httpd.service

Step 5: Complete the Elgg Installation

At this point, you can proceed to the Elgg browser installer to finish the installation. Open a browser window on your computer and navigate to your domain name. This will launch the Elgg browser installer. Proceed through the installer to the Database Installation step. Here, enter the credentials of the MySQL database you created in Step 2 and proceed to the next step.

Install Elgg on CentOS 7

On the next step, enter a site name and email address of your choice. In the Site URL field, enter your domain name. In the Data Directory field, enter /var/www/html/data and proceed to the next step.

Install Elgg on CentOS 7

Next, enter the administrator credentials of your choice and press Next. At this point the installation is complete.

Install Elgg on CentOS 7

To log into the administrator panel, navigate to the following URL.

http://{your-domain-name}/admin

You have successfully installed Elgg on a CentOS 7 VPS and can begin setting up your own social network.


Leave a Comment

Успон машина: Примене вештачке интелигенције у стварном свету

Успон машина: Примене вештачке интелигенције у стварном свету

Вештачка интелигенција није у будућности, она је овде управо у садашњости. У овом блогу Прочитајте како су апликације вештачке интелигенције утицале на различите секторе.

ДДОС напади: кратак преглед

ДДОС напади: кратак преглед

Да ли сте и ви жртва ДДОС напада и збуњени сте методама превенције? Прочитајте овај чланак да бисте решили своја питања.

Да ли сте се икада запитали како хакери зарађују новац?

Да ли сте се икада запитали како хакери зарађују новац?

Можда сте чули да хакери зарађују много новца, али да ли сте се икада запитали како зарађују толики новац? Хајде да причамо.

Гоогле-ови револуционарни изуми који ће вам олакшати живот.

Гоогле-ови револуционарни изуми који ће вам олакшати живот.

Да ли желите да видите револуционарне изуме Гугла и како су ти изуми променили живот сваког људског бића данас? Затим читајте на блогу да бисте видели Гооглеове изуме.

Фридаи Ессентиал: Шта се десило са аутомобилима које покреће вештачка интелигенција?

Фридаи Ессентиал: Шта се десило са аутомобилима које покреће вештачка интелигенција?

Концепт самовозећих аутомобила који путују на путеве уз помоћ вештачке интелигенције је сан који већ неко време имамо. Али упркос неколико обећања, њих нема нигде. Прочитајте овај блог да сазнате више…

Технолошка сингуларност: далека будућност људске цивилизације?

Технолошка сингуларност: далека будућност људске цивилизације?

Како се наука развија великом брзином, преузимајући многе наше напоре, расте и ризик да се подвргнемо необјашњивој сингуларности. Прочитајте шта би сингуларност могла да значи за нас.

Еволуција складиштења података – Инфографика

Еволуција складиштења података – Инфографика

Методе складиштења података су се развијале можда од рођења података. Овај блог покрива еволуцију складиштења података на основу инфографике.

Функционалности слојева референтне архитектуре великих података

Функционалности слојева референтне архитектуре великих података

Прочитајте блог да бисте на најједноставнији начин упознали различите слојеве у архитектури великих података и њихове функционалности.

6 невероватних предности поседовања паметних кућних уређаја у нашим животима

6 невероватних предности поседовања паметних кућних уређаја у нашим животима

У овом дигиталном свету, паметни кућни уређаји постали су кључни део живота. Ево неколико невероватних предности паметних кућних уређаја о томе како они чине наш живот вредним живљења и једноставнијим.

Ажурирање додатка за мацОС Цаталина 10.15.4 изазива више проблема него што их решава

Ажурирање додатка за мацОС Цаталина 10.15.4 изазива више проблема него што их решава

Недавно је Аппле издао мацОС Цаталина 10.15.4 додатак за исправку проблема, али изгледа да ажурирање изазива више проблема који доводе до квара Мац машина. Прочитајте овај чланак да бисте сазнали више