Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://confluence.atlassian.com/bamboo/running-bamboo-as-a-linux-service-416056046.html

https://confluence.atlassian.com/bamboo/installing-bamboo-on-linux-289276792.html

sudo su
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-installer
sh -c 'echo "JAVA_HOME="/usr/lib/jvm/java-8-oracle"" >> /etc/environment 
root@bamboo:/var/log# java -version 2>&1 | head -n 1 | awk -F '"' '{print $2}'
1.8.0_101
root@bamboo:/var/log# echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle 
useradd --create-home -c "Bamboo role account" bamboo
mkdir -p /opt/atlassian/bamboo
chown bamboo: /opt/atlassian/bamboo
su - bamboo
cd /opt/atlassian/bamboo
tar zxvf /tmp/atlassian-bamboo-*.tar.gz
ln -s atlassian-bamboo-*/ current
exit 
cat << 'EOL>/etc/init.d/bamboo
#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: bamboo
# Required-Start: $local_fs $remote_fs $network $time
# Required-Stop: $local_fs $remote_fs $network $time
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Atlassian Bamboo Server
### END INIT INFO
# INIT Script
######################################
# Define some variables
# Name of app ( bamboo, Confluence, etc )
APP=bamboo
# Name of the user to run as
USER=bamboo
# Location of application's bin directory
BASE=/opt/atlassian/bamboo/current
case "$1" in
# Start command
start)
echo "Starting $APP"
/bin/su - $USER -c "export BAMBOO_HOME=${BAMBOO_HOME}; $BASE/bin/startup.sh &> /dev/null"
;;
# Stop command
stop)
echo "Stopping $APP"
/bin/su - $USER -c "$BASE/bin/shutdown.sh &> /dev/null"
echo "$APP stopped successfully"
;;
# Restart command
restart)
$0 stop
sleep 5
$0 start
;;
*)
echo "Usage: /etc/init.d/$APP {start|restart|stop}"
exit 1
;;
esac
exit 0
EOL 
chmod a+x /etc/init.d/bamboo
update-rc.d bamboo defaults 
sh -c 'echo "bamboo.home=/var/atlassian/application-data/bamboo" >>/opt/atlassian/bamboo/current/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties' 
root@bamboo:/opt/atlassian/bamboo/current/atlassian-bamboo/WEB-INF/classes# service bamboo start
Starting bamboo
root@bamboo:/opt/atlassian/bamboo/current/atlassian-bamboo/WEB-INF/classes# service ufw status
ufw stop/waiting 
  • No labels