Installing PacsOne 6.1.2 on openSUSE 11.0/64

Trouble during PacsOne Server installations
Post Reply
werda
Posts:6
Joined:Wed Nov 19, 2008 8:02 am
Installing PacsOne 6.1.2 on openSUSE 11.0/64

Post by werda » Tue Jan 13, 2009 12:10 pm

I am in the process of installing on a virgin machine. I had tried this previously but ran into problems. This time I try it at glacier pace, jotting down what seems noteworthy on every step.

At this point MySql, Apache and PHP are installed.
MySql can create and drop a table.
Apache can display a test page from /srv/htdocs.

Here is my feedback so far:


1) Create installation directory /opt/pacsone (as root)

mkdir /opt/pacsone
chmod 644 /opt/pacsone
cp pacsone-5.1.1-Darwin-i686.tar.gz /opt/pacsone
cd /opt/pacsone


2) Untar and prepare for installation

I check whether libtool is installed. The runtime library libltd7 is there but libtool is missing so I install it (version 2.2.6-1.35-x86_64).
Freetype is there (version 1 and 2).

tar xvfz pacsone-6.1.2-Linux-x86_64.tar.gz

The first little oops: Most files and folders have group 'daemon'.
I change that recursively to group 'root' with
chgrp -R root *

I edit install.sh removing -a on line 25


3) Installation

I type
./install.sh
The installation moves as expected. I copy the terminal i/o to a text file.


4) Post Installation

I type
ps -ef | grep PacsOne
PacsOne.exe is running, PacsOneSrv.exe is not.

I reboot. Now none of them is running so I type
/etc/init.d/pacsone start
ps -ef | grep PacsOne
root 4501 1 0 16:52 pts/0 00:00:00 /opt/pacsone/PacsOneSrv.exe --pidfile=/opt/pacsone/pacsone.pid
root 4503 4501 0 16:52 pts/0 00:00:01 PacsOne.exe PACS

Voila! They are both there. I can stop and start manually now.

In /etc/init.d/rc3.d/ and /etc/init.d/rc5.d/ there are 2 links each:
K01pacsone
S01pacsone

I rename the latter to S90pacsone in both directories.
Still no automatic start on reboot.


The Yast runlevel editor doesn't seem to like the pacsone runlevel script or the way it got into /etc/init.d.
I might have to read up on 'insserv'.

Has anyone been there/done that?

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Tue Jan 13, 2009 2:10 pm

Did you check if the host has actually reached run level 5 after reboot?

The scripts under /etc/init.d/rc5.d/ won't be started until the host has reached run level 5. Otherwise if run level 5 has been reached but the PacsOne Server startup script under the above directory was not started, then you can try trouble-shooting by creating a dummy script under the same directory to simply log something, then reboot and check if that dummy script ever gets executed when the host reboots to run level 5.

werda
Posts:6
Joined:Wed Nov 19, 2008 8:02 am

Post by werda » Wed Jan 14, 2009 8:11 am

Meanwhile I found out the problem stems from the fact that SUSE is very much Linux Standard Base compliant. Therefore it needs extra bits of information about what other services are required in the runlevel script. It will rename the links based on the dependies given by all the scripts (think about parallel booting). This means just adding a link and giving it a Knn and Snn name will NOT work.

So I edited the runlevel script and added the LSB header as follows:

Code: Select all

#!/bin/sh
#
# Copyright 2004-2007 RainbowFish Software
# Xiaohui Li
#
# chkconfig: 35 99 00
# description: PacsOne Server
# 
### BEGIN INIT INFO
# Provides:          pacsone
# Required-Start:    $syslog $local_fs $remote_fs mysql
# Should-Start:      $syslog mysql
# Required-Stop:     $syslog $local_fs $remote_fs mysql
# Should-Stop:       $syslog mysql
# Default-Start:     3 5
# Default-Stop:      0 1 2 4 6
# Short-Description: PacsOne Server
# Description:       PacsOne Server
### END INIT INFO
# 

# PacsOne Server start/stop script.
This should also work for non-LSB Linux distributions as the LSB header is only a meaningless comment to them.

I removed the links to the script in /etc/init.d/rc3.d and /etc/init.d/rc5.d and then issued the command

chkconfig --add pacsone

which created appropriately named links in the rc3.d and rc5.d directories.
Service pacsone now starts and stops as expected.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Wed Jan 14, 2009 9:02 am

Thank you very much for sharing this information with the rest of the PacsOne Server users' community. We'll add this information to the Installation Guide for the next release of PacsOne Server.

werda
Posts:6
Joined:Wed Nov 19, 2008 8:02 am

Post by werda » Tue Jan 27, 2009 11:53 am

To make it possible to manage services with Yast the script also needs a status entry. I modified the end of the init.d script as follows:

Code: Select all

  'status')
    if test -f $pidfile
    then
        pid=`cat $pidfile`
        count=`$ps|grep PacsOne|grep $pid|wc -l`
        if test $count -gt 0
        then
            echo "PacsOne Server is running."
            exit 0
        else
            echo "PacsOne Server is stopped but pid file exists."
            exit 1
        fi
    else
        echo "PacsOne Server is stopped."
        exit 3
    fi
    ;;


  *)
    # usage
    echo "Usage: $0 start|stop|restart|status"
    exit 1
    ;;
esac
It works but not perfectly. When Yast-->System-->Runlevel Editor is started it sometimes gets the status wrong for reasons yet unknown.

But Yast can now manage the PacsOne server.
Caveat: I'm not sure what exit codes a non-LSB compliant distribution expects.

Post Reply