Escolar Documentos
Profissional Documentos
Cultura Documentos
ORFEO
Manual de
Instalación
Realizado por:
Ing. Hollman Ladino Paredes
Grupo de Proyectos
Departamento Nacional de Planeación.
TABLA DE CONTENIDO
INTRODUCCIÓN.
1. CONVENCIONES.
2. REQUISITOS.
3. SERVIDOR WEB.
3.1 INSTALACIÓN DE PAQUETES.
4. SERVIDOR OPENOFFICE.ORG.
4.1 REQUERIMIENTOS.
4.2 INSTALACIÓN DE PAQUETES.
4.2.1 Java Sdk
4.2.2 Oopenoffice.Org
4.2.3 Tomcat (Jakarta)
5. FÉ DE ERRATAS.
6. GLOSARIO.
INTRODUCCIÓN
LIBJPEG
tar –zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/jpeg ---enable-shared
make
make install
make install-lib
ZLIB
tar –zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure --prefix=/usr/local/zlib
make
make install
GD
tar –zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg/
make
make install
FREETDS
tar -zxvf freetds-stable.tgz
cd freetds-0.63
./configure --prefix=/usr/local/freetds --enable-msdblib --with-tdsver=8.0
make
make install
APACHE
tar –zxvf httpd-2.0.54.tar.gz
cd httpd-2.0.54
./configure --prefix=/usr/local/apache2 --enable-so
make
make install
NOTA: Para comprobar la correcta instalación del servidor web Apache inicie
el servicio ejecutando el siguiente comando
"./usr/local/apache2/bin/apachectl start".
Ello deberá mostrar en un navegador la página de prueba para la instalación
de Apache al digitar en la barra de navegación http://localhost.
#!/bin/sh -e
#
# apache2 This init.d script is used to start apache2.
# It basically just calls apache2ctl.
set -e
if [ -x /usr/local/apache2 ] ; then
HAVE_APACHE2=1
else
exit 0
f
APACHE2="$ENV /usr/local/apache2"
APACHE2CTL="$ENV /usr/local/apache2/bin/apachectl"
apache_stop() {
PID=""
PIDFILE=""
# let's try to fnd the pid fle
# apache2 allows more than PidFile entry in the confg but only
# the last found in the confg is used
#for PFILE in `grep ^PidFile /etc/apache2/* -r | awk '{print $2}'`; do
for PFILE in `grep ^PidFile /usr/local/apache2/logs/* -r | awk '{print $2}'`; do
PIDFILE="$PFILE"
if [ -e "$PIDFILE" ]; then
PID=`cat $PIDFILE`
f
done
if [ -e "$PIDFILE" ]
then
PID=`cat $PIDFILE`
$APACHE2 -k stop
CNT=0
while [ 1 ]
do
CNT=$(expr $CNT + 1)
if [ $CNT -gt 60 ]
then
echo " ... failed!"
echo "Apache2 failed to honor the stop command, please
investigate the situation by hand."
exit 1
f
sleep 1
done
else
echo -n " ... no pidfle found! not running?"
f
else
# if we are here something is broken and we need to try
# to exit as nice and clean as possible
REALPID=0
# if there is a pid we need to verify that belongs to apache2
# for real
for i in $PIDS; do
if [ "$i" = "$PID" ]; then
# in this case the pid stored in the
# pidfle matches one of the pidof apache
# so a simple kill will make it
REALPID=1
f
done
if [ $REALPID = 1 ]; then
# in this case it is everything nice and dandy
# and we kill apache2
kill $PID
else
# this is the worst situation... just kill all of them
#for i in $PIDS; do
# kill $i
#done
# Except, we can't do that, because it's very, very bad
echo " ... failed!"
echo "You may still have some apache2 processes running. There are"
echo "processes named 'apache2' which do not match your pid fle,"
echo "and in the name of safety, we've left them alone. Please review"
echo "the situation by hand."
f
f
}
exit 0
#esaconf/c
cd /etc/rc2.d
ln –s ../init.d/apache S20apache2
PHP
tar –zxvf php-5.0.4.tar.gz
cd php-5.0.4
./configure --with-apxs2=/usr/local/apache2/bin/apxs --prefix=/usr/local/php5
--with-gd-dir=/usr/local/gd/ --with-jpeg-dir=/usr/local/jpeg/ --with-
zlib=/usr/local/zlib/ --with-mssql=/usr/local/freetds/ --with-config-file-
path=/usr/local/apache2/conf --enable-ftp --enable-soap
make
make install
cp php.ini-dist /usr/local/apache2/conf/php.ini
Configuración PHP
Configuración APACHE
Para comprobar que PHP está ejecutándose cuando apache inicia, siga los
siguientes pasos:
a. Inicie el servicio apache.
b. En “/su/carpeta/web” cree un archivo llamado phpinfo.php, su contenido debe
tener lo siguiente:
<?
phpinfo();
?>
4.1 REQUERIMIENTOS.
Antes iniciar con la instalación de este servidor, debemos realizar tareas previas,
estas son:
Ubíquese en la ruta donde desea quede instalado J2SDK y copie en esta el archivo
instalador descargado. Para el caso, el $PATH de instalación de JAVA será
/su/carpeta.
cd /su/carpeta
./j2ssdk.bin
JAVA_HOME="/su/carpeta/j2sdk1.4.2_08"
PATH="$PATH:$JAVA_HOME/bin"
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386
export JAVA_HOME LD_LIBRARY_PATH
4.2.2 OOPENOFFICE.ORG
Por cada usuario del grupo xvfb, el usuario docgen y el usuario root, realice los
siguientes pasos:
a. cd /usr/local/OpenOffice.org1.1.4/
b. ./setup –net
c. Continuar con los pasos del asistente de instalación. Cuando se le pregunte
por "Selección del tipo de instalación", seleccione "Instalación de estación de
trabajo" y continúe con el asistente.
d. Al culminar, lance la aplicación Oopenoffice; para ello ejecute:
cd $HOME/xvfb/usuario/OpenOffice.org1.1.4/soffice
e. Le saldrá un asistente solicitando registrarse, escoja "No registrarse nunca".
#!/bin/bash
umask 002
# Modificar variable NUMTHREADS según numero de procesos
NUMTHREADS=2
start()
{
echo WHOAMI `whoami` >> /var/log/sofficed
env > /var/log/sofficed_env
if [ -f /var/run/sofficed.pid ]; then
echo "Warning: sofficed already running. If not running try forcereload. "
else
for ((a=0; a < $NUMTHREADS; a++))
do
su -c "Xvfb :10$a 2> /dev/null & echo -n " xvfbusr1$a
echo "trata Xvfb :10$a 2> /dev/null & echo -n "
done
sleep 1
echo -n .
cd /etc/rc2.d
ln -s ../init.d/sofficed S30sofficed
Adicione:
<role rolename="manager">
<role rolename="admin">
Modifique:
Tomcat Administration
User name: tomcat y Password: tomcat y clic en login.
#!/bin/bash
export OOI=/opt/OpenOffice.org1.1.4/program/classes
#/home/xvfbusr/xvfbusr0/OpenOffice.org1.1.3/program/classes
export JAVA_HOME=/software/instaladores/j2sdk1.4.2_08
export CLASSPATH=fle:$JAVA_HOME:$OOI/classes.jar:$OOI/common.jar:$OOI/docbook.jar:
$OOI/htmlsoff.jar:$OOI/classes/java_uno.jar:$OOI/java_uno_accessbridge.jar:$OOI/juh.jar:$OOI/jurt.jar:
$OOI/jut.jar:$OOI/officebean.jar:$OOI/report.jar:$OOI/ridl.jar:$OOI/sandbox.jar:$OOI/unoil.jar:
$OOI/xFlatXml.jar:$OOI/xmerge.jar:$OOI/XMergeBridge.jar:$OOI/XSLTFilter.jar:$OOI/XSLTValidate.jar:
$OOI/xt.jar:$OOI/servlet.jar:$OOI/cos.jar:.
export CATALINA_HOME=/software/instaladores/jakarta-tomcat-4.1.30
start (){
i=0
ilimit=10
while [ $i -lt $ilimit ] && [ ! -f /var/run/sofficed.pid ] ; do
sleep 1
i=$((i+1))
done;
if [ $i -lt $ilimit ]; then
$CATALINA_HOME/bin/startup.sh
else
echo "Could not start: sofficed not running";
f
}
stop (){
$CATALINA_HOME/bin/shutdown.sh
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "usage: $1 start|stop|restart"
;;
esac
if [ $? == 0 ]; then
echo .
# exit 0
else
echo failed
# exit 1
fi
cd /etc/rc2.d
ln -s ../init.d/tomcat S40tomcat
La ejecución del sistema ORFEO necesita que scripts adicionales y servlets sean
adaptados (o compilados) a las necesidades de cada institución.
#/usr/bin/bash
if [ -f /home/docgen/servlets/dead ]; then
/etc/init.d/sofficed stop
/etc/init.d/sofficed start
/etc/init.d/tomcat restart
rm -f /home/docgen/servlets/dead
/bin/date >> /home/docgen/scripts/autorestart.log
/home/docgen/scripts/reboot.sh
else
echo "No problem, heee he"
fi
Además hay que crear 2 tareas o entradas en el cron. El editor del cron se lanza al
ejecutar el comando crontab –e y adicionando las siguientes 2 líneas:
cd /home/docgen
tar –zxvf servlets.tar.gz
cd servlets/WEB-INF/classes
javac WorkDistributor.java
En este lugar iremos colocando las correcciones que se le hagan a este instructivo.
6. GLOSARIO.
$HOME: Variable de ambiente. Contiene la ruta del directorio por defecto del
usuario de la sesión actual.