How to install Open Source Social Network on a CentOS 7 VPS

Leave reply

ossnOpen Source Social Network or simply OSSN is PHP based social networking application. Using OSSN you can create your own social network website and build relationships with your members. In this article we will explain how to install OSSN on a CentOS 7 VPS with Apache, MariaDB and PHP.

The installation is pretty simple. In order to run Open Source Social Network, your server needs to meet the several requirements
– PHP 5.3 or newer
– MySQL 5 or newer
– Apache web server
– Apache mod_rewrite
– PHP Function curl
– PHP GD Library
– JSON Support
– XML

Log in to your server as user root and make sure that all service are up to date by executing the following command

yum -y update

Install MariaDB database server on your CentOS 7 machine

yum install mariadb mariadb-server

Start the MariaDB database server and enable it to start on boot

systemctl start mariadb
systemctl enable mariadb

Run the ‘mysql_secure_installation’ script to secure the database server and set your MariaDB root password

Log in to the MariaDB server using the ‘root’ user and create a new database and user for OSSN:

mysql -u root -p
CREATE DATABASE ossn;
CREATE USER 'ossnuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON `ossn`.* TO 'ossnuser'@'localhost';
FLUSH PRIVILEGES;

Next, we will install Apache web server

yum install httpd

Same as we did with MariaDB, start the Apache web server and add it to automatically start on the system start-up

systemctl start httpd
systemctl enable httpd

OSSN is PHP based application, so we need to install PHP among with few PHP modules

yum install php php-gd php-xml php-common

Go to OSSN’s official website and download the latest stable release which currently is OSSN version 2.3

wget https://www.opensource-socialnetwork.org/downloads/ossn-v2.3-1426433343.zip

Unpack the OSSN files to the document root directory on your server

unzip ossn-v2.3-1426433343.zip -d /var/www/html/

This will create new ‘ossn’ directory inside the document root.

Change the ownership of the directory

chown -R apache:apache /var/www/html/ossn

To find out where is your document root directory you can use the following command

grep -i '^documentroot' /etc/httpd/conf/httpd.conf

OSSN needs a directory for storing the uploaded files such as profile icons and photos. For security reasons we will create this directory outside of the document root directory

mkdir /var/www/ossndata

Next, create Apache virtual host for your domain. Create ‘/etc/httpd/conf.d/vhosts.conf’ directory with the following content

vim /etc/httpd/conf.d/vhosts.conf

IncludeOptional vhosts.d/*.conf

Create the virtual host

vim /etc/httpd/vhosts.d/yourdomain.com.conf

<VirtualHost YOUR_SERVER_IP:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/yourdomain.com"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/yourdomain.com/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

and finally restart Apache for the changes to take effect.

systemctl restart httpd

Now, open a web browser and head it to http://yourdomain.com to finish the OSSN installation

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Open Source Social Network for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


50% OFF Coupon

EXCLUSIVE EMAIL UPDATES AND “MEMBERS-ONLY” CONTENT


3 Responses to “How to install Open Source Social Network on a CentOS 7 VPS”

  1. iomarian

    CONFIGURATION DIRECTORY IS NOT WRITEABLE

    i get this error message; i’ve tried to chmod 666 the /var/www/html but no luck; could someone help me with this ? thanks

    Reply
  2. Techrights

    […] How to install Open Source Social Network on a CentOS 7 VPS […]

    Reply

Leave a Reply