Separate Archiva configuration and installation directories - configuration

The Archiva documentation states:
The standalone installation of Archiva is capable of separating its configuration from installation
However, I didn't manage to do so with 1.3.6 and 1.4 (using Ubuntu 12.04).
$ARCHIVA_BASE is set to /var/archiva and exported, but the wrapper doesn't seem to take care of that and always launches in the installation directory.
Moreover, the 1.4 init script (bin/archiva) uses $BASEDIR instead of $ARCHIVA_BASE
Does someone have a clue?

Post is old but I faced this problem recently and wanted to share what worked for me to make Archiva 2.2.3 execute as a service on RHEL 6.8
Archiva installed at /opt/archiva
Archiva data directory created at /var/archiva_data using these instructions
Edited /opt/archiva/conf/wrapper.conf and made the following change
set.default.ARCHIVA_BASE=/var/archiva_data
Edited /opt/archiva/bin/archiva and made the following change
RUN_AS_USER=foo
Linked /etc/init.d/archiva with /opt/archiva/bin/archiva
Start service using service archiva start

How I do personally.
My archiva app installed in /x1/archiva/archiva with
archiva -> /x1/archiva/apache-archiva-1.4-M4-SNAPSHOT
And all datas archiva.xml in /x1/archiva/archiva-base
archiva start script is modified with:
BASEDIR=/x1/archiva/archiva/bin
BASEDIR_CONF="/x1/archiva/archiva-base"
WRAPPER_CONF="$BASEDIR_CONF/conf/wrapper.conf"
PIDDIR="$BASEDIR_CONF/logs"
And it works fine as it :-)

This post might be a little old, I'd nonetheless like to share my experience using Archiva 2.2.1. Seperating the base from the installation directory by simply setting $ARCHIVA_BASE (as described on http://archiva.apache.org/docs/1.4-M4/adminguide/standalone.html) still doesn't work. I did the following to get Archiva up and running:
My setup
Archiva binaries and installation files in /opt/archiva/current
(current being a symlink pointing to apache-archiva-2.2.1)
Directories conf/ data/ logs/ temp/ moved to /data/archiva_data
Adjustments in Archiva config files
File /opt/archiva/current/bin:
BASEDIR_CONFIG="/data/archiva_data"
WRAPPER_CONF="$BASEDIR_CONFIG/conf/wrapper.conf"
PIDDIR="$BASEDIR_CONFIG/logs"
Wrapper config File /data/archiva_data/conf/wrapper.conf:
#Manually set the Archiva Basedir
set.default.ARCHIVA_BASE=/data/archiva_data
So the steps pointed out by olamy did work, however a further adjustment was needed in the wrapper config file to reflect the configuration being moved away from the installation directory.
After the changes, I was able to start and use Archiva.

1 remember to use cp when you copy configuration files from original conf folder to your folder.
2 if you're trying to run archiva as service you need to modify wrapper.conf at line 14 with added your ARCHIVA_BASE folder.

Related

How to set where to download the VM in minishift?

It downloads openshift into C:\Users\[user]\.minishift\machines folder. How to change this location to, say, D:\My VMs\? The config set is not very helpful in explaining setting which config for which.
Minishift verision: v1.15.1
Platform: Windows
Driver: Hyper-V
Any help would be greatly appreciated.
It looks like the machines directory can't be set directly through config. It is set relative to a base directory in instance_dirs.go.
That base directory, by default, is the .minishift directory in the home directory of the user, e.g. C:\Users\[user]\.minishift on Windows, but this can be overridden by setting the environment variable MINISHIFT_HOME.
The base directory could also be a profile directory, if you are not using the default profile (the default being minishift).
$ minishift profile list
- minishift Stopped
$ minishift profile myprofile
Profile 'myprofile' set as active profile.
The machines directory for myprofile would then be created under $MINISHIFT_HOME/profiles/myprofile/machines, e.g. on Windows C:\Users\[user]\.minishift\profiles\myprofile\machines.
So you can set MINISHIFT_HOME and move the whole contents of the .minishift directory, including machines, somewhere else but it doesn't look like you can move just machines alone.
Perhaps, you could solve this at the OS-level by creating a symlink between C:\Users\[user]\.minishift\machines and D:\My VMs\.
In case it helps others and so they don't need to test the different ways of using symlink as well as to expand on #codemonkey great answer this is what I did to use symlink as my C drive had no available space. I'm also using hyper-v as the driver.
Note: I do have minishift.exe installed in the apps folder on my D drive
Note 2: I did have to run the command prompt in admin mode
From the C:\Users\[user]\.minishift folder I moved the "machines" folder to D:\Apps\minishift-1.32.0-windows-amd64\
I first tried a soft link which didn't work, I then tried a hadr link, but I was getting errors so I used a "directory junction" link with the /J switch as such C:\WINDOWS\system32>mklink /J C:\Users\[user]\.minishift\machines D:\Apps\minishift-1.32.0-windows-amd64\machines
You should get the following result Junction created for C:\Users\[user]\.minishift\machines <<===>> D:\Apps\minishift-1.32.0-windows-amd64\machines
Then if necessary run minishift delete --clear-cache WARNING this will delete any previous images and hosts you might have!
Then start minishift as normal with minishift start
Grab a cup of coffee or go smoke a cigarette or vape as it will take awhile for the OpenShift server to be started.
Hope this answer might help others who face a similar issue.

Enable LDAP on Xampp Windows

I want to enable LDAP module on my XAMPP Windows 10, here's the few solutions that I've tried :
Copy dll files to System and System32 and uncomment extension=php_ldap.dll in php.ini, both development and production.
Copy libsasl.dll to xampp/apache/bin
None of these working, when I opened phpinfo() there is no ldap info showing, which means the ldap hasn't been able to installed. I also added PHP in Windows Path with no success, but either my approach is wrong or that wasn't a solution. Any help appreciated.
Make sure the path\to\xampp\php directory has the following files
libeay32.dll
libsasl.dll
ssleay32.dll
Usually, you can find these files in path\to\xampp\sendmail - this library also uses them. But if not, try to search for them inside the xampp directory.
Uncomment or add the ldap extension in the php.ini (path\to\xampp\php\php.ini) file
extension=ldap
Restart the server
Make sure the path\to\xampp\php directory is set in the system environment variable PATH. To know how to do it, see this post.
I just ran into the same issue and the link you provided How to enable LDAP extension in XAMPP environment ended up being the solution for me.
I copied libeay32.dll and ssleay32.dll from C:/Ampps/php to C:/Windows/System32. I made sure neither of these files were in C:/Windows/System. From there I enabled extension=php_ldap.dll in the php.ini file. Ampps has a list you can enable php.ini dll's and if I remember right so does XAMPP. The last step is to just restart Apache and you should be good to go.
I'm using Windows 10 with Ampps instead of XAMPP but have to think they are pretty close.

windows could not start the MySQL. service on local computer. Error 2 : The system cannot find the file specified

I am not able to start the MySQL server on my Windows system. When I tried in services.msc to run, I got this error:
Starting it through the XAMPP control panel does not work either:
Can you help me to solve this?
Open windows services (Start->run ->Services.MSC)
Find service with name "Mysql Server" and check path, it should be something like that:
"C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL51\bin\mysqld.exe" "--defaults-file=C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\Data\my.ini" MySQL
Make sure that Mysql folder and executable file mentioned above exist by this path.
OR
Sometimes the file name of mysqld-nt.exe renamed to mysqld-nt.exe~ so rename it back to its original name and this may solve the problem.
Go to the path: C:Programs Files\MariaDB 10.2\data..
Lookout for my.ini file. Open the file and check the path for "datadir".
If that does not match to your installed directory then update it.
Your problem will be solved for sure.
I faced the same problem and solved it.
Just modify the registry editor value.
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MySQL/ImagePath

Supervisord on Fedora configuration error

I am trying to install supervisor on my Fedora 17, using this link as reference:
https://www.digitalocean.com/community/articles/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
It works fine except one trivial problem (I believe).
A simple configuration for our script, saved at /etc/supervisor/conf.d/long_script.conf, would look like so (...)
My problem is, that I have only files/directories:
/etc/supervisord/
/etc/supervisord.conf
I have tried to create conf.d directory under /etc/supervisord/. I have put my config file into /etc/supervisord/conf.d/ and /etc/supervisord/ and also /etc/sueprvisor/.
Despite my effort when issuing command:
supervisortctl reread
I receive:
No config updates to processes
Anyone has a clue what I might be doing wrong? Thanks in advance.
(I'm on Fedora 20) If you look at /etc/supervisord.conf at the bottom you see
[include]
files = supervisord.d/*.ini
So on Fedora your configuration files should end in .ini instead of .conf. I had this same problem and running supervisorctl reread after this detects stuff
There is no need to create a folder specifically for your configuration file, you can specify its path with the -c /path/to/your/file or --configuration=/path/to/your/file option.
Source: http://supervisord.org/running.html

How to install ioncube Loader on openshift

I'm having a problem activating ioncube on openshift.
The loader-wizard tells me to do the following steps:
1) Download one of the following archives of Loaders for Linux x86-64: zip tar.gz tar.bz2 etc.
2)Transfer the Loaders to your web server and install in /usr/lib64/php/modules
3) Put this: "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so " in your ini files directory, /etc/php.d
4)Restart the Apache server software. When the server software has restarted, click here to test the Loader. If the Loader installation failed, check the Apache error log file for errors and see our guide to Unix related errors.
But I can't transfer the loader in /usr/lib64/php/modules, because I don't have permissions.
I tried to put the loader somewhere else and edit the new php ini located at ~/php/versions/shared/configuration/etc/php.ini I added there the the path to the loader, restarted the app, but still does not work.
I also posted this question on openshift.com forums, but didn't get any answers at the moment.
Any suggestions will be very appreciated.
Thank you.
Success in Loader installation will ultimately depend on the server and PHP configuration.
ionCube have recently released a Windows based installer that can automatically deploy the required Loader locally or to a remote server over FTP or SFTP, and also make configuration file changes. I suggest trying that. The download is at http://ioncu.be/LI
(disclosure: I am associated with ionCube)