I have a license for my splunk 4.2 installation, and I want to install it without using the web interface, how can I do this?
As a preamble, in 4.2+ you may be using (optional) a license master where license data is handled in a central location, which case local license management is irrelevant. This information is still useful in such an environment for the license master location.
Firstly, there is a command
windows:
Splunk\bin\splunk.exe add license <license.file>
unix:
splunk/bin/splunk add license <license.file>
This will install the license in the appropriate location, and is probably the tool you should use.
However if you have specific needs to pre-populate a splunk installation for mass rollout or other scenarios, you can manually add your license file to the directory
$SPLUNK_HOME/etc/licenses
There are directories under etc/license for each category of license, which are automatically managed by the web and command line license addition methods. It is intended that a license in the top level etc/licenses will be moved to the right location automatically, but I probably wouldn't rely on this functionality as an automated production workflow. A license placed in the correct subdirectory location (eg $SPLUNK_HOME/etc/licenses/enterprise/
) should work reliably.
As always, the license files present in the license directory are not as informative as asking splunk (via cli or manager) about the license it is actually using (files may be corrupt, splunk may not have been restarted. The command line to use is,
splunk list licenses
while in manager simply navigate to licenses.
As a preamble, in 4.2+ you may be using (optional) a license master where license data is handled in a central location, which case local license management is irrelevant. This information is still useful in such an environment for the license master location.
Firstly, there is a command
windows:
Splunk\bin\splunk.exe add license <license.file>
unix:
splunk/bin/splunk add license <license.file>
This will install the license in the appropriate location, and is probably the tool you should use.
However if you have specific needs to pre-populate a splunk installation for mass rollout or other scenarios, you can manually add your license file to the directory
$SPLUNK_HOME/etc/licenses
There are directories under etc/license for each category of license, which are automatically managed by the web and command line license addition methods. It is intended that a license in the top level etc/licenses will be moved to the right location automatically, but I probably wouldn't rely on this functionality as an automated production workflow. A license placed in the correct subdirectory location (eg $SPLUNK_HOME/etc/licenses/enterprise/
) should work reliably.
As always, the license files present in the license directory are not as informative as asking splunk (via cli or manager) about the license it is actually using (files may be corrupt, splunk may not have been restarted. The command line to use is,
splunk list licenses
while in manager simply navigate to licenses.