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.


Server Details


Sharedance Server

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

# rpm --import
# rpm -Uhv

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= --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*       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
# scp session_handler.php sharedance.php

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.


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

# service httpd restart


I download this document: 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.