Social networks are a current event. With them, it is possible to follow in real time everything. Thanks to Open Source Social Network (OSSN) you can create one on your own server in an easy and simple way. So, it is important to a company to have one.
Open Source Social Network emerges as a response to the many data security issues of the major companies behind the major social networks in the world. With a powerful but very intuitive web interface, it allows you to create your own social network.
So, let’s install it on Ubuntu Server 18.04.
1. Upgrade the system
Before starting the whole installation process, it is advisable to update the whole system. This ensures that you have the security patches installed on your computer.
:~$ sudo apt update && sudo apt upgrade
As I said before, with this you will have a more stable and safer system.
2. Install Apache web server
Open Source Social Network is a web-based solution. Therefore, it is necessary to install an HTTP web server to host it on a server. In this case, the chosen one will be apache for its simplicity of use.
:~$ sudo apt install apache2
Then, enable and start the service. Next, check the service status.
:~$ sudo systemctl enable apache2 :~$ sudo systemctl start apache2 :~$ sudo systemctl status apache2
Finally, open a web browser and go to HTTP://IP_SERVER
. If you see something like this, apache is correctly installed.
It Works!!
3. Install PHP 7.1
Here’s a little problem. Ubuntu 18.04 comes with PHP 7.2 in its official repositories, however, Open Source Social Network does not support PHP 7.2. So, you have to install PHP 7.1 from an external repository. It’s not complicated, you’ll see.
:~$ sudo add-apt-repository ppa:ondrej/php
Then, install PHP 7.1
sudo apt install php7.1 php7.1-mysql php7.1-curl php7.1-json php7.1-cgi libapache2-mod-php7.1 php7.1-mcrypt php7.1-xmlrpc php7.1-gd php7.1-mbstring php7.1 php7.1-common php7.1-xmlrpc php7.1-soap php7.1-xml php7.1-intl php7.1-cli php7.1-ldap php7.1-zip php7.1-readline php7.1-imap php7.1-tidy php7.1-recode php7.1-sq php7.1-intl
Now you have to check that PHP is working properly with apache. Create a file named example.php
in /var/www/html
and add the following.
:~$ nano /var/www/html/example.php
<?php phpinfo(); ?>
Now, open your web browser and open it. HTTP://IP_SERVER/example.php
if you see the PHP info, then, everything is OK.
4. Install MariaDB
Now you have to install and configure MariaDB as a database manager. This is the default Open Source Social Network. Fortunately, MariaDB is very popular and is available in the main repositories.
:~$ sudo apt install mariadb-server
Next, you have to secure the installation with mysql_secure_installation
script. With that script, you can set a root password and other things more.
:~$ sudo mysql_secure_installation
As you can see, I answered the question that way: Y, N, Y, Y.
Next, you have to create a database and an user for Open Source Social Netwok.
:~$ sudo mysql -u root -p
CREATE DATABASE ossndb; USE ossndb; GRANT ALL PRIVILEGES ON ossndb.* TO 'ossnuser'@'localhost' IDENTIFIED BY 'ossnpss'; FLUSH PRIVILEGES; exit;
You can install Open Source Social Network.
5. Install Open Source Social Network
Finally, you can install it. First, download it.
:~$ cd /tmp/ :~$ wget https://www.opensource-socialnetwork.org/download_ossn/latest/build.zip
Then, decompress it.
:~$ unzip build.zip
The next step is to copy the folder to the Apache directory. Create a new folder for the application data and assign them writing permission.
:~$ sudo cp -r ossn /var/www/html/ :~$ sudo mkdir /var/www/html/ossn_data :~$ sudo chown -R www-data:www-data /var/www/html/ossn/ :~$ sudo chmod -R 755 /var/www/html/ossn/ :~$ sudo chown -R www-data:www-data /var/www/html/ossn_data
Next, create a virtual host for Open Source Social Network.
:~$ sudo nano /etc/apache2/sites-available/ossn.conf
And add the following:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/ossn ServerName ossn.osradar.local <Directory /var/www/html/ossn/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/ossn_error.log CustomLog ${APACHE_LOG_DIR}/ossn_access.log combined </VirtualHost>
Then, enable it and enable the rewrite module. Finally, restart apache.
:~$ sudo a2ensite ossn.conf :~$ sudo a2enmod rewrite :~$ sudo systemctl restart apache2
Next, edit your /etc/hosts.
:~$ sudo nano /etc/hosts
And add the configuration to access. In short, the IP address and the server name.
192.168.1.36 www.ossn.osradar.local ossn.osradar.local
And that’s it. You can finish the installation from the web interface.
6. Completing the installation
Now, access from the web browser. In my case, the direction is: HTTP://ossn.osradar.local. In the next screen, you will see all the installation prerequisites. If all of them are in green color, then you can continue.
Next, you have to set the site settings. Add the database information previously configured.
Next, create the admin account.
If everything went right, you’ll see a screen like this.
Now, you can log in with your credentials.
And you will see the dashboard.
And now you can use the program.
Conclusion
The OSSN installation is not duplicated in Ubuntu 18.04 and can help you to create your own social network using a web interface in an easy and dynamic way.
Please share this article with your friends.