Hi Joseph,

On 24 Jun 2014, at 8:28 am, Joseph Wilkicki <[email protected]> wrote:

> Hi!
> 
> I'm trying to install Archiva 2.0.1 standalone on RHEL6 using the
> instructions here:
> http://archiva.apache.org/docs/2.0.1/adminguide/standalone.html

It does seem that these are omitting some detail when doing it as a service. 
Because it switches user without running any login shell, the profile scripts 
are not picked up.

You should add the export command for ARCHIVA_BASE into /etc/init.d/archiva, or 
edit wrapper.conf (see below).

I'll file a bug that this should either be documented or included in the 
default scripts.

> 
> I'm trying to separate the base install from the configuration, as
> indicated in the instructions.  I've put the distribution into
> /opt/apache-archiva-2.0.1 and symlinked it to /opt/archiva.  I symlinked
> /opt/archiva/bin/archiva to /etc/init.d/archiva and run chkconfig add and
> chkconfig on.  I've put in /etc/profile.d/archiva.sh: export
> ARCHIVA_BASE=/var/archiva and made sure the variable is set in my shell.
> I've  created the directories indicated in the instructions.  I've made
> sure there is an archiva user and changed the startup script RUN_AS_USER to
> archiva.
> 
>   The startup script won't start the app.  I made sure
> /var/subsys/local/archiva exists and is writable by that user.  I've
> changed /opt/archiva/conf/wrapper.conf set.default.ARCHIVA_BASE=/var/archiva

Setting this variable should have worked (I just tried locally). If you're 
happy with that, you might need to make sure all the wrapper scripts had 
stopped first.

If you see -Dappserver.base=/var/archiva in the 'ps' command, then it has been 
picked up, and should be logging to the correct logs directory.

> 
> 
> As far as I can tell, the documentation is just wrong about ARCHIVA_BASE
> but I don't see any other way of doing this.  I've tried searching the
> mailing list as well and I can't seem to find anything relevant to 2.0.1.
> Can anyone help here?
> 
> I also tried just installing 2.0.1 with the Puppet rules, but apparently
> it just can't setup Archiva 2.0.1.

Not sure what you meant by puppet rules, but this alternative will also give 
you a completely working Archiva install on a clean RHEL installation (after 
Puppet is installed):

sudo yum install -y java-1.7.0-openjdk
sudo puppet module install maestrodev/archiva
sudo puppet apply -e 'class { archiva: version => "2.0.1" }'

This particular alternative installs to /usr/local/archiva and 
/var/local/archiva, altering the init.d script as I described at the beginning.

> It runs but the DefaultUserService has
> a combination of errors doing basic things like getting the admin user
> created or setting up Redback for LDAP, so I'm falling back to manual
> instructions.

That sounds like it might have created an incorrect security.properties. Try 
removing that file and restarting the service and see if that helps.

Regards,
Brett

Reply via email to