Te recordamos que esta Wiki está abierta a que, todos los usuarios, puedan editar artículos
Para ello debes estar registrado como usuario de Codex-Meteoclimatic
Solo tienes que enviar un email a meteoclimatic@meteoclimatic.com
indicando el nombre de usuario que quieres usar
Para ello debes estar registrado como usuario de Codex-Meteoclimatic
indicando el nombre de usuario que quieres usar
Diferencia entre revisiones de «Instalación de Wview»
(→Instalando paquetes necesarios) |
(→Descarga de Radlib) |
||
Línea 40: | Línea 40: | ||
Descargamos radlib<br /> | Descargamos radlib<br /> | ||
+ | |||
+ | * wget http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz | ||
pi@raspberrypi ~ $ wget http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz | pi@raspberrypi ~ $ wget http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz | ||
− | |||
--2014-08-24 11:46:01-- http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz | --2014-08-24 11:46:01-- http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz | ||
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59 | Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59 | ||
Línea 65: | Línea 66: | ||
pi@raspberrypi ~ $ | pi@raspberrypi ~ $ | ||
<br /> | <br /> | ||
− | + | Descomprimimos radlib | |
+ | * tar zxvf radlib-2.12.0.tar.gz | ||
<br /> | <br /> | ||
− | + | ||
pi@raspberrypi ~ $ tar zxvf radlib-2.12.0.tar.gz | pi@raspberrypi ~ $ tar zxvf radlib-2.12.0.tar.gz | ||
− | |||
radlib-2.12.0/ | radlib-2.12.0/ | ||
radlib-2.12.0/src/ | radlib-2.12.0/src/ |
Revisión de 09:53 2 nov 2014
Todas las instrucciones para la instalación de Wview se refieren a la versión 5.21.7
Se hace la advertencia de que puede haber diferencias entre unas versiones u otras. Diferencias que pueden ocasionar el mal funcionamiento del programa.
Estas instrucciones son válidas para la mayoría de los sistemas Linux. En los ejemplos se ha utilizado un sistema basado en Debian. Es posible que para sistemas Ubuntu u otros sistemas pueda haber diferencias en el proceso.
Contenido
Método corto o sin compilación
Método largo. Compilando los fuentes
Instalando paquetes necesarios
Instalamos paquetes de software que serán necesarios para Wview
Ejecutamos:
- sudo apt-get install --yes build-essential zlib1g-dev libpng12-dev libreadline-dev gawk libsqlite3-dev sqlite3 libgd2-xpm libgd2-xpm-dev libssl-dev libcurl4-openssl-dev libusb-1.0-0 libusb-1.0-0-dev apache2 php5 php5-sqlite libapache2-mod-php5 ntp tnftp wget libudev-dev
pi@raspberrypi ~ $ sudo apt-get install --yes build-essential zlib1g-dev libpng12-dev libreadline-dev gawk libsqlite3-dev sqlite3 libgd2-xpm libgd2-xpm-dev libssl-dev libcurl4-openssl-dev libusb-1.0-0 libusb-1.0-0-dev apache2 php5 php5-sqlite libapache2-mod-php5 ntp tnftp wget libudev-dev … … … Setting up tnftp (20100108-3) ... update-alternatives: using /usr/bin/tnftp to provide /usr/bin/ftp (ftp) in auto mode Processing triggers for libapache2-mod-php5 ... [....] Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName . ok pi@raspberrypi ~ $
Instalando Radlib
Descarga de Radlib
Descargamos radlib
pi@raspberrypi ~ $ wget http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz --2014-08-24 11:46:01-- http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59 Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://downloads.sourceforge.net/project/radlib/radlib/radlib-2.12.0/radlib-2.12.0.tar.gz [following] --2014-08-24 11:46:02-- http://downloads.sourceforge.net/project/radlib/radlib/radlib-2.12.0/radlib-2.12.0.tar.gz Reusing existing connection to downloads.sourceforge.net:80. HTTP request sent, awaiting response... 302 Found Location: http://kent.dl.sourceforge.net/project/radlib/radlib/radlib-2.12.0/radlib-2.12.0.tar.gz [following] --2014-08-24 11:46:02-- http://kent.dl.sourceforge.net/project/radlib/radlib/radlib-2.12.0/radlib-2.12.0.tar.gz Resolving kent.dl.sourceforge.net (kent.dl.sourceforge.net)... 212.219.56.185 Connecting to kent.dl.sourceforge.net (kent.dl.sourceforge.net)|212.219.56.185|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 521798 (510K) [application/x-gzip] Saving to: `radlib-2.12.0.tar.gz' 100%[============================================================================>] 521,798 472K/s in 1.1s 2014-08-24 11:46:03 (472 KB/s) - `radlib-2.12.0.tar.gz' saved [521798/521798] pi@raspberrypi ~ $
Descomprimimos radlib
- tar zxvf radlib-2.12.0.tar.gz
pi@raspberrypi ~ $ tar zxvf radlib-2.12.0.tar.gz radlib-2.12.0/ radlib-2.12.0/src/ radlib-2.12.0/src/radlist.c radlib-2.12.0/src/radsysutils.c … … … radlib-2.12.0/database/postgresql/_pg-types.h radlib-2.12.0/database/postgresql/pg_database.c radlib-2.12.0/install-sh pi@raspberrypi ~ $
Compilando Radlib
Entramos en el directorio de los fuents de radlib
pi@raspberrypi ~ $ cd radlib-2.12.0 pi@raspberrypi ~/radlib-2.12.0 $
Configuramos radlib para su posterior compilación
pi@raspberrypi ~/radlib-2.12.0 $ ./configure --enable-sqlite --prefix=/ --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p … … … config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands pi@raspberrypi ~/radlib-2.12.0 $
Compilamos radlib
pi@raspberrypi ~/radlib-2.12.0 $ sudo make install Making install in src make[1]: Entering directory `/home/pi/radlib-2.12.0/src' make[2]: Entering directory `/home/pi/radlib-2.12.0/src' … … … libtool: install: /usr/bin/install -c .libs/raddebug /usr/bin/raddebug make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/pi/radlib-2.12.0/debug' make[1]: Leaving directory `/home/pi/radlib-2.12.0/debug' make[1]: Entering directory `/home/pi/radlib-2.12.0' make[2]: Entering directory `/home/pi/radlib-2.12.0' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/pi/radlib-2.12.0' make[1]: Leaving directory `/home/pi/radlib-2.12.0' pi@raspberrypi ~/radlib-2.12.0 $
Volvemos al directorio inicial
pi@raspberrypi ~/radlib-2.12.0 $ cd ..
Descarga y compilación de Wview
Descarga de Wview
Descargamos Wview 5.21.7
pi@raspberrypi ~ $ wget http://downloads.sourceforge.net/wview/wview-5.21.7.tar.gz --2014-08-24 15:15:21-- http://downloads.sourceforge.net/wview/wview-5.21.7.tar.gz Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59 Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://downloads.sourceforge.net/project/wview/wview/wview-5.21.7/wview-5.21.7.tar.gz [following] --2014-08-24 15:15:21-- http://downloads.sourceforge.net/project/wview/wview/wview-5.21.7/wview-5.21.7.tar.gz Reusing existing connection to downloads.sourceforge.net:80. HTTP request sent, awaiting response... 302 Found Location: http://softlayer-ams.dl.sourceforge.net/project/wview/wview/wview-5.21.7/wview-5.21.7.tar.gz [following] --2014-08-24 15:15:22-- http://softlayer-ams.dl.sourceforge.net/project/wview/wview/wview-5.21.7/wview-5.21.7.tar.gz Resolving softlayer-ams.dl.sourceforge.net (softlayer-ams.dl.sourceforge.net)... 37.58.69.140 Connecting to softlayer-ams.dl.sourceforge.net (softlayer-ams.dl.sourceforge.net)|37.58.69.140|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1438975 (1.4M) [application/x-gzip] Saving to: `wview-5.21.7.tar.gz' 100%[============================================================================>] 1,438,975 93.2K/s in 14s 2014-08-24 15:15:36 (99.0 KB/s) - `wview-5.21.7.tar.gz' saved [1438975/1438975] pi@raspberrypi ~ $
Compilación de Wview
Descomprimimos Wview 5.21.7
pi@raspberrypi ~ $ tar zxvf wview-5.21.7.tar.gz wview-5.21.7/ wview-5.21.7/config.sub wview-5.21.7/wview-User-Manual.html wview-5.21.7/wview-Quick-Start-MacOSX.html … … … wview-5.21.7/http/Makefile.am wview-5.21.7/http/Makefile.in wview-5.21.7/http/http.c pi@raspberrypi ~ $
Entramos en el directorio de wview
pi@raspberrypi ~ $ cd wview-5.21.7 pi@raspberrypi ~/wview-5.21.7 $
Configuramos Wview para su compilación
pi@raspberrypi ~/wview-5.21.7 $ ./configure --prefix=/ --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p … … … config.status: creating utilities/hilowcreate/Makefile config.status: creating config.h config.status: executing depfiles commands pi@raspberrypi ~/wview-5.21.7 $
Compilamos Wview 5.21.7
pi@raspberrypi ~/wview-5.21.7 $ sudo make install Making install in stations make[1]: Entering directory `/home/pi/wview-5.21.7/stations' Making install in Simulator … … … Y mucho tiempo después … … … make[3]: Entering directory `/home/pi/wview-5.21.7' ==> /var/lib/wview has been created with distro examples ==> /etc/wview has been created with distro examples This is a first time install so the station type will be set to "simulator". To change the station type, run "wviewconfig" or use the wviewmgmt web interface to change it. You will need to stop wview and clear the databases of simulator data after you have changed the station type: #> wviewcleardata This is a first time install so the generation templates will be set to "chrome-standard-US units". To change this run "wviewhtmlconfig" to configure the template directory after you have configured wview for metric units and/or extended data. If you want start/stop control of wview from the Management Web Site (and you are comfortable giving the http server user account sudo privileges): Add the http user to the sudo group: #> sudo adduser www-data sudo Set the sudo group to no password required privileges in /etc/sudoers: #> sudo visudo (Make sure the line [%sudo ALL=NOPASSWD: ALL] is at the bottom of the /etc/sudoers file) To start/stop wview: #> sudo /etc/init.d/wview start|stop make[3]: Leaving directory `/home/pi/wview-5.21.7' make[2]: Leaving directory `/home/pi/wview-5.21.7' make[1]: Leaving directory `/home/pi/wview-5.21.7' pi@raspberrypi ~/wview-5.21.7 $
Pasos finales
Ya hemos terminado de Wview, terminamos haciendo unos retoques para facilitarnos la vida.
Volvemos al directorio /home/pi
pi@raspberrypi ~/wview-5.21.7 $ cd .. pi@raspberrypi ~ $
Descargamos el "arrancador" del servidor
pi@raspberrypi ~ $ sudo wget https://dl.dropbox.com/u/2427470/raspberry/wview/wview.sh -O /etc/init.d/wview ... ... ... Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 23.21.53.200, 23.23.154.114, 23.21.212.69, ... Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|23.21.53.200|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 5106 (5.0K) [text/x-sh] Saving to: `/etc/init.d/wview' 100%[============================================================================>] 5,106 --.-K/s in 0.001s 2014-08-24 15:47:44 (7.10 MB/s) - `/etc/init.d/wview' saved [5106/5106] pi@raspberrypi ~ $
Damos permiso de ejecución, modificamos para que se arranque cuando iniciemos la raspi, creamos los enlaces simbólicos de las páginas web para poder verlos en el navegador
pi@raspberrypi ~ $ sudo chmod +x /etc/init.d/wview pi@raspberrypi ~ $ sudo update-rc.d wview defaults 99 update-rc.d: using dependency based boot sequencing pi@raspberrypi ~ $ sudo ln -s /var/lib/wview/img/ /var/www/weather pi@raspberrypi ~ $ sudo ln -s /var/lib/wviewmgmt/ /var/www/wviewmgmt
Antes de seguir, modificamos /etc/init.d/wview:
pi@raspberrypi ~ $ sudo nano /etc/init.d/wview
Buscar este texto:
case "$1" in start) wait_for_time_set echo "Starting wview daemons:" if [ -x $RADROUTER_BIN ]; then start-stop-daemon --start --oknodo --pidfile $RADROUTER_PID \ --chuid $WVIEW_USER --exec $RADROUTER_BIN 1 $RUN_DIRECTORY Y añadimos dos lineas....las que están en azul: case "$1" in start) wait_for_time_set echo "Borrando los ficheros .pid antiguos" rm -f /var/lib/wview/*.pid echo "Starting wview daemons:" if [ -x $RADROUTER_BIN ]; then start-stop-daemon --start --oknodo --pidfile $RADROUTER_PID \ --chuid $WVIEW_USER --exec $RADROUTER_BIN 1 $RUN_DIRECTORY
Salimos grabando los cambios. Para ello, pulsamos CTRL-X y cuando nos pregunte si queremos grabar le decimos que si, y posteriormente ratificamos el nombre del fichero a grabar, pulsando enter.
Con un navegador abrimos la siguiente dirección: http://192.168.0.210/wviewmgmt/login.php
Por supuesto que cambiamos 192.168.0.210 por la dirección que tenga vuestra Raspberry Pi.
La password es “wview”
Una vez en el sistema nos vamos a la pestaña “File Generation” y modificamos los directorios:
Generation Target Path: /var/lib/wview/img
Template Source Path: /etc/wview/html
Vemos que el color rojo desaparece, por lo que se reconocen los directorios. Grabar los cambios desde el propio navegador.
Me gusta hacer lo siguiente....manías mías:
pi@raspberrypi ~ $ sudo /etc/init.d/wview start Borrando los ficheros .pid antiguos Starting wview daemons: pi@raspberrypi ~ $ sudo /etc/init.d/wview stop No /usr/bin/wvhttpd found running; none killed. No /usr/bin/wvcwopd found running; none killed. No /usr/bin/wvalarmd found running; none killed. No /usr/bin/wviewsshd found running; none killed. No /usr/bin/wviewftpd found running; none killed. pi@raspberrypi ~ $
Reiniciamos el ordenador. Posteriormente viene la tarea más dura, la configuración.
pi@raspberrypi ~ $ sudo reboot