Run as a service

I am trying to run openfire as a service on Ubuntu 9.10, Karmic Koala.

I have installed openfire and it runs fine, I just need it to run as a service so I do not have to manually start it up everytime I reboot the machine it is on.

When I followed the instruction given in the install help file it lead me down a path of fail.

If someone could help me out with some step by step instructions your help would be grratly appreciated.

Thank you.

Please anyone?

I know people have looked at this thread, 114 when I wrote this. Any help would be appreciated.

Message was edited by: Dave

Hi Dave,

can you already start and stop Openfire with the /etc/rc.d/init.d/openfire or openfired script? Adding it to the runlevels shoudn’t be a big issue.

LG

No I can not, that is where I had problems, I manually start it and stop by command line currently.

Also please remember I am using Ubuntu and it uses something called Upstart to manage run levels.

In previous versions, Ubuntu used to the /etc/inittab file to manage runlevels, just like most of the Linux distributions. This file was based on traditional init daemon, which is used to perform system startup tasks. This was replaced in Ubuntu 6.10 (Release date: 26th-Oct-2006) with Upstart, an event based daemon. Now there are several files under the /etc/events.d/ directory.

The runlevels that Ubuntu handles by default are:

  • Runlevel 0 – Halt
  • Runlevel 1 – Multiuser text mode
  • Runlevel 2 – Graphical multiuser mode
  • Runlevel 6 – Reboot

Message was edited by: Dave

Hi Dave,

so how do you start it manually? Do you do a “su - jive” and then “/usr/local/openfire/bin/openfire start”?

LG

cd /opt/openfire/bin

./openfire start

Do you really run Openfire as root?

No I do not, I am logged on to my account, there is no root account in ubuntu that you can log on to, its all sudo. I set it up exactly like this document said to Quick Install but for linux and not windows.

Hi,

so you may have read http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install- guide.html#unix - did you use the rpm or the tar.gz file?

LG

I tried to use the tar.gz file. Ubuntu does not support rpm files.

Hi,

so you may have found the files in bin/extra which are also described in the documentation. `redhat-postinstall.sh´ could work also on Ubuntu. Or you could read Simple Start Scripts which describes how to create the rc scripts manually.

LG

I ran the ‘redhat-postinstall.sh’ script and received these errors.

xxxx@xxxx:/opt/openfire/bin/extra$ sh redhat-postinstall.sh
cp: cannot create regular file /etc/init.d/openfired': Permission denied redhat-postinstall.sh: 31: /sbin/chkconfig: not found redhat-postinstall.sh: 32: /sbin/chkconfig: not found groupadd: cannot lock /etc/group; try again later. useradd: group 'jive' does not exist /bin/chown: invalid user:jive:jive’

Also ran it under sudo and same errors

Hi,

running redhat-postinstall.sh as root should not return “cp: cannot create regular file `/etc/init.d/openfired’: Permission denied”. Anyhow I don’t have an Ubuntu installation, so I hope that an Ubuntu user can help you.

LG