Instalar dudle con debian 12 Blackhold

Tabla de contenido

Por fin otra tarea menos! Esta ya daba vergüenzilla y todo al tener la instalación anterior de dudle aún con Debian 6!!! Así que directamente lo que he planteado es hacer una instalación limpia y los datos que puedan estar ahí, que pasen a mejor vida! Aunque creo que los datos aún serían compatibles, parece que tienen el mismo formato.

Vamos a ver como se hace ahora la instalación. Para ello he seguido el repositorio de github del proyecto que omite la información de la instalación y configuración de apache.

Primero vamos a instalar las dependencias:

# apt -y install apache2 git ruby-dev libxml2-dev zlib1g-dev
# gem install ratom

A continuación clonamos el repositorio en algún sitio del servidor, en mi caso lo he dejado en /var/www/dudle

# cd /var/www
# git clone https://github.com/kellerben/dudle.git

Ahora vamos a descargar los ficheros .mo correspondientes a los ficheros de idioma compilados. Vamos a crear un script, le damos permisos de ejecución, lo ejecutamos y finalmente borramos el fichero.

# cd dudle/locale # vi download_mo.sh
for i in ??; do wget -O $i/dudle.mo https://dudle.inf.tu-dresden.de/locale/`basename $i`/dudle.mo
done # chmod +x download_mo.sh # ./download_mo.sh # rm download_mo.sh

Ahora configuramos apache:

# cd /etc/apache2/sites-available # vi dudle.conf
<VirtualHost *:80> ServerName dudle.marsupi.org ServerAlias *.dudle.marsupi.org dudle.lamardebits.org *.dudle.lamardebits.org dudle.lamardebits.cat *.dudle.lamardebits.cat ServerAdmin [email protected] DocumentRoot /var/www/dudle/ ErrorLog /var/log/apache2/dudle.error.log CustomLog /var/log/apache2/dudle.access.log combined <Directory "/var/www/dudle"> AllowOverride All SetEnv RUBYLIB /var/www/dudle/ SetEnv RUBYOPT "-E UTF-8:UTF-8" SetEnv GIT_AUTHOR_NAME="Blackhold" SetEnv [email protected] SetEnv GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" SetEnv GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" Order allow,deny Allow from all </Directory>
</VirtualHost> # cd /etc/apache2/sites-enabled/; rm *; ln -s ../sites-available/dudle.conf .

Habilitamos los módulos de apache que necesitamos, comprobamos que no falla nada y reiniciamos apache

# a2enmod rewrite cgid
# apache2ctl configtest
# service apache2 restart

Una recomendación que nos hacen a la documentación de instalación es de configurar un script en el cron

# vi /etc/crontab
# clean old dudle polls
0 0	* * *	www-data /var/www/dudle/dudle_cleanup.sh

A continuación volvemos al directorio de dudle y copiamos el fichero de configuración config_sample.rb de ejemplo a config.rb, en mi caso para poner mi propia hoja de estilos

# cd /var/www/dudle
# cp config_sambple.rb config.rb
# vi config.rb
$conf.default_css = "css/marsupi.css"
# mkdir css
# vi css/marsupi.css
/***************************************************************************
* Copyright 2011 Benjamin Kellermann *
* *
* This file is part of dudle. *
* *
* Dudle is free software: you can redistribute it and/or modify it under *
* the terms of the GNU Affero General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* Dudle is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public *
* License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dudle. If not, see . *
***************************************************************************/ /* head */ body { padding: 0px; color: black; font: 70% Verdana,Helvetica,Arial,sans-serif; background-color: #CCC; margin: .5em .5em 1em; border: white 1px solid;
} #header1 { background-color:#AA0000; width:20px; height:72px; float:left; margin: 0;
}
#header2{ background-color:#AA0000; padding: 20px 0 5px 300px; background-image:url(https://capa8.net/wp-content/uploads/2020/03/petit.png); background-position:left 20px; background-repeat:no-repeat; height:65px; float:left;
/* margin: 0 1.275em 0 0;*/
}
#header3 { background-color:#AA0000; height:92px; padding: 0; margin: 0;
} #breadcrumbs { min-height:1.37em; padding: .4em 0 .4em 68px; background-color: #000; color: #C6D3DF;
}
#breadcrumbs a { color: #C6D3DF;
} /* main content */ #main{ background-color: white; border: 1px solid #EEE;
} label { cursor: pointer; } #tabs{ float:left; padding-top: 1.5625em; width: 15em;
}
#tabs ul{ list-style:none; margin: 0; margin-top:.5em; padding: 0;
} #tabs li.nonactive_tab , #tabs li.active_tab{ background-color: #FFF; background-image: url(tud/big_emptynode_close.gif); background-repeat: no-repeat; background-position: left; color: #333; display: block; text-decoration: none; margin: 0; padding: .3em .3em .4em 0; padding-left: 28px;
} #tabs li.active_tab, #tabs li.nonactive_tab:hover { background-color: #CCC;
}
#tabs li.active_tab{ background-image: url(tud/big_emptynode_open.gif);
} #tabs li.nonactive_tab a { border-bottom: none; color: #333;
}
#tabs li.separator_tab { border-top: 1px solid #ccc;
} #content{ margin-top:0; margin-left: 15em; padding-top: 1.5625em; padding-left: 1em; padding-bottom: 1.25em; line-height: 1.5em; min-height: 20em; border-left: 1px solid #ccc;
} #tabs:before { content:"dudle"; margin: 0 0 0 1em; padding: 0 8em .375em 0; min-width: 15em;
} /* content */ .invisible { border:none; visibility: hidden;
} .textcolumn{ text-align: left; max-width: 45em;
} .shorttextcolumn{ text-align: left; max-width: 20em;
} h1, h2, h3, #tabs:before { font-size: 1em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
} h1, #tabs:before { border-bottom: dotted 1px #333; color: #333; line-height: normal;
}
h1 { margin: 0 0 1.875em -.5625em; padding: 0 .5625em .375em;
} h2, h3{ color: #666; font-style: normal; margin-bottom: .5em; margin-top: .5em;
} h3 { font-style: italic; font-weight: 700; letter-spacing: .05em; text-transform: none;
} a, a:active { color: #40779E; text-decoration: none;
} a:hover { text-decoration: underline;
} td { vertical-align:middle; text-align:center;
}
th, td.navigation, td.sum { padding: 0.25em 0.5em 0.25em 0.5em; background-color: #CCC;
/* border: #999 1px solid;*/ border: none;
}
th a { border: none;
}
td.sum{ color: #FFF}
td.match_100{background-color: #860000; }
td.match_90{ background-color: #1D355B; }
td.match_80{ background-color: #2F4067; }
td.match_70{ background-color: #3F4F74; }
td.match_60{ background-color: #515D80; }
td.match_50{ background-color: #636C8E; }
td.match_40{ background-color: #777F9E; }
td.match_30{ background-color: #8B94B1; }
td.match_20{ background-color: #A8AFC7; }
td.match_10{ background-color: #CDD4E2; }
td.match_0{ background-color: #D9DCE2; } #active, #active input.delete { background-color:#89b6df;
}
pre#configwarning { font-family: "Courier New",Courier,monospace; letter-spacing:0; margin-top: -12ex; line-height:95%; margin-left: -2ex;
} .warning, .error{ color: #E87B14;
} td.separator_top{ border-top: dotted 1px #333; padding-top:0.7ex;
} th.weekday{ width: 2.5em; padding: 0.25em 0.5em 0.25em 0.5em;
} input.navigation, input.disabled, input.chosen, input.notchosen, input.delete, input.toggle { border: none; padding: 0px; margin: 0px; cursor: pointer; min-height: 1.5em;
}
input.navigation, input.disabled, input.chosen, input.notchosen, input.toggle { width: 100%;
}
input.toggle { padding:0 0.5em 0 0.5em;
}
.navigation, input.delete, input.toggle { background-color: #CCC;
} a.editcolumn { color: black;
}
.navigation:hover, #active input.delete:hover, input.delete:hover, a.editcolumn:hover, input.toggle:hover { background-color: #ffff69;
}
input.chosen { background-color: #fac600;
} td.a_yes__, table.checkboxes tr.input-a_yes__ td { background-color: #D3E7C5;
}
input.disabled, td.undecided { color: #999;
}
td.c_no___, table.checkboxes tr.input-c_no___ td { background-color: #F4E0E8;
}
td.b_maybe, table.checkboxes tr.input-b_maybe td { background-color: #FDF2D1; } input.notchosen, input.disabled { background-color: #FFF;
}
input.notchosen:hover, input.chosen:hover, input.disabled:hover { background-color: #ffff69;
} td.settingstable, table.settingstable td{ text-align: left;
}
table.settingstable td.label{ text-align: right;
} table.calendarday td{ border-spacing: 0; margin: 0; padding: 0; border: #999 1px solid;
}
table.calendarday td.navigation{ padding: 0 .5em 0 .5em; border: none;
}
table.calendarday td.invisible, table.calendarday td.addColumnManual { border: none;
}
table.polltable { padding: 10px; border-collapse: separate; border-spacing: 2px;
}
#polltable { overflow: auto;
}
table, table td { border: none;
} table.polltable td { padding: 0.25em 0.5em 0.25em 0.5em; margin: 1em;
} td.name { text-align: right;
}
table.polltable tr.participantrow:hover { background-color: #E5EBF2;
}
table.polltable td.checkboxes { padding:0; margin: 0;
} table.checkboxes { border-spacing: 0; width: 100%;
} table.polltable tr td.input-radio { border-right:none;
}
table.polltable tr td.input-label { border-left:none;
} tr#add_participant { background-color: #f5f9fc;
} form#ac_participant, form#ac { background-color: #E5EBF2;
}
form#ac_participant, form#ac, form#ac_admin{ padding: 1em;
} div#wizzard_navigation { text-align: center;
} div#languageChooser { position:absolute; top:15px; padding:0; margin:0; right: 1.2em; color: #000; font-weight: 700;
}
div#languageChooser li, #breadcrumbs li, #footer1 li { list-style:none; display: inline;
}
#breadcrumbs ul { padding:0; margin:0;
}
li.lang ~ li.lang:before { content:"| ";
}
li.breadcrumb ~ li.breadcrumb:before { content: " » ";
} #footer1 { background-color: #860000; height: 2.15em; border: none;
}
#footer1 a { font-weight: bold; color: #fff; text-decoration: none; margin-right: 1.25em;
}
#footer1 ul { padding: .4em 1.25em; margin: 0;
} div#languageChooser a { border: none; color: #FFF;
}
div#languageChooser a:hover { text-decoration: underline;
}

Para que todo funcione correctamente, le damos permisos a www-data a todo el directorio

# cd /var/www
# chown -R www-data:www-data dudle

Y listos! ya podemos acceder a dudle por http. En esta configuración lo he expuesto sólo al puerto 80 porqué los certificados lo gestiono en un frontal con nginx.

PS: Justo al usar la primera encuesta me sale el error “An error occurred while executing DuD-Poll.”, para ello será necesario ejecutar:

# cd /var/www/dudle
# git config --global --add safe.directory /var/www/dudle
# git grep -l YAML::load | xargs sed s/YAML::load/YAML::unsafe_load/ -i
INFORMACION DEL PUBLICADOR
Kamal Majaiti
Kamal Majaiti
Administrador de sistemas e informático por vocación.
COMPARTELO EN REDES
Publica un comentario

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.