This article provides details on how to install the Ellogon HTTP REST services (or any other Ellogon HTTP service) on the Fedora family of operating systems (i.e. CentOS). A similar installation guide for Ubuntu can be found in "Installing Ellogon HTTP REST Services (Ubuntu)".
1) Install some needed packages
The graphical package of Tcl (Tk) requires libXft.so.2 and libXss.so.1. If these libraries are not available, you can install them as:
sudo yum install libXft libXScrnSaver
In addition, we will need the wget (optional) and subversion packages:
sudo yum install wget subversion
2) Install ActiveTcl 8.6
You can follow the following commands to download and install ActiveTcl:
cd ~ wget http://downloads.activestate.com/ActiveTcl/releases/126.96.36.199/ActiveTcl188.8.131.52.298624-linux-x86_64-threaded.tar.gz tar xvfz ActiveTcl184.108.40.206.298624-linux-x86_64-threaded.tar.gz
sudo sh install.sh
The last command will start a graphical installer. Please use the default options in all windows. ActiveTcl 8.6 will be installed in /opt/ActiveTcl-8.6.
Then, execute the following command to install the Tcl/Tk library packages, as distributed by ActiveTcl:
sudo /opt/ActiveTcl-8.6/bin/teacup update-self
sudo /opt/ActiveTcl-8.6/bin/teacup update
Please remember to repeat these two command frequently, to keep your library up to date.
The last step, is to add ActiveTcl's library path to the system, so Tcl libs can be found:
Create a new text file named "
/etc/ld.so.conf.d/x86_64-ActiveTcl86.conf", and place the following as content:
An easy way to acomplish this task, is through the following command:
sudo echo /opt/ActiveTcl-8.6/lib/ > /etc/ld.so.conf.d/ActiveTcl-8.6-x86_64.conf
Then, execute the following command:
3) Install Ellogon
sudo mkdir Ellogon
chown -R put-your-username-here:put-your-groupname-here Ellogon
svn checkout svn://svn.code.sf.net/p/ellogon/code/runtime Ellogon
You can verify that Ellogon runs, by issuing the following command:
In order to keep your Ellogon binary distribution up-to-date, you can use the following commands:
4) Install Ellogon HTTP Server Support
Ellogon services are provided through the Apache2 Web Server, and the Apache Rivet module. Apache Rivet allows Tcl/Tk scripts to be run inside Apache2, and Ellogon provides a small set of scripts that load Ellogon inside Apache2. In order to install these scripts (i.e. in
~/ellogon-apache-services), execute the following commands:
svn checkout svn://svn.code.sf.net/p/ellogon/code/apache-rivet
5) Install Apache2 (if not installed) and Apache Rivet 2.1 (or newer)
Ellogon services require the Apache2 Web Server, and the Apache Rivet module, enabling the use of Tcl from within Apache. The latest version of Apache Rivet is recommended, and Apache Rivet must be have linked with Tcl/Tk 8.6 (or newer). An Apache Rivet module linked with Tcl/Tk 8.5 (or older) version is not going to work, as Ellogon requires at least Tcl/Tk 8.6.
Apache2 can be installed with the following command:
sudo yum install httpd
sudo systemctrl enable httpd.service
Fedora 20 does not provide a package for Apache Rivet, thus we need to compile it from sources and link our binary with Tcl/Tk 8.6 (an 64-bit system is assumed):
sudo yum install httpd-devel libtool automake autoconf zlib-devel
svn co http://svn.apache.org/repos/asf/tcl/rivet/trunk rivet
libtoolize -f -c && aclocal && autoheader && automake --add-missing && autoconf
sh configure --enable-64bit --enable-threads \
If 'configure' was successful, Apache Rivet is ready for compilation:
Finally, install Apache Rivet with the usual:
sudo make install
You can check that the binary has been installed in
ldd -r /usr/lib64/httpd/modules/mod_rivet.so
You can also check that the library has been installed in
Create a text file named as "
/etc/httpd/conf.d/rivet.conf", and put the following code inside:
AddType "application/x-httpd-rivet; charset=utf-8" .rvt
AddType "application/x-rivet-tcl; charset=utf-8" .tcl
## Replace the following path to server_init.tcl with the correct one...
RivetServerConf GlobalInitScript "set UserHomeDir /home/petasis;source -encoding utf-8 $UserHomeDir/
## Change "petasis" to the correct user name...
Alias /ellogon /home/petasis/ellogon-apache-services/site
AddOutputFilterByType DEFLATE text/html text/plain application/xml application/json
DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt
Allow from all
Require all granted
Create a text file named as "
/etc/httpd/conf.modules.d/20-rivet.conf", and put the following code inside:
LoadModule rivet_module modules/mod_rivet.so
6) Set the proper SELinux context
sudo chcon -u system_u -r object_r -t httpd_config_t \
/etc/httpd/conf.modules.d/20-rivet.confsudo chcon -R -u unconfined_u -r object_r -t httpd_user_content_t \
sudo setsebool -P httpd_enable_homedirs 1
chmod 755 $HOME
7) Restart Apache2
sudo systemctl restart httpd.service
8) Test that everything works
Start your favorite Web browser, and try http://localhost/ellogon/test.tcl. You should see something like "Ellogon 1.9.3".