Configure email settings for Android mobile devices. Friday,24 September 2010 08 44 PM. Setting this up on an Android OS (the Droid X – Android version 2.1 in my instance), follow these steps. Go to Settings Accounts New Account. Select “Email”. Enter your email address and password. UNCHECK the option to automatically configure your account. Home Grow with DreamHost WordPress Tutorials Guide to Themes, Menus, and Plugins How to Install a WordPress Theme Tutorial: How to Install a WordPress Theme In this post, we’ll give you some advice for what to do before you add a new theme to your website.
On this page
In this tutorial, I will show you how to install and configure the latest Elgg version on Debian 9 in order to create a free online social network.
![Elgg dreamhost installation Elgg dreamhost installation](/uploads/1/2/5/8/125846481/507002566.png)
Elgg is a free open source social engine framework software written in PHP programming language. The Elgg framework can help individuals or organizations to create powerful social environments in Linux under Apache/Nginx web servers, PHP and MySQL/MariaDB database management system, also known as LAMP or LEMP stack. It also has built-in features that can power file sharing, blogging, social groups or educational platforms on public or private networks.
In order to successfully deploy the Elgg platform on your premises, you will need to meet the following requirements.
- A virtual machine or a virtual private server powered by Debian 9, preferably minimal installation
- Direct access to root account or a local user with root powers via server console or remote management via SSH
- The server needs a static IP address configured for the external network interface in order to access via its public IP address to visitors
- You might also need a public or private domain name configured for your server so visitors can access the platform via a domain name, such as www.yourdomain.com, although you can still access the platform via your server IP address.
- In order to use Elgg website registration via e-mail address, or use other platform features, you need to deploy a mail server at your premises or use a public mail server.
Pre-Requirements
As the first step, login to the Debian 9 server with root privileges or with a user having root powers and issue the following command in order to update your system with the latest security patches, software and kernel updates.
Next, make sure you configure the name of your machine by executing the following commands. You should replace the hostname variable used in this example to match your own domain.
After you’ve configured the machine hostname, verify if the host has been properly configured by checking the hosts file with the following commands.
Finally, in order to apply machine hostname and kernel updates, reboot the system by issuing the following command.
After the system reboots, login back to the console and run the following command to install some system utilities that will help us download software over internet and extract some archive files types
Install LAMP Stack
In order to deploy the Elgg social network framework on our server, we need to install the LAMP stack components. The first component that we’ll install is the database - MariaDB - a fork of the popular MySQL database, as database backend. The MariaDB database will be used by the application to store users, sessions, contacts, posts, comments and other information. In order to install MariaDB database server and client software in Debian 9 via the official repositories, issue the command below in terminal.
After the database installation completes, log in to the MySQL console and issue the following commands in order to secure database root account, which can be accessed by default without supplying a password.
MariaDB [(none)]> use mysql;
MariaDB [mysql]> update user set plugin=' where user='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit
After you’ve completed the above step, execute the mysql_secure_installation script provided by Debian stretch repositories, in order to further secure MariaDB server and set up a strong password for database root account. Mainly, answer “yes” on all asked questions by the script, such as: to change MySQL root password, to remove anonymous users, to disable remote root logins and delete the test database, as illustrated in the below script excerpt.
In order to test MariaDB security, try logging in to the database from the console with no root password. The access to the database should be denied if no password is provided for the root account, as illustrated in the below command excerpt:
If the password is supplied, the login process should be granted to MySQL console, as shown in the command sample:
After you’ve installed and secured MariaDB database, it’s time to install the next components required to deploy the Elgg application: Apache HTTP server and PHP programming language processing gateway. In order to install Apache web server and the PHP interpreter alongside with all required PHP modules through which the server will execute the application scripts, execute the following command in your server console.
Next, open and modify PHP default configuration file by altering the following PHP variables. Open /etc/php/7.0/apache2/php.ini file for editing and change the following lines. initially, make a backup of PHP configuration file.
Search, edit and change the following variables in php.ini configuration file:
Increase upload_max_file_size variable as suitable in order to support large file attachments for your application. Also, change PHP timezone setting to your system's geographical location by consulting the list of time zones provided by PHP docs at the following link http://php.net/manual/en/timezones.php
Enable OPCache plugin available for PHP7 in order to increase website load speed by appending the following OPCache settings at the bottom of the PHP interpreter configuration file, below the [opcache] statement, as detailed below:
After you’ve made all the above changes, save and close the php.ini configuration file, restart the Apache web server to apply PHP interpreter changes by issuing the below command.
Configure the Firewall
To add the required UFW firewall application rules to allow HTTP traffic to pass through system firewall, issue the following commands in the server console.
or
In case you’re remotely connected to your server via SSH, add the rule below to open SSH port 22 in your firewall.
If you manage the firewall rules in your Debian server via iptables raw rules, add the following rules to allow port 80 and 22 inbound traffic to pass the firewall so that external clients can access the application. Open port 22/TCP only if you’re remotely connected to the server via SSH.
Configure Apache Web Server
On the next step, enable Apache rewrite module required for altering web server configurations on the fly via .htacccess file and the TLS module required to secure HTTP transactions, by issuing the below command.
Next, open the Apache default SSL site configuration file for editing with your favorite text editor, and add the following URL rewrite rules after DocumentRoot directive:
SSL site configuration file excerpt:
Also, make the change shown below to the VirtualHost line to make it look like what's shown in the excerpt that follows:
Add the same changes to Apache default configuration file by opening /etc/apache2/sites-enabled/000-default.conf file for editing. Insert the following lines of code after DocumentRoot statement as shown in the example below.
Finally, restart Apache daemon to apply all rules configured so far and visit your domain or server IP address via HTTP protocol.
Because you’re using the automatically Self-Signed certificates pairs issued by Apache at installation, for a certificate that is untrusted by the browser, an error warning should be displayed in the browser. Accept the warning in order to accept the untrusted certificate and continue to be redirected to Apache default web page, as illustrated in the below image.
https://yourdomain.tld
In order to allow HTTPS traffic to pass through the UFW firewall, you should add the following rule to allow incoming 443/TCP traffic by issuing the command below.
or
If iptables is the default firewall application installed to protect your Debian system at network level, add the following rule to allow port 443 inbound traffic in the firewall so that visitors can browse your domain name.
Finally, create the PHP info file in your web server document root path by executing the following command.
Visit the PHP info script file by opening a browser at the following URL:
https://yourdomain.tld/info.php
Verify PHP settings and scroll down to date configuration to check the PHP timezone configuration.
Install Elgg Software
In order to deploy the Elgg social network platform in your system, first visit the Elgg official download page at https://elgg.org/about/download and grab the latest zip package compressed archive by issuing the below command.
Next, extract the Elgg zip archive file to your current working directory and list the extracted files by issuing the following commands.
On the next step, delete the default index.html file installed by Apache web server to webroot path and the info.php file created earlier by issuing the below commands.
Next, copy all the content of the extracted Elgg directory, including the hidden .htaccess file, into your web server document root path by issuing the following command.
After you’ve copied Elgg installation files to your domain webroot path, create a directory named data for Elgg application, one level up your domain webroot, by issuing the following command. The data directory will be used by Elgg application to store diverse user related files. This data directory can be created anywhere in your server filesystem hierarchy, with the remark that you must grant Apache runtime user the write permissions to this directory.
Next, execute the below commands in order to grant Apache runtime user with full write permissions to the web root path. Use the ls command to list permissions for application’s installed files located in the /var/www/html/ directory.
Before beginning with the installation process via a web browser, log in to the MariaDB database console and create the Elgg database and a user with a password that will be used to manage this database, by issuing the following commands. Make sure you replace the database name, user and password used in this tutorial accordingly.
MariaDB [(none)]> create database elgg_db;
MariaDB [(none)]> grant all privileges on elgg_db.* to 'elgg_user'@'localhost' identified by 'password1234';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
Now, let’s proceed with Elgg installation. First open a browser and navigate to your server’s IP address or domain name or server FQDN via HTTPS protocol.
https://yourdomain.tld
On the welcome screen, the installer will display an introduction message that informs you that Elgg platform software will require six steps to follow in order to install the application. Just hit on Next button in order to start the installation process, as illustrated in the below screenshot.
Next, the Elgg installer will parse your system and check if PHP and web server requirements are met for installing the application. Hit on Next button, to continue the installation process, as shown in the below screenshot.
In the next installation screen, configure the MySQL database settings by supplying MySQL database name, server host (use localhost if the database is installed on the same node), the database username and the password created earlier for installing Elgg. Use the database table prefix as default or change it if you want to add an extra layer of security for your application. Finally, select your default timezone setting for the application and hit on Next button to move to the next installation screen. Use the below screenshot as a guide to configuring this step.
On the next step, configure the Elgg website by adding a name for the site and an email address for user communication. Also, change the site URL address if it was not correctly detected and add the full path to website data directory. Finally, setup your default website access level for newbies and hit on Next button to continue the installation process.
Next, create the first admin account for your website, by filling the Display Name field with the name of your admin account. Also, add the admin account email address, username and password, as illustrated in the below image. When you complete this step, hit on Next button to continue and finish the installation process.
After the installation process completes, hit on “Go to site” button in order to be redirected to the Elgg admin dashboard.
After you’ve been logged in to Elgg dashboard, navigate to Configure -> Plugins menu from right panel and start enabling your required Elgg plugins by hitting on the Activate button for the selected plugin.
You can also visit Elgg application by navigating to your server IP address or domain name via HTTPS protocol. Use the credentials configured for admin account during the installation process in order to log in to Elgg social engine application, as shown in the below screenshot.
https://yourdomain.tld
As the final step, if you want to force visitors to securely browse the Elgg website via HTTPS protocol that encrypts the traffic between the server and client browsers, return to the Debian server console and edit the .htaccess file located in your website document root path, by issuing the below command.
In .htaccess file, search for the <IfModule mod_rewrite.c> line and add the below rules after RewriteEngine On statement in order to automatically redirect all your domain traffic to HTTPS.
Here, you can also change some PHP variables for your website. Search for <IfModule mod_php7.c> directive and under this line add your own PHP settings such as: increase the file upload size for the domain or disable some server default PHP configurations, as shown in the below excerpt:
In order for the Elgg application to send out queued notifications, rotate system logs in database and collect garbage in the database (compacting the database by removing entries that are no longer required), create a crontab file for with the below configurations. Also, this crontab job must be owned and executed by Apache runtime user.
Crontab file excerpt. The cron task output of each job will be discarded to Linux /dev/null blackhole file. Replace the domain name variable ($ELGG) used in this script accordingly.
Congratulations! The Elgg social media platform has been successfully installed and configured at your premises in a Debian 9 server. In case you’re using a registered public domain name to expose Elgg application to public-facing visitors, you should consider buying an SSL certificate issued by a trusted Certificate Authority or get a free certificate pair from Let’s Encrypt CA.
In order to further administer the Elgg application, visit the documentation pages at the following address: http://learn.elgg.org/en/stable/index.html
Perhaps you’re (legitimately) concerned about your privacy on Facebook, and for whatever reason the major alternative social networks just aren’t cutting it for you. Or maybe you wish there were some way to get your clients more engaged with your business.
Why not create your own social network with open source software?
Today I’m going to introduce you to Elgg, a full-featured open source social networking engine that is easy to install and set up. You can augment its power with many third-party plugins. Elgg is dual-licensed under the GPL and MIT License. This article applies to Elgg 1.8.
Here’s what you need to set up your Elgg network:
- Web hosting and a domain name. If you don’t want to spend anything, you can use your own server. Look into a free dynamic DNS service such as DynDNS, which will give you a domain name. If you’re running your server on a wireless network, you’ll also need to enable port forwarding on your router to make your site accessible outside your LAN.
- PHP 5
- MySQL 5+
- The latest release of Elgg
Getting Started
Download the .ZIP file from the Elgg download page and unpack it wherever you want on your server.
Now navigate to the
install.php
page within that directory. Read the welcome message and click “Next”; Elgg will now check your server for the required software. If all goes well, you should see this:Elgg will then prompt you to initialize a database. Note that you must first create the database on your server and give the database user read/write privileges. Most web hosting companies provide a management interface for MySQL, such as phpMyAdmin.
Next you’ll get to name your site and fill in some other details, such as the installation directory and administrator information. When you get to the “Data Directory” section, the installer will ask you for “the directory that you created for Elgg to save files,” so be sure to create this directory before proceeding. I made mine outside the root directory of my site (
public_html
) to keep it secure.When you’re done with the installation and go to visit your site, you will see something like this:
Configuring Elgg
The right-side menu gives you several links to Elgg settings. You can change the site name and description in “Basic Settings” (under the “Settings” drop-down menu), and going to “Advanced Settings” will let you adjust several other parameters, including the default post privacy level and the ability for new users to register.
Go to the “Plugins” section to activate or deactive plugins. Several of the pre-installed plugins are already activated by default. Some noteworthy deactivated plugins that you might wish to activate include:
- Elgg Developer Tools (for writing plugins and themes)
- Embed (for letting users embed media content in their posts)
- User dashboard
- OAuth API (allows an Elgg installation to connect to other OAuth-protected sites)
If you enable the Developer Tools, you’ll see a new menu called “Develop” on the bottom right on your screen. You can go here to Tools->Theming Sandbox to test out themes for your Elgg installation using CSS. The Sandbox serves as a visual overview of the CSS properties of various site elements.
The Dashboard
The dashboard acts as a customizable site portal for registered users. Any user can change the configuration of their own dashboard. I registered as a non-administrative user to test out the registration process (which has become much smoother since the last time I tried out Elgg, a year or two ago; this time the confirmation email actually came through!). Upon logging in as this user, I was initially greeted by the (so far) rather plain-looking activity page, which by default shows public events and interactions on the site:
Rubbing Alcoholic is my developer friend who helped test my Elgg installation. Now we’ve consummated our friendship the Elgg way!
From there I went to the dashboard (
your-elgg-installation.com/dashboard
), which was also perfectly empty:![Installation Installation](/uploads/1/2/5/8/125846481/554158710.jpg)
To soup up your own dashboard, just click the “Add widgets” button on the right. If you wish to modify the appearance of the default dashboard for all new users, log in as the administrator and go to Appearance->Default Widgets in the right-side toolbar (this will not change the dashboard for already-registered users).
Now select the “Dashboard” tab under the page header and click “Add widgets.” You can choose to add any of the following:
- Activity (kind of like Facebook’s news feed)
- Bookmarks
- Friends
- Group membership
- The Wire (for microblogging)
- Blogs
- Files (yes, you can share files with Elgg!)
- Group activity
- Pages
Once you’ve added a widget, you can modify its settings by clicking the gear wheel on top of the widget. You can also use this section to add default widgets to users’ profiles. This is what my user dashboard looked like after I added some widgets and produced some site activity:
Third-Party Tools
The buck doesn’t stop here. There are thousands of third-party plugins and themes available for Elgg.
Once you’ve downloaded a plugin or theme, install it by placing the extracted folder into the “mod” directory of your Elgg installation. Then, logged in as the administrator, go to Configure->Plugins and activate it. You can sort plugins by newest to quickly find the one you just uploaded.
Here are some cool plugins I found on the Elgg community site:
- Independence Pro theme
- SW Wire Links Pro – thumbnails for links posted in The Wire (to make this one work you need to go into the plugin settings and select “Yes” where it asks, “Do you want to use Wirelinks Pro?”)
- Social Connect – lets you connect through a number of other social networks using the HybridAuth engine
- Elgg Chat – adds a bottom chat bar much like Facebook’s
Developers, build your own plugins! The Elgg website has plenty of documentation on creating plugins, themes, and other customizations.
Conclusion
While Elgg doesn’t offer all the bells and whistles of Facebook and Google+ out of the box, it is highly configurable and thus could make a great solution for anyone’s needs. It has matured gracefully over the past couple of years, and its user community continues to grow.