wviewweather.com Forum Index wviewweather.com
wview and Weather Topics
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Notes on Debian 3.1 installation

 
Post new topic   Reply to topic    wviewweather.com Forum Index -> wview Installation
View previous topic :: View next topic  
Author Message
THogland



Joined: 26 Sep 2005
Posts: 33

PostPosted: Sat Oct 01, 2005 7:32 pm    Post subject: Notes on Debian 3.1 installation Reply with quote

The standard installation notes worked pretty well for me, but like most things Linux, there is the possibility that you'll need to use a moderate amount of common sense. So, here's how I made it all happen. Note that this was done on a 2.53Ghz Celeron server with 512MB of memory, and while there's no GUI running it does have a typical load of web components running – apache, postfix, procmail, etc. - and I had no conflicts with other software.

Prerequisites:
As listed:
libz(prepackaged)
libpng (prepackaged)
libgd (packaged as libgd2-xpm or libgd2-noxpm, pick one)
radlib (downloaded and installed)
libcurl (packaged as libcurl3)

Debian “extras”:
libgd-dev (dev libraries – packaged as libgd2-xpm-dev or libgd2-noxpm-dev, pick the one matching the above libgd)
libcurl-dev (dev libraries – packaged as libcurl3-dev)
lukemftp (prepackaged Debian version of tnftp – needed for FTP uploads)

Install all the packaged software first, then download and install radlib as directed – it depends on a couple of these packages. Once that is finished, install wview by following the directions – it should work fine, up to the “copy the startup script”. The docs don't mention it as of now, but new in 1.81 is a Debian script; if you are using an earlier one and for some reason don't want to download 1.81, or if for some odd reason the included script doesn't work, I'll be posting my script here. It uses Debian's start-stop-daemon command to control things, which isn't required (and isn't used by the included script), but it does work. Also, I commented out pieces I didn't intend to use – I don't use SSH, for example, so mine has the start for $SSHD_BIN commented out. This isn't strictly needed – if the .conf file is missing the daemon will exit with no ongoing problems – but it keeps the startup and log cleaner, and since I spent a lot of time tailing the message log while tweaking this I did it.

Finally, on my system (multi-user server, no GUI) I boot to runlevel 2, so link this to /etc/rc2.d:

fred:/mnt/wxdata# ln -s /etc/init.d/wview /etc/rc2.d/S95wview

(Adjust to match your system – check using the runlevel command.)

Any changes to config files don't seem to be reread until that particular daemon is restarted, which under Debian can be done this way (using FTP for example):

fred:/mnt/wxdata# start-stop-daemon --stop --exec /usr/local/bin/wviewftpd
fred:/mnt/wxdata# start-stop-daemon --start --exec /usr/local/bin/wviewftpd

If you need to restart wviewd, remember that everything depends on this, so don't try restarting it alone! Use

fred:/mnt/wxdata# /etc/init.d/wview stop
fred:/mnt/wxdata# /etc/init.d/wview start

Good luck!
Back to top
View user's profile Send private message
THogland



Joined: 26 Sep 2005
Posts: 33

PostPosted: Sat Oct 01, 2005 7:34 pm    Post subject: The /etc/init.d/wview script Reply with quote

While not needed as of 1.81, here it is (in the interest of completeness):

Code:

#!/bin/sh
#
# /etc/init.d/wview
#
# Start/Stop the wview daemons
#
# processnames: wviewd htmlgend wviewftpd wvalarmd wvcwopd wviewsshd
#

# set the base directory
#
RUN_DIRECTORY=/var/wview
WVIEW_INSTALL_DIR=/usr/local/bin

WVIEWD_BIN=$WVIEW_INSTALL_DIR/wviewd
HTMLD_BIN=$WVIEW_INSTALL_DIR/htmlgend
FTPD_BIN=$WVIEW_INSTALL_DIR/wviewftpd
SSHD_BIN=$WVIEW_INSTALL_DIR/wviewsshd
ALARMD_BIN=$WVIEW_INSTALL_DIR/wvalarmd
CWOPD_BIN=$WVIEW_INSTALL_DIR/wvcwopd
WUNDER_BIN=$WVIEW_INSTALL_DIR/wvwunderd

WVIEWD_PID=$RUN_DIRECTORY/wviewd.pid
HTMLD_PID=$RUN_DIRECTORY/htmlgend.pid
FTPD_PID=$RUN_DIRECTORY/wviewftpd.pid
SSHD_PID=$RUN_DIRECTORY/wviewsshd.pid
ALARMD_PID=$RUN_DIRECTORY/wvalarmd.pid
CWOPD_PID=$RUN_DIRECTORY/wvcwopd.pid
WUNDER_PID=$RUN_DIRECTORY/wvwunderd.pid

# main part
#
case "$1" in
    start)
   echo "Starting wview daemons:"
   start-stop-daemon --start --exec $WVIEWD_BIN
   sleep 3
   start-stop-daemon --start --exec $HTMLD_BIN
   start-stop-daemon --start --exec $ALARMD_BIN
   start-stop-daemon --start --exec $CWOPD_BIN
   start-stop-daemon --start --exec $WUNDER_BIN
   start-stop-daemon --start --exec $FTPD_BIN
   start-stop-daemon --start --exec $SSHD_BIN
    ;;
    stop)
   echo -n "Shutting down wview daemons"
   start-stop-daemon --stop --exec $WUNDER_BIN
   start-stop-daemon --stop --exec $CWOPD_BIN
   start-stop-daemon --stop --exec $ALARMD_BIN
   start-stop-daemon --stop --exec $SSHD_BIN
   start-stop-daemon --stop --exec $FTPD_BIN
   start-stop-daemon --stop --exec $HTMLD_BIN
   start-stop-daemon --stop --exec $WVIEWD_BIN
   rm -r $WUNDER_PID $CWOPD_PID $ALARMD_PID $SSHD_PID $FTPD_PID $HTMLD_PID $WVIEWD_PID
    ;;
    restart)
   $0 stop  && sleep 2
   $0 start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    wviewweather.com Forum Index -> wview Installation All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group