Elgg is a free and open source social networking platform. You can use Elgg to create a campus wide social networking site for your college or school. You can also use Elgg to create an internal collaborative platform for your organization. Elgg is written in PHP and uses MySQL to store its data.
In this tutorial we will be installing Elgg on CentOS 7 server.
Elgg does not require any special hardware requirements. It can be installed on servers with a small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Now install Apache, Git and MariaDB, which is a fork of MySQL using following command.
yum -y install httpd mariadb-server mariadb git
Elgg requires PHP 5.6 or higher. In this tutorial we will install PHP 7 to obtain high performance. Install EPEL repository using following commands.
yum -y install epel-releaseyum -y update
Now install the Webtatic repository using the following commands.
Once you have PHP installed, you can check the version of PHP using the following command.
php -v You should get output similar to this.
[root@liptan-pc ~]# php -v
PHP 7.1.3 (cli) (built: Mar 19 2017 15:31:52) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
Now start the Apache web server and enable it to start at boot time using the following command.
systemctl start httpdsystemctl enable httpd
To start MariaDB and enable it to start at boot time using the following commands.
systemctl start mariadbsystemctl enable mariadb
Now run the following commands to secure your MySQL or MariaDB installation.
It will run a small script which asks you to provide the root password for MariaDB. As we have just installed MariaDB, the root password is not set, just press enter to proceed further. Set a root password for MySQL root user and answer y for all other questions asked.
Now you will need to create a database to store Elgg data.
To create a database we will need to login to MySQL command line first. Run the following command for same.
mysql -u root -p
This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your Elgg installation.
CREATE DATABASE elgg_data;
To create a new database user, run the following query.
CREATE USER 'elgg_user'@'localhost' IDENTIFIED BY 'StrongPassword';
Replace StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.
GRANT ALL PRIVILEGES ON elgg_data.* TO 'elgg_user'@'localhost';
Now run the following command to immediately apply the changes on the database privileges.
Exit from MySQL prompt using exit command.
Elgg can be installed in two ways, either using composer or using the setup archive. In this tutorial both the methods are explained.
If you want to use Composer to install Elgg, you will need to install Composer. Composer is a dependency manager for PHP.
In this tutorial we have learned to install Elgg Social Networking Platform on CentOS 7. You can now successfully deploy the application to create a social networking or collaboration site for your education institute or organization.
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...