How to Build Our Own Social Networking Site with Dolphin Pro

November 23, 2015 | By in LINUX HOWTO
| Reply More

Dolphin Pro is a free and open source Content Mangement System (CMS) built for developing highly advanced and featured social networking websites. It has a complete set of features needed for a beautiful social networking site like forums, photos, video, music, blogs, polls, events, groups, chat, messenger, templates, languages and many more. We can develop awesome social networking, dating, community website and many more. Simply, we can build our own new social site like facebook, twitter, etc with all the necessary features out of the box. Dolphin is often known as the world's top social networking CMS so far. It has many beautiful theme, templates and more over has a super clean and elegant web interface and design.

Here are some easy steps on how we can setup Dolphin Pro and build our own Social Networking site in a Linux machine.

1. Installing LAMP Stack

First of all, we'll gonna install LAMP Stack, LAMP is the combination of Apache Web Server, MySQL/MariaDB Database server and PHP modules. To setup it, we'll need to run the following command as shown below.

On Ubuntu 14.04

# apt-get update
# apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php5-xsl php5-cli zip

Ubuntu Mysql Config

While installing the lamp stack, it will pop a screen as shown bellow to configure our mariadb server and will ask us to enter a new password for the root user of database server. We'll enter the root password we wanna assign and then continue for the installation. This root password should be noted which we'll need to configure the database for dolphin.

On CentOS 7

# yum install httpd mariadb-server mariadb php php-gd php-mysql php-curl php-xsl php-cli php-mbstring zip

On Fedora 22

# dnf install httpd mariadb mariadb-server php php-gd php-mysql php-curl php-xsl php-cli php-mbstring zip

2. Installing Java and ImageMagick

As some of dolphin’s features requires media streaming capabilities, we'll need to setup Java and ImageMagick in our machine. To do so, we'll need to execute the following command with respect to our distribution of linux.

On Ubuntu 14.04

# apt-get install openjdk-7-jdk ImageMagick

On CentOS 7

# yum install java-1.7.0-openjdk ImageMagick

On Fedora 22

# dnf install java-1.7.0-openjdk ImageMagick

3. Installing an MTA

If we want enable our Dolphin application to send emails, then we'll need to setup an MTA. The most popular MTA (Mail Transfer Agent) in linux is Postfix. We'll need to install postfix and configure it.

On Ubuntu 14.04

We can install postfix in ubuntu by running the following apt command.

# apt-get install postfix

On CentOS 7

We can install postfix in CentOS  by running the following yum command.

# yum install postfix

On Fedora 22

In Fedora 22, we can install it using dnf package manager.

# dnf install postfix

After installing, we'll need to edit the configuration of our postfix configuration using a text editor.

# nano /etc/postfix/

Then, we'll need to replace the value of myhostname parameter to our FQDN ie .

myhostname =

4. Starting Apache and MariaDB server

Next, we’ll gonna start our newly installed apache web server and mariadb database server in our linux box. To do so, we'll need to execute the following commands.

On Ubuntu 14.04

As Ubuntu 14.04 is shipped with SysVinit as init system, we'll need to run the following command to start our apache web server and mariadb

# service mysql start
# service apache2 start

In Ubuntu, both mariadb and apache servers are set to start automatically in every system boot by default. So, we'll no need to configure it for that.

On CentOS 7/Fedora 22

Both CentOS 7 and Fedora 22 runs systemd as the default init system, we'll run the following command to start our httpd and mariadb services.

# systemctl start httpd mariadb

Next, we'll enable them to start automatically in every startup of init system using the following command.

# systemctl enable httpd and mariadb

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/'
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/'

5. Configuring MariaDB

As we have already assigned a root password for our mariadb database server in Ubuntu, we'll simply skip this step for Ubuntu. But as we haven't assigned it for our CentOS and Fedora, if we are running CentOS or Fedora, we'll need to follow this step in order to configure it.

On CentOS 7/Fedora 22

Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Dolphin Pro installation.

To configure MariaDB and assign a root password, we’ll need to run the following command.

# mysql_secure_installation

This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations.

so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

installation should now be secure.

Thanks for using MariaDB!

6. Creating new Database

Once we have assigned password to our root user of database server, we'll start creating our new database for Dolphin Pro. To do so, first we'll need to login to our MariaDB console by running the following command.

# mysql -u root -p

After executing the above command, it will ask us to enter the password for our root which we had just defined in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and permissions to create, remove and edit the tables and data stored in it.

> CREATE DATABASE dolphindb;
> CREATE USER 'dolphinuser'@'localhost' IDENTIFIED BY 'Pa$$worD123';
> GRANT ALL PRIVILEGES ON dolphindb.* TO 'dolphinuser'@'localhost';

Creating New Database

Once everything above is done as expected, we’ve successfully created a database named dolphindb with username dolphinuser and password as Pa$$worD123 .

Note: It is strongly recommended to replace the above variables as your desire for the security issue.

7. Downloading Dolphin Pro

We'll now download the latest release of Dolphin Pro from their Official page ie . As the latest release of Dolphin Pro while writing this article was version 7.2.1, we'll gonna download it via curl and then extract it under the Apache Webroot.

# cd /tmp/
# curl -LJO

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
4 456 0 0 100 19 0 26 --:--:-- --:--:-- --:--:-- 26
0 351 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 29.8M 100 29.8M 0 0 6646k 0 0:00:04 0:00:04 --:--:-- 9.8M
curl: Saved to filename ''

After its extracted, we'll run the following unzip command to extract it and then we'll move it to the default apache webroot directory ie /var/www/html/ .

# unzip
# mv Dolphin-v.7.2.1 /var/www/html/dolphin

8. Configuring Apache Server

Next, we'll gonna configure our Apache Server so that dolphin will run with proper configuration. To do so, we'll create a new virtualhost by creating a new conf file named dolphinpro.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux.

On Ubuntu 14.04

# touch /etc/apache2/sites-available/dolphinpro.conf
# ln -s /etc/apache2/sites-available/dolphinpro.conf /etc/apache2/sites-enabled/dolphinpro.conf
# nano /etc/apache2/sites-available/dolphinpro.conf

Now, we'll gonna add the following lines of configuration into this file using our favorite text editor.

<VirtualHost *:80>
DocumentRoot /var/www/html/dolphin/
<Directory /var/www/html/dolphin/>
Options FollowSymLinks
AllowOverride All
ErrorLog /var/log/apache2/
CustomLog /var/log/apache2/ common

After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server.

# service apache2 restart

On CentOS 7/Fedora 22

In CentOS and Fedora, we'll directly create the file dolphin.conf under /etc/httpd/conf.d/ directory using our favorite text editor.

# nano /etc/httpd/conf.d/dolphin.conf

Then, we'll gonna add the following lines of configuration into the file.

<VirtualHost *:80>
DocumentRoot /var/www/html/dolphin/
<Directory /var/www/html/dolphin/>
Options FollowSymLinks
AllowOverride All
ErrorLog /var/log/httpd/
CustomLog /var/log/httpd/ common

Once done, we'll simply save the file and exit the editor. And then, we'll gonna restart our apache web server.

# systemctl restart httpd

9. Configuring PHP

We'll now configure our PHP configuration file so that it will fulfill the requirements of Dolphin Pro. Configuring PHP as required for Dolphin will result in the best performance it can give. To configure PHP, we'll need to edit the php.ini file in our linux machine whose path differs from distribution to distribution.

On Ubuntu

Php.ini file is located under /etc/php5/apache2/ directory in Ubuntu distributions. So, we'll need to run the following command to edit php.ini with our favorite text editor.

# nano /etc/php5/apache2/php.ini

On CentOS 7/Fedora 22

It is located under /etc directory in CentOS and Fedora distributions. So, we'll run the following command to edit it.

# nano /etc/php.ini

After the file is opened using a text editor, we'll need to append the file with the following configurations.

register_globals = Off
safe_mode = Off
memory_limit = 128M
short_open_tag = On
file_uploads = On
allow_url_fopen = On
allow_url_include = Off
magic_quotes_gpc = Off
default_charset = "UTF-8"

10. Fixing Permissions and Ownership

Now, we'll gonna fix some file permissions and ownership of the dolphin's installation path. First, we'll gonna set the ownership of the dolphin's installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete.

On Ubuntu 14.04

# chown www-data: -R /var/www/html/dolphin

On CentOS 7/Fedora 22

# chown apache: -R /var/www/html/dolphin

Setting Permission

Then, we'll need to change the permission of some directories and files as follows.

# cd /var/www/html/dolphin
# chmod 755 flash/modules/global/app/ffmpeg.exe

11. Allowing Firewall

Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Dolphin Pro will be accessible from other machines in the network across the default http port ie 80.

On Ubuntu 14.04

Iptables is a popular firewall program which is installed in the ubuntu distributions by default. To expose port 80, we'll need to run the following commands in a terminal or console.

# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# /etc/init.d/iptables save

On CentOS 7/Fedora 22

As CentOS 7 has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands.

# firewall-cmd --permanent --add-service=http


# firewall-cmd --reload


12. Accessing Web Interface

Finally, after everything is setup and configured in above steps, we'll now go for accessing the web installation process of Dolphin Pro. To do so, we'll need to point our web browser to http://ip-address/ or . Here, in this tutorial, we'll point our browser to . After done, we'll be welcomed by the Dolphin Pro Installation Page as shown below.

Dolphin Web Installation Homepage

Now, we'll gonna click on INSTALL button and get started towards the installation of Dolphin. After that, we'll navigated to next page which shows if all the files and directories have all the required permissions or not. As we have already set the permissions and ownership in the above step, we'll see everything correct with all the things in green color. Then, we'll click on Next button to continue.

Checking Directory File Permission

We can see that Dolphin checks general script paths and as we have already completed those required things, we'll see everything green in color. Then, we'll go further by clicking on Next.

Checking Scripts Path

Now here is the main part of the installation where we'll set the database information so that Dolphin will be able to have full control over its database. We'll keep host port number and socket path blank so that they will pick the default configurations. We'll need to set the database name, database user and password that we had set while creating our new database. Here, in this article, we have set dolphindb, dolphinuser and Pa$$worD123 as the database name, user and password respectively.

Configuring Database Web Interface

After done, we'll click Next and go further towards the Site Configuration page where we'll set the information of our Social networking site.

Configuring Site Information

Now, we'll need to add a new cron job which will run the script in every minute by running the following command in our linux machine.

Add Dolphin Cron Jobs

# crontab -e

We'll need to add the following lines into the opened text editor.
* * * * * cd /var/www/html/dolphin/periodic; /usr/bin/php -q cron.php

Permission Reversal

After done, we'll need to set Non-writable permission to the inc directory as we can seen above. And it can be done by running the following command.

# chmod -w /var/www/html/dolphin/inc

Dolphin Installed Successfully


13. Post Installation

Finally, as everything is setup and ready to go, we'll now need to complete a post installation task. We'll now need to remove the install directory for security measures. That can be done by executing the following command.

# rm -rf /var/www/html/dolphin/install/

Now, we'll be able to login to the Dashboard by logging in using username and password that we had just assigned in the above step. Next, we'll first need to add all those modules needed for our social networking site.

Dolphin Modules Page

And the default homepage of our social networking site will look as below.

Dolphin Social Site Homepage


Dolphin powers more than 300,000 web communities, online dating sites and social networking sites. It is highly extensible with its thousands of extensions, integrations, templates and language packs available at BoonEx Market. There are native open-source iOS and Android apps that we can customise as well as re-brand on our desire for our social networking website. This CMS fulfills the dream of many non technical people to run their own social networking website. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !


Share This :

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.