shirts.flurdy.com
|
Launch Ubuntu (Follow flurdy ec2 docs for tips on using Ubuntu & ec2)
sudo aptitude install sun-java6-jdk;
Accept Sun's license if prompted
sudo update-alternatives --config java;
Choose java-6-sun
sudo vi /etc/profile.d/java.sh;
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME
sudo chmod +x /etc/profile.d/java.sh
Either go via Atlassian's download pages or:
wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-enterprise-4.0.1-standalone.tar.gz
tar xzf atlassian-jira-enterprise-4.0.1-standalone.tar.gz;
sudo mkdir /opt/atlassian;
sudo mv atlassian-jira-enterprise-4.0.1-standalone /opt/atlassian/jira-4.0.1
sudo ln -s /opt/atlassian/jira-4.0.1 /opt/atlassian/jira
sudo /usr/sbin/useradd --create-home --home-dir
/usr/local/jira --shell /bin/bash jira;
sudo chown -R jira:jira /opt/atlassian/jira-4.0.1
sudo vi /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/jira-application.properties;
jira.home=/var/opt/atlassian/jira
If you are not interested in seperating the file locations etc, then this is all you have to do. But I prefer not to...
sudo mkdir -p /etc/opt/atlassian/jira;
sudo mkdir -p /var/opt/atlassian/jira;
sudo chown jira:jira /etc/opt/atlassian/jira /var/opt/atlassian/jira
sudo mv /opt/atlassian/jira/logs /var/log/jira;
sudo ln -s /var/log/jira /opt/atlassian/jira/logs;
sudo touch /var/log/jira/atlassian-jira.log;
sudo chown jira:jira /var/log/jira/atlassian-jira.log;
sudo ln -s /var/log/jira/atlassian-jira.log /opt/atlassian/jira/atlassian-jira.log;
sudo ln -s /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/jira-application.properties\
/etc/opt/atlassian/jira/;
sudo ln -s /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/log4j.properties\
/etc/opt/atlassian/jira/;
sudo mv /opt/atlassian/jira/conf
/etc/opt/atlassian/jira/tomcat;
sudo ln -s /etc/opt/atlassian/jira/tomcat /opt/atlassian/jira/conf
sudo mkdir -p /var/lib/hsqldb/jira;
sudo chown jira:jira /var/lib/hsqldb/jira;
sudo ln -s /var/lib/hsqldb/jira /opt/atlassian/jira/database
sudo mkdir /var/opt/atlassian/jira-tomcat;
sudo mv /opt/atlassian/jira/work
/var/opt/atlassian/jira-tomcat/;
sudo mv /opt/atlassian/jira/temp
/var/opt/atlassian/jira-tomcat/;
sudo ln -s /var/opt/atlassian/jira-tomcat/work
/opt/atlassian/jira/;
sudo ln -s /var/opt/atlassian/jira-tomcat/temp
/opt/atlassian/jira/
Follow Atlassian's init.d script instructions by.
Copy their init.d script to /tmp/jira.sh. Then modify it:
vi /tmp/jira.sh
BIN=/opt/atlassian/jira/bin
sudo mv /tmp/jira.sh /etc/init.d/jira
sudo chmod 751 /etc/init.d/jira
sudo chown root:root /etc/init.d/jira
sudo update-rc.d jira defaults
(Ignore the LSB warnings...)
sudo /opt/atlassian/jira/bin/startup.sh
sudo /etc/init.d/jira start
First launch may take a long time as it needs to create database, configure plugins etc.
If empty or errors then somethings is not right...
tail -f /var/log/jira/atlassian-jira.log
tail -f /var/log/jira/catalina.out
Follow Atlassian's changing Jira's port page.
Using elements from my own tomcat+apache howto and Atlassian's integrating Apache page.
If you want to backup Jira, Atlassian provides several tips in their wiki on exporting Jira data etc.
However to backup just the files from this install you can tar up these:
sudo /etc/init.d/jira stop;
sudo /opt/atlassian/jira/bin/shutdown.sh;
sudo tar cf jira.2010-01-23.1.tar /etc/opt/atlassian/jira;
sudo tar rf jira.2010-01-23.1.tar /var/opt/atlassian/jira;
sudo tar rf jira.2010-01-23.1.tar /var/opt/atlassian/jira-tomcat;
sudo tar rf jira.2010-01-23.1.tar /var/lib/hsqldb/jira;
sudo tar rf jira.2010-01-23.1.tar /var/log/jira;
sudo gzip jira.2010-01-23.1.tar;
sudo /opt/atlassian/jira/bin/startup.sh;
sudo /etc/init.d/jira start
I have made a very crude attempt on a script to do all this.
Do not use it in a production environment, as it does no checking, assumes installation exactly like mine etc.
I have not packed this up in a .deb package. But perhaps in the future if there is a need.
But the best would be perhaps if Atlassian made a proper .deb package instead?!