问题
I'm trying to start the recently published Apache Archiva v2.1.0 (Standalone) on Linux.
For testing purpose, the zip has been uncompressed in /opt/archiva-2.0.
The docs says: http://archiva.apache.org/docs/2.1.0/adminguide/standalone.html
On Linux, the bin/archiva script is suitable for linking or copying to /etc/init.d/archiva and running as root, as long as the RUN_AS_USER environment variable is set within the script.
So I've copied the /opt/archiva-2.0/bin/archiva Shell script in /opt/init.d.
I tried with both:
#RUN_AS_USER=root
and
RUN_AS_USER=root
but I always get the same error at startup:
>service archiva console
/etc
Unable to locate any of the following operational binaries:
/etc/rc.d/init.d/./wrapper-linux-x86-64
/etc/rc.d/init.d/./wrapper-linux-x86-32
/etc/rc.d/init.d/./wrapper
For information:
>uname -a
Linux ****** 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Any idea?
回答1:
Making symbolic link of the bin/archiva script to /etc/init.d/archiva works better and that way the script is just in one place.
$ ln -s /opt/archiva-2.0/bin/archiva /etc/init.d/archiva
来源:https://stackoverflow.com/questions/25158880/unable-to-use-the-linux-service-to-start-archiva-2-1-0