YouTrack v2017.1 on CentOS v7.x as a JAR install
IMPORTANT: JetBrains YouTrack as a jar installation does not support external hub integration. This work is for reference only and has been abandoned.
Installation notes for install YouTrack on a VM as a JAR installation. The JAR installation was chosen as it seems to be the most lightweight option.
The VM is running CentOS v7.3, with OpenJDK. An Nginx proxy is used in front of the service to provide https access.
OpenJDK
Install the latest OpenJDK:
# yum install java-1.8.0-openjdk-headless
YouTrack
Add an account for the youtrack service:
# adduser -c "YouTrack Issue Tracker" -m -d /srv/youtrack -r youtrack
As the 'youtrack' user (from the 'youtrack' home directory) download the distribution jar and create a symbolic link with a fixed name. When an upgrade is available, the link can be updated to perform an inplace upgrade.
$ wget https://download.jetbrains.com/charisma/youtrack-2017.1.31650.jar $ ln -s youtrack-2017.1.31650.jar youtrack.jar $ mkdir data backup log tmp
systemd
Create a systemd service file '/lib/systemd/system/youtrack.service' to run the service as the youtrack user noting that the generalised form for running the jar is:
java -Xmx1g -XX:MaxMetaspaceSize=250m
-Djava.awt.headless=true [JVM options]
-jar youtrack-<version>.jar [host:]<port>[/contextPath] [config file path]
[Unit]
Description=JetBrains Youtrack
Requires=network.target
After=syslog.target network.target
[Service]
Type=simple
User=youtrack
Environment="MEMORY_OPTS=-Xmx1g -XX:MaxMetaspaceSize=250m"
Environment="BASE_OPTS=-Djava.security.egd=/dev/zrandom -Djava.awt.headless=true -Djetbrains.youtrack.disableBrowser=true"
Environment="LISTEN_URL=8080"
WorkingDirectory=/srv/youtrack
ExecStart=/usr/bin/java $MEMORY_OPTS $BASE_OPTS -jar /srv/youtrack/youtrack.jar $LISTEN_URL
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target
Enable and start the service:
# systemctl enable youtrack # systemctl start youtrack
Firewall
Over and above standard firewall access (ssh, dns, http, local smtp); allow ingress for http for the main web interface (port 8080):
-A tcpIn -p tcp -m tcp --source 10.20.7.0/24 --dport 8080 -m conntrack --ctstate NEW -j ACCEPT
Note: If you are using the standard firewall then
# firewall-cmd --zone=public --permanent --add-port=8080/tcp # firewall-cmd --reload