Install Sharedance on CentOS/RHEL

So as to store the information, Sharedance needs an unfilled registry regardless. As a matter of course, it will pick/tmp/sharedance, however you’re unequivocally urged to change this. In case you’re not wanting to store gigantic information and on the off chance that you require great pace, utilize a memory filesystem like tmpfs (Linux/Solaris) or mfs (BSD). As huge amounts of documents can be made in this index, a cutting edge filesystem like ReiserFS or UFS+dirhash is emphatically prescribed.

gpl-ghostscript-3_opt

Server Details

SERVER IP: 192.168.1.5
SESSION DIRECTORY: /VAR/SHAREDANCE
WEBSITE: MISTERRYAN.COM
WEBSERVER #1: 192.168.1.11
WEBSERVER #2: 192.168.1.12

Sharedance Server

Step 1: We will utilize RPMforge to make our life simpler.

# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Step 2: Introduce Sharedance utilizing yum.

# yum install sharedance -y

Step 3: I need Sharedance to listen to the primary IP and store close ought to be 6 hours. Open /etc/sysconfig/sharedance bvia text editor and verify you have taking after line.

SHAREDANCE_OPTIONS="--ip=192.168.1.5 --expiration=21600"

You can use taking after order to check the complete rundown of alternatives accessible.

# sharedanced --help

Step 4: Verify it is auto begin on boot and begin the Sharedance service.

# chkconfig sharedance on
# service sharedance start

Step 5: You can check in the process list this 2 courses of action ought to exist and listening to port 1042.

# ps aux | grep sharedanced
496    2621    0.0   0.0   111520  568  ?  Ss   11:44   0:00   sharedanced [SERVER] 
496    2622    0.0   0.0   111520  352  ?  SN   11:44   0:00   sharedanced [CLEANUP]
# netstat -tulpn | grep sharedanced
tcp   0   0     192.168.0.171:1042     0.0.0.0:*       LISTEN       2621/sharedanced [SERVER]

To allow firewall rules in iptables for Sharedance port:

# iptables -I INPUT -p tcp --dport 1042 -j ACCEPT

Step 6:We have to duplicate the PHP session handler and sharedance PHP record gave by Sharedance which is situated under/usr/share/doc/sharedance-0.6/php/ direcotry to all web group hubs so they can prepend in the php.ini. I will duplicate them to /ect/php.d registry in all hubs.

# cd /usr/share/doc/sharedance-0.6/php/
# scp session_handler.php sharedance.php 192.168.1.11:/etc/php.d/
# scp session_handler.php sharedance.php 192.168.1.12:/etc/php.d/

Web Servers

Step 1: Change the php.ini value of your server as below:

auto_prepend_file = /etc/php.d/session_handler.php
session.save_handler = user

Step 2: Alter /etc/php.d/ session_handler.php utilizing content manager and verify the first line contain the IP location of Sharedance server.

define('SESSION_HANDLER_HOST', '192.168.1.5');

Step 3: Restart Apache web server to apply the changes:

# service httpd restart

Testing

I download this document: http://blog.secaserver.com/documents/session.tar.gz and execute it from the web server to get taking after result.
We should see the same session ID exist in Sharedance session directory at /var/lib/sharedance:

 
# ls -al | grep tqsncjk23k78cqwerm747n4b1eq5l4
-rw------- 1 sharedance sharedance 24 Aug 1 12:17 tqsncjk23k78cqwerm747n4b1eq5l4

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.