How to set up Pentabarf Conferencing System with Apache and FCGID on Ubuntu
https://www.zyxware.com/sites/default/files/styles/user_image/public/pictures/zyxlogo.png?itok=J9t-ZEoU
BY webmaster
11 years ago
Web-Development
1 comments comment
We had recently been involved in a project to set up a Conference Management System for an International Conference to be conducted in Kerala sometime later this year. We had zeroed in on Pentabarf as the solution we were going to base the system on. Pentabarf is a Ruby on Rails solution that has been used for the last couple of DebConfs. Pentabarf as such is an excellent system, being a system created by programmers for programmers, but it heavily lacked in documentation both on their site and on the world wide web. We however managed to get it installed on Ubuntu with Apache, Ruby on Rails and FastCGI. We are sharing the installation instructions for Pentabarf on Ubuntu here

First we have to install all the relevant packages that are available in Ubuntu.
sudo apt-get install apache2
sudo apt-get install postgresql pgadmin3 ruby 
sudo apt-get install postgresql-contrib
sudo apt-get install imagemagick
sudo apt-get install libpq5 libpq-dev
sudo apt-get install shared-mime-info
sudo apt-get install libxmpp4r-ruby
sudo apt-get install rubygems
sudo gem install rails
sudo gem install xmpp4r
sudo apt-get install ruby1.8-dev
sudo apt-get install libmagick-dev
sudo gem install rmagick

This was failing. So went ahead and removed the following The following error was observed - "Can't install rmagick rmagick-2.5.1. Can't find MagickCore.h" Was also getting the following error initially "Can't find Magick-config or GraphicsMagick-config program."
sudo apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8
sudo apt-get remove graphicsmagick-libmagick-dev-compat

And installed the following
sudo apt-get install libmagick9-dev ruby1.8-dev
sudo gem install ruby-postgres

This was giving the following error
postgres.c:31: error: conflicting types for ‘pg_encoding_to_char’
/usr/include/postgresql/libpq-fe.h:518: error: previous declaration of ‘pg_encoding_to_char’ was here
postgres.c: In function ‘pgconn_s_escape_bytea’:
postgres.c:370: warning: pointer targets in passing argument 1 of ‘PQescapeBytea’ differ in signedness
postgres.c: In function ‘pgconn_s_unescape_bytea’:
postgres.c:401: warning: pointer targets in passing argument 1 of ‘PQunescapeBytea’ differ in signedness
make: *** [postgres.o] Error 1

To fix this open /usr/include/postgresql/libpq-fe.h replace
extern  const char *pg_encoding_to_char(int encoding);)
in line 518 with
extern  char *pg_encoding_to_char(int encoding);)
and rerun the command to install the gem
sudo gem install momomoto
sudo gem install shared-mime-info
sudo gem install icalendar
sudo gem install BlueCloth

Download the latest release of pentabarf from the URL given on the site. We used
svn co svn://svn.cccv.de/pentabarf/tags/0.3.13

To start off, we need to change the PostgreSQL postgres user password, we will not be able to access the server otherwise. As the “postgres” Linux user, we will execute the psql command, in a terminal type:
sudo -u postgres psql template1

Then at the new prompt, type these two commands, replacing 'yourpassword' with the new password
ALTER USER postgres WITH PASSWORD 'yourpassword'; 
\q
Then run the following to create the database
sudo -u postgres createdb pentabarf
sudo -u postgres PGDATABASE=pentabarf createlang plpgsql

cd <path to 0.3.13>/sql
sudo -u postgres PGDATABASE=pentabarf make install

Make sure that there were no errors during installation by checking the messages

Go edit /etc/postgresql/8.3/main/postgresql.conf
sudo gedit /etc/postgresql/8.3/main/postgresql.conf

Goto the variable custom_variable_classes and then set its value to
custom_variable_classes='pentabarf'

Also make sure to uncomment the line. Now restart pgsql by running
sudo /etc/init.d/postgresql-8.3 restart

If you don't set this the next command will fail with the following error "unrecognized configuration parameter "pentabarf.transaction_id""
sudo -u postgres PGDATABASE=pentabarf make import

Make sure that there were no errors by checking the install.log file created in the same folder
sudo -u postgres PGDATABASE=pentabarf make user

Make sure that there were no errors by checking the install.log file created in the same folder

Install pgcrypto in the pentabarf database. The path might be slightly differently depending on your operating system/distribution.
sudo -u postgres PGDATABASE=pentabarf psql < /usr/share/postgresql/8.3/contrib/pgcrypto.sql

Install the script provided with momomoto by using the following
sudo -u postgres PGDATABASE=pentabarf psql < /var/lib/gems/1.8/gems/momomoto-0.1.17/sql/install.sql

Goto <path to 0.3.13>/rails/config and copy database.yml.template and rename as database.yml Edit the database connection settings for the databases. The default system settings is for production

Set up fast-cgi which is the suggested method for running pentabarf
sudo apt-get install libapache2-mod-fcgid libfcgi-ruby1.8
sudo a2enmod fcgid

Now create a virtual host by editing httpd.conf. In our case we created it in the root by adding the following to /etc/apache2/httpd.conf
<VirtualHost *>
ServerName localhost
DocumentRoot /home/user/public_html/pentabarf/public/

<Directory /home/user/public_html/pentabarf/public/>
  AllowOverride All
  Order allow,deny
  allow from all
</Directory>

</Virtualhost>

The AllowOverride option allows you to change settings using .htaccess Open .htaccess (copy and rename the htaccess.txt provided in the public folder) and add the following lines
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

Also make sure that rewrite base is pointing to the path to the virtualhost from the webhost root eg:
RewriteBase /

for the virtual host set up as shown above in the httpd.conf example.

Now comment the line
#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
and add the following
RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]

This will allow the pass through of HTTP Authentication through http headers. This hack is required since Apache does not allow for the pass through of HTTP authentication to fcgid scripts.

The only rewrite condition and rule set required is
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]

You can leave the rules and conditions for the symlinked directories commented if you are not using symlinked directories.

Now open <path to 0.3.13>/rails/config/boot.rb and insert the following line at the beginning of the file.
RAILS_ROOT= "/full/path/to/pentabarf/public/folder/till/public/"
Make sure that the above path includes the complete path till the public folder.

These were the steps that we had to follow to get Pentabarf setup on an Apache server with Ruby on Rails and FastCGI. Since the system was not a freshly system it already had some of the required packages and there is a possibility that you will come across additional packages that would be required to get this up and running. If you do so, please post it as a comment so that we can update this information.

If you face problems in setting the solution up post your problems below and we can try to help you with your problems.

RELATED ARTICLE

/themes/custom/zyxpro_light/images/placeholder.png
close

on 09th April 2007 / by webmaster
Freelance projects fall into a separate category of projects in that they target independent deve Community Projects Freelance Open Source Web Development Leave a reply Your email address will not be published. Required fields are marked * Shrinivasan (not verified) access_time 28 Jan 2020 - 15:27 Guys. Great Collection and a great site. It is really impressive to know that there a numerous FOSS tools for web contents. Thanks. Keep Growing. Anonymous (not verified) access_time 28 Jan 2020 - 15:27 In reply to Great collection by Shrinivasan (not verified) Great Collection and a great site!!! Thanks! Silvia (not verified) access_time 28 Jan 2020 - 15:27 Hi, nice work. I also love to use WordPress when setting up a new blog. Greetings JungleDirector (not verified) access_time 28 Jan 2020 - 15:27 Subj. Anybody have? I'ts better, if you have XRumer 5.04... Gimme link Thanks. Ingo (not verified) access_time 28 Jan 2020 - 15:27 Hi, this is a listing of open source software was looking for my new project Thx a lot Add new comment
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

author-image
Anonymous (not verified)
access_time 28 Jan 2020 - 16:30

Hello,
thank's for the good looking HowTo. Would it be possible to bring it up to date? I think the packages have changed.
Thanks