Preferred way to run BaseX as service on Debian
Thursday, 10 May 2012 · 5 messages · last reply 11 May 2012
MB
Manuel Bernhardt10 May 2012 15:22 #
Hi,
is there perhaps an init.d script somewhere already in order to launch basexserver as a service on Debian?
So far it looks as though there isn't one in the Debian package, so I'm thinking of adding a line to rc.local to run it on startup.
Also, from what I gathered, basex is now only available in sid, is that correct? I installed it on squeeze by downloading the deb, there's just one dependency on java-wrappers that I needed to install by hand.
Thanks,
Manuel
AH
Alexander Holupirek10 May 2012 15:47 #
Hi Manuel,
Quoted text · Manuel Bernhardt · 3 lines
On 10.05.2012, at 15:22, Manuel Bernhardt wrote: > is there perhaps an init.d script somewhere already in order to launch > basexserver as a service on Debian?
no, not yet, but good idea. I filed an issue for that [1]
Quoted text · Manuel Bernhardt · 2 lines
> So far it looks as though there isn't one in the Debian package, so > I'm thinking of adding a line to rc.local to run it on startup.
+1
Quoted text · Manuel Bernhardt · 4 lines
> Also, from what I gathered, basex is now only available in sid, is > that correct? I installed it on squeeze by downloading the deb, > there's just one dependency on java-wrappers that I needed to install > by hand.
the current version is available in sid and, since yesterday, in testing. right, java-wrappers are the only dependency. libtagsoup-java might be of interest if you want to process non-wellformed HTML.
providing the latest version as squeeze-backport is a good idea as well (filed another issue [2]
Thanks,
Alex
[1] https://github.com/BaseXdb/basex/issues/499
[2] https://github.com/BaseXdb/basex/issues/500
CG
Christian Grün10 May 2012 16:06 #
Hi Manuel,
thanks for your input; at times, there were some online references to init.d scripts for BaseX; maybe they could be of interest here?
http://blog.neolocus.com/2012/02/basex-xml-server-as-a-linux-service/ http://cubeb.blogspot.com/2011/07/basex_23.html
Christian
Quoted text · Alexander Holupirek · 36 lines
On Thu, May 10, 2012 at 3:47 PM, Alexander Holupirek <alex at holupirek.de> wrote: > Hi Manuel, > > On 10.05.2012, at 15:22, Manuel Bernhardt wrote: > >> is there perhaps an init.d script somewhere already in order to launch >> basexserver as a service on Debian? > > no, not yet, but good idea. I filed an issue for that [1] > >> So far it looks as though there isn't one in the Debian package, so >> I'm thinking of adding a line to rc.local to run it on startup. > > +1 > >> Also, from what I gathered, basex is now only available in sid, is >> that correct? I installed it on squeeze by downloading the deb, >> there's just one dependency on java-wrappers that I needed to install >> by hand. > > the current version is available in sid and, since yesterday, in testing. > right, java-wrappers are the only dependency. libtagsoup-java might be of interest > if you want to process non-wellformed HTML. > > providing the latest version as squeeze-backport is a good idea as well (filed > another issue [2] > > Thanks, > Alex > > [1] https://github.com/BaseXdb/basex/issues/499 > [2] https://github.com/BaseXdb/basex/issues/500 > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
MB
Manuel Bernhardt10 May 2012 16:33 #
Hi,
Thanks for the fast answers!
Yes, that init.d script looks like what I was looking for. If I understand correctly now, the data is going to be stored in the BaseXData directory of the user who launched the service?
Another thing that came to mind: is there perhaps a way by which basexserver could be bound only to the loopback address (or to some configured IP address)? I remember this being possible in e.g. mysql, and it is a quite nice way of securing the server (since someone could arguably try to brute-force access if knowing the port on the machine, or using the default port). Of course an alternative is to set-up a rule in iptables.
Also, I haven't quite found yet where the username and password are being configured - do I need to create a configuration file for this?
Some additional ideas for the Debian package:
- have it set-up a basex user, which is the default user running basex-server
- set the data directory for that server to be e.g. in /var/lib/basex, to be more in line with Debian's default behavior
Thanks,
Manuel
Quoted text · Christian Grün · 49 lines
On Thu, May 10, 2012 at 4:06 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Manuel, > > thanks for your input; at times, there were some online references to > init.d scripts for BaseX; maybe they could be of interest here? > > http://blog.neolocus.com/2012/02/basex-xml-server-as-a-linux-service/ > http://cubeb.blogspot.com/2011/07/basex_23.html > > Christian > ___________________________ > > On Thu, May 10, 2012 at 3:47 PM, Alexander Holupirek <alex at holupirek.de> wrote: >> Hi Manuel, >> >> On 10.05.2012, at 15:22, Manuel Bernhardt wrote: >> >>> is there perhaps an init.d script somewhere already in order to launch >>> basexserver as a service on Debian? >> >> no, not yet, but good idea. I filed an issue for that [1] >> >>> So far it looks as though there isn't one in the Debian package, so >>> I'm thinking of adding a line to rc.local to run it on startup. >> >> +1 >> >>> Also, from what I gathered, basex is now only available in sid, is >>> that correct? I installed it on squeeze by downloading the deb, >>> there's just one dependency on java-wrappers that I needed to install >>> by hand. >> >> the current version is available in sid and, since yesterday, in testing. >> right, java-wrappers are the only dependency. libtagsoup-java might be of interest >> if you want to process non-wellformed HTML. >> >> providing the latest version as squeeze-backport is a good idea as well (filed >> another issue [2] >> >> Thanks, >> Alex >> >> [1] https://github.com/BaseXdb/basex/issues/499 >> [2] https://github.com/BaseXdb/basex/issues/500 >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
PH
Manuel:
I wrote a while ago a note around deploying BaseX on an Amazon EC2 Linux instance. This includes a rudimentary init.d script.
See
https://docs.google.com/a/metadatatechnology.com/document/d/1uuqeL7n73MC6tAFQ_0kuH6V2p2vJB0OD4tyPWnBsu_A/edit This might be helpful to your Debian use case.
best
Pascal
Quoted text · Christian Grün · 50 lines
On 5/10/12 10:06 AM, Christian Grün wrote: > Hi Manuel, > > thanks for your input; at times, there were some online references to > init.d scripts for BaseX; maybe they could be of interest here? > > http://blog.neolocus.com/2012/02/basex-xml-server-as-a-linux-service/ > http://cubeb.blogspot.com/2011/07/basex_23.html > > Christian > ___________________________ > > On Thu, May 10, 2012 at 3:47 PM, Alexander Holupirek <alex at holupirek.de> wrote: >> Hi Manuel, >> >> On 10.05.2012, at 15:22, Manuel Bernhardt wrote: >> >>> is there perhaps an init.d script somewhere already in order to launch >>> basexserver as a service on Debian? >> no, not yet, but good idea. I filed an issue for that [1] >> >>> So far it looks as though there isn't one in the Debian package, so >>> I'm thinking of adding a line to rc.local to run it on startup. >> +1 >> >>> Also, from what I gathered, basex is now only available in sid, is >>> that correct? I installed it on squeeze by downloading the deb, >>> there's just one dependency on java-wrappers that I needed to install >>> by hand. >> the current version is available in sid and, since yesterday, in testing. >> right, java-wrappers are the only dependency. libtagsoup-java might be of interest >> if you want to process non-wellformed HTML. >> >> providing the latest version as squeeze-backport is a good idea as well (filed >> another issue [2] >> >> Thanks, >> Alex >> >> [1] https://github.com/BaseXdb/basex/issues/499 >> [2] https://github.com/BaseXdb/basex/issues/500 >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery