ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "G.W. Haywood" <of...@jubileegroup.co.uk>
Subject Re: Starting OfBiz at boot
Date Thu, 05 May 2016 07:44:13 GMT
Hi there,

On Wed, 4 May 2016, Craig Parker wrote:

> ... /var/log/boot.log tells me:
> Starting OFBiz: failure
> Only users root or root should start/stop the application

To begin with you need to learn a little about Linux permissions
and what effects they have.  I honestly don't think you've enough
experience to be writing shell scripts to start things like Ofbiz
just yet.

The distribution packaging will make all sorts of choices which may
not necessarily be right for your situation at present and I would
recommend that you don't try to start Ofbiz automatically at boot
until you're more familiar with your system.  There are as you have
seen scripts to start it in the Ofbiz directory and its 'tools/'
sub-directory which you can run from the command line.  When I'm
working on Ofbiz testing I set one 'xterm' aside to start Ofbiz,
scroll a log, and stop it (with CTRL-C) when I can't take any more.  I
use a slightly modified ./tools/startofbiz.sh to start it, but you
could do what's suggested in the Ofbiz README ('./ant start') instead.
If you use the startofbiz.sh script, the shutdown is more graceful on
exit with CTRL-C.

It's only necessary to run Ofbiz as a privileged user (root in this
case) if you have decided to have Ofbiz listening on a port number
which is less than 1024.  Webservers (and Ofbiz has a Web interface,
so that includes Ofbiz) usually listen on port 80.  For any process
to listen to port 80, a privileged user needs to start that process.

While I'm working on testing, I use the default higher-number ports
(8080 for Ofbiz itself and 8443 for the admin interface, instead of 80
and 443), and I don't run it as root.  You can even have more than one
Ofbiz running, if they listen on different ports (and most likely use
different databases) , so you could run a production Ofbiz on port 80
and a development Ofbiz on port 8080.  Don't do it. :)

If your ofbiz directory is owned and read/write only for root (just
because that's how you installed it, perhaps if you installed it from
a distribution package) then I'd suggest for testing that you don't
use that installation at all, and run one as the non-privileged user.
You could start again using one of the tarballs provided on the Ofbiz
Website.  It's an easy installation to do, although it takes a lot of
CPU cycles.  If you run the install as a normal unprivileged user
you'll have what you need all set up for you.  You've probably found
that all you need is a single directory (for example something like
/home/user/ofbiz/) to unpack everything, Ofbiz will run happily in
there almost completely self-contained without any need for putting
things elsewhere in the system.  You will of course need the support
of a few system libraries and Java, but you have those already.

73,
Ged.

Mime
View raw message