Atlassian crowd apache tomcat jni native lib

  1. Install Requirements
yum install -y gcc make apr-devel

Download oracle jdk tar.gz file and extract to /opt, create symlink for convenience:

cd /opt
tar -xf jdk-8u121-linux-x64.tar.gz
ln -s jdk1.8.0_121 jdk-latest

Now, for upgrade jdk, just extract new tar.gz file and update symlink to new …

more ...

Atlassian crowd systemd unit

Create systemd service unit in /etc/systemd/system/crowd.service:

[Unit]
Description=Crowd
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
User=nobody
Group=nobody

Environment=JAVA_HOME=/opt/jdk-latest
Environment=PATH=/opt/jdk-latest/bin:/usr/sbin:/usr/bin
EnvironmentFile=-/etc/default/crowd

WorkingDirectory=/opt/atlassian/crowd

ExecStart=/bin/sh start_crowd …
more ...

Автоматическое удаление бекапов confluence

Создать файл /etc/cron.daily/confluence-cleanup:

#!/bin/sh

(
    cd /opt/atlassian/confluence.application-data/backups
    for f in daily-backup-*.zip; do
        [ $(ls daily-backup-*.zip | wc -l) -gt 10 ] || break
        rm -vf "$f"
    done
)

EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t confluence "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0 …
more ...