Install YouTrack JAR as a Service on macOS
Use the following setup to install and run YouTrack as a service on macOS.
Prerequisites
To perform this installation, verify that the following prerequisites are met:
You are using Java SE Development Kit 8 or later.
Any external hostname (proxy hostname) is resolvable from the actual host where YouTrack is installed.
Installation
The following procedure describes how to install and run YouTrack JAR as a service on macOS. The service is managed by the launchd
daemon/agent manager.
To install the YouTrack JAR distribution as a service on macOS:
Download the JAR distribution from the JetBrains website.
Create a user account to run the YouTrack service. For example,
youtrack
. Theyoutrack
user account manages YouTrack data and services.Download the Tanuki Java Service Wrapper that is compatible with your operating system.
- Extract the wrapper archive to the home directory of the service user account.
For usability, we also recommend that you rename the wrapper directory. For example,
standalone
.tar xzvf wrapper-macosx-universal-<version>.tar.gz mv wrapper-macosx-universal-<version> standalone
The directory structure for the wrapper should be similar to the following example:
./standalone ./standalone/bin ./standalone/conf ./standalone/doc ./standalone/lib ./standalone/logs ./standalone/src
Copy the YouTrack JAR file to the wrapper directory:
cp youtrack-<version>.jar ~youtrack/standalone/
Create a soft link to the JAR file:
cd ~youtrack/standalone/ ln -s youtrack-<version>.jar youtrack.jar
- Create a
launchd
system startup script asyoutrack.plist
. Place the
youtrack.plist
script in the<service_user_home>/Library/LaunchAgents
folder.- Replace the configuration file of an existing wrapper
~youtrack/standalone/conf/wrapper.conf
with the following configuration file: wrapper.confModify the configuration file to match your YouTrack installation.
The
wrapper.conf
file includes references to the following mandatory JVM options:The maximum Permanent Generation memory is set with the JVM option
-XX:MaxMetaspaceSize=256m
.The maximum Java heap size is set with the property
wrapper.java.maxmemory=1536
. Do not set this property lower than1024m
or1g
.
- Run the wrapper to test the installation.
If the test is successful, the following conditions are met:YouTrack starts successfully.
The
youtrack.pid
file is created in the~youtrack/standalone/
folder.The
wrapper.log
file is created in the~youtrack/standalone/logs/
folder.
Add the new startup script to the system startup scripts sequence.