Greetings Unixmen readers!
In our previous tutorial we discussed what is Trident social network platform and how to install it in Debian based systems like Ubuntu. Today, we will see how to install it in RPM based systems, for example CentOS 7.
Here is my testbox details:
- Operating System : CentOS 7 64 bit minimal installation
- Hostname : server1.unixmen.local
- IP Address : 192.168.1.150/24
First, setup LAMP or LEMP stack in your CentOS server. For the purpose of this tutorial, I am going to setup LAMP (Linux, Apache, MariaDB and PHP) stack in CentOS 7.
To do that, refer the following link.
Also, install the following PHP modules and some required packages if you haven’t installed them yet:
yum install php-curl php-gd php-mbstring unzip wget
Since I am testing it for demo purpose, I disabled SELinux to reduce the complexity.
To do that, edit /etc/sysconfig/selinux file:
Set SELinux value as “disabled”.
[...] SELINUX=disabled [...]
Reboot your server to take effect the changes.
Then, Log in to your MariaDB console using command:
mysql -u root -p
Create a new MySQL database for Trident to use and assign a user to it with full permissions as shown below.
For example, I am going to create a database called “tridentdb” and a user called “tridentuser” with password “centos”. I recommend you to use any strong password that make it so difficult to guess.
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE tridentdb; Query OK, 1 row affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON tridentdb.* TO 'tridentuser'@'localhost' IDENTIFIED BY 'centos'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> quit Bye
Download the latest version from Trident download page
At the time of writing this tutorial, the latest version was 8.0 beta version 2.
Extract the archive using command:
The above command will extract the archive in the current directory. Copy the entire extracted folder to your web root directory.
Note: If you want to install Trident to a subfolder (i.e. example.com/trident), create a subfolder in “/var/www/html/” directory and copy files to it. Don’t just copy the Trident folder. Open it on your computer and copy the entire folder contents – all the files and folders inside of it to your hosting server. Pay attention to .htaccess file, it maybe hidden on *nix systems and in some FTO clients.
I am going to deploy the site in a sub-folder. So, I moved the extracted folder’s contents to a sub folder of Apache root directory as shown below.
mv Trident-v.8.0.0-B2/ /var/www/html/trident
Set the proper permission to the Trident folder as shown below.
chown apache:apache -R /var/www/html/trident/
Access web-based Trident installer
Open your favourite web browser and navigate to http://domain-name/trident/ or http://ip-address/trident/. If you copied the Trident folder contents to the main apache root folder, then the URL will be: http://domain-name/.
The following screen should appear.
Now, you may start click “Start installation” button to install Trident or click “Server audit” to check for any software incompatibilities or incorrect settings. Hence, I don’t have any issues, i clicked “Server installation”.
In the Next window, the installer will verify that all permissions have been properly set to the files and folders and displays the result.
As you see in the following screenshot, I need to set writable permissions to the following file.
Open your Terminal and run the following command to set writable permission to the file.
chmod 777 /var/www/html/trident/plugins/ffmpeg/ffmpeg.exe
Now, restart Apache server to take effect the changes.
systemctl restart httpd
Go back to your web browser with installation page and click “Refresh” button to re-check permissions. If everything is correct, click “Continue”.
Next, enter your site details such as database name, database user and it’s password, site tittle, site email, admin email, administrative account name and it’s password etc.
Also, you need to enter BoonEx key and BonEx secret values. These numbers are required for Trident to check software version updates, buy and download Extensions and check licenses. Just click “Get BoonEx Key And Secret” link to get the numbers via your registered BoonEx account.
To get your Keys an Secrets, go to the link: http://www.boonex.com/oauth/key_and_secret.
Log in to your account or create a new user account if you don’t have one.
Enter the username and password if you already have or click on the Join button to create a new account. Enter your username, password and a valid email Id to get the secret key.
You’ll be redirected to the your Boonex account dashboard. Click on the link that says: Keys & Secrets.
You’ll see your Keys and Secrets.
Now, copy the Keys & Secrets and head back to your Trident installer wizard and paste them in the required boxes and click Submit. Refer the following screenshot.
Congratulations! Trident has been successfully installed on your CentOS server.
Post installation instructions
1. Setup the following cron jobs command:
Add the following lines:
[email protected] * * * * * /usr/bin/php -q /var/www/html/trident/periodic/cron.php
Replace [email protected] with your own mail id.
Restart cron service.
sudo systemctl restart cron
2. Remove /install/ folder from the script root folder.
rm -rf /var/www/html/trident/install/
Access Trident admin console
Now, go to Trident Studio for further customization by navigating to the URL: http://IP-address/trident/studio/ or http://domain-name/trident/studio/.
You’ll be pleased with the following screen. It will show a small snippet of each module. If you want to know what each module does, click Next or Click the Close button to go to the Trident Studio dashboard.
Here it is what Trident Studio dash board looks like.
That’s it. Now, start adding extensions; adjusting site settings; setting membership levels and access permissions; building pages and enjoying your Social network.
Once you done, you can visit the newly created site using URL: http://domain-name/trident.
Congratulations! Now, ask your friends, and colleagues to register on your Social network and start sharing your news, status, updates and have fun!