How to Install Artifactory as a Service on Solaris 11

How to Install Artifactory as a Service on Solaris 11

AuthorFullName__c
JFrog Support
articleNumber
000002812
ft:sourceType
Salesforce
FirstPublishedDate
2016-11-21T15:16:04Z
lastModifiedDate
2023-01-22T11:07:40Z
VersionNumber
5

The installService shell script that ships with Artifactory was designed to work with Linux. However, it uses a few utilities that work slightly differently under Solaris. The install and service scripts require small modifications before being run under Solaris 11. The installService script can be found in $ARTIFACTORY_HOME/bin/installService.sh, while the service script will be created at /etc/init.d/artifactory. You’ll need GNU sed (gsed) to run these scripts. If your Solaris installation didn't ship with gsed, you can install it by following the instructions available HERE.
 

1. Replace the sed with the gsed in the installService.sh script.

$ cd $ARTIFACTORY_HOME/bin
$ cp installService.sh installService.sh.bak
$ gsed --in-place -e "s,sed,gsed,g;" installService.sh

2. Run the install script.

$ sudo ./installService.sh


3. Edit the Artifactory service script in /etc/init.d ($ sudo vim /etc/init.d/artifactory) and make the following three changes:

  a. Change line 55 to the following, which will allow it to use Solaris' netstat:

SHUTDOWN_PORT=`netstat -aun -P tcp | grep $CATALINA_MGNT_PORT | wc -l`

   b. Change line 97 to the following, which will allow you to use su without -l:

su $ARTIFACTORY_USER -c "export JAVA_HOME='$JAVA_HOME'; $TOMCAT_HOME/bin/startup.sh"

  c. Make the same change on line 127 (i.e., remove -l)

su $ARTIFACTORY_USER -c "export JAVA_HOME='$JAVA_HOME'; $TOMCAT_HOME/bin/shutdown.sh"

You should now be able to start and stop Artifactory by calling the service:

sudo /etc/init.d/artifactory (start|stop)