<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jira &#8211; Blog of Kliment Andreev &#8211; A place so I won&#039;t forget things</title>
	<atom:link href="https://blog.andreev.it/tag/jira/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.andreev.it</link>
	<description></description>
	<lastBuildDate>Sat, 24 Oct 2020 13:28:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>FreeBSD: Install Atlassian Jira</title>
		<link>https://blog.andreev.it/2016/12/101-freebsd-install-atlassian-jira/</link>
					<comments>https://blog.andreev.it/2016/12/101-freebsd-install-atlassian-jira/#comments</comments>
		
		<dc:creator><![CDATA[Kliment Andreev]]></dc:creator>
		<pubDate>Sun, 04 Dec 2016 14:49:23 +0000</pubDate>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Jira]]></category>
		<guid isPermaLink="false">http://blog.iandreev.com/?p=2939</guid>

					<description><![CDATA[In this post I&#8217;ll show how to install Atlassian Jira on FreeBSD. This is&#8230;]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><p>In this post I&#8217;ll show how to install Atlassian Jira on FreeBSD. This is just a proof of concept. I wouldn&#8217;t recommend running this in production as it&#8217;s not supported. I would also recommend to have a dedicated FreeBSD server for this. There are a lot of non-standard changes in order this to work.<br />
Jira runs on Java and OpenJDK is not supported, so we&#8217;ll have to use Oracle Java on FreeBSD and according to the port maintainers, this is not a stable port. These are the prerequisites.</p>
<ul>
<li>FreeBSD 10.3 or greater</li>
<li>Atlassian Jira 7.2.4</li>
<li>Oracle JRE 8u112</li>
<li>MySQL-Connector for Java 5.1.40</li>
</ul>
<h1>Download</h1>
<p>None of the software can be downloaded directly using fetch or wget, so you&#8217;ll have to use some GUI browser to accept the terms of use and download. I&#8217;ll put my software under /tmp.</p>
<h2>Java</h2>
<p>Go to <a href="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html" target="_blank" rel="noopener noreferrer">this</a> website and download the version highlighted.You have to accept the license agreement first.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-01.png"><img fetchpriority="high" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-01.png" alt="" width="603" height="321" class="aligncenter size-full wp-image-7609" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-01.png 603w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-01-300x160.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-01-585x311.png 585w" sizes="(max-width: 603px) 100vw, 603px" /></a></p>
<h2>Java JDBC connector for MySQL</h2>
<p>Go to <a href="http://dev.mysql.com/downloads/connector/j/" target="_blank" rel="noopener noreferrer">this</a> web site and download the version highlighted.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-02.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-02.png" alt="" width="941" height="256" class="aligncenter size-full wp-image-7610" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-02.png 941w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-02-300x82.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-02-768x209.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-02-585x159.png 585w" sizes="(max-width: 941px) 100vw, 941px" /></a></p>
<h2>Atlassian Jira</h2>
<p>Go to <a href="https://www.atlassian.com/software/jira/download" target="_blank" rel="noopener noreferrer">this</a> web site and download the generic tarball.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-03.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-03.png" alt="" width="724" height="584" class="aligncenter size-full wp-image-7611" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-03.png 724w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-03-300x242.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-03-585x472.png 585w" sizes="(max-width: 724px) 100vw, 724px" /></a><br />
This is what I have under /tmp</p>
<pre class="brush: plain; title: ; notranslate">
ls -l *.tar.gz
root@ip-172-31-18-146:/tmp # ls -l *.tar.gz
-rw-r--r--  1 ec2-user  ec2-user  264894180 Dec  3 00:48 atlassian-jira-software-7.2.4.tar.gz
-rw-r--r--  1 ec2-user  ec2-user   76262744 Dec  3 00:23 jre-8u112-linux-i586.tar.gz
-rw-r--r--  1 ec2-user  ec2-user    3911557 Dec  3 00:01 mysql-connector-java-5.1.40.tar.gz
</pre>
<h1>Enable Linux compatibility</h1>
<p>I&#8217;ll use the 64-bit Linux kernel module and I need FreeBSD 10.3 for that. You can use the 32-bit if you want and any version of FreeBSD if you want. Instead of linux64, use linux.</p>
<pre class="brush: plain; title: ; notranslate">
kldload linux64
</pre>
<p>Check if the module loaded correctly.</p>
<pre class="brush: plain; title: ; notranslate">
kldstat
</pre>
<p>You should see something like this.</p>
<pre class="brush: plain; title: ; notranslate">
2    1 0xffffffff81c11000 382bd    linux64.ko
</pre>
<p>Execute these three lines.</p>
<pre class="brush: plain; title: ; notranslate">
printf &quot;compat.linux.osrelease=2.6.18\n&quot; &gt;&gt; /etc/sysctl.conf
sysctl compat.linux.osrelease=2.6.18
pkg install –y linux_base-c6
</pre>
<p>Then edit /etc/rc.conf and enable the Linux module to start on each boot.</p>
<pre class="brush: plain; title: ; notranslate">
linux_enable=&quot;YES&quot;
</pre>
<p>Java, bash and Linux module require some special file systems, so edit /etc/fstab and add these lines.</p>
<pre class="brush: plain; title: ; notranslate">
linprocfs   /compat/linux/proc   linprocfs   rw   0  0
tmpfs    /compat/linux/dev/shm  tmpfs   rw,mode=1777    0       0
fdesc   /dev/fd         fdescfs         rw      0       0
</pre>
<p>Finally install bash, create a symbolic link and reboot.</p>
<pre class="brush: plain; title: ; notranslate">
pkg install –y bash
cd /bin
ln -s /usr/local/bin/bash
reboot
</pre>
<h1>Install Java from ports</h1>
<p>cd to /usr/ports. If you don&#8217;t have the ports installed, do portsnap fetch &#038;&#038; portsnap extract first.</p>
<pre class="brush: plain; title: ; notranslate">
cd /usr/ports
</pre>
<p>If it fails do</p>
<pre class="brush: plain; title: ; notranslate">
portsnap fetch &amp;&amp; portsnap extract
</pre>
<p>Create the /usr/ports/distfiles if you don&#8217;t have that folder.</p>
<pre class="brush: plain; title: ; notranslate">
mkdir /usr/ports/distfiles
cd /usr/ports/distfiles
</pre>
<p>Copy the Java tarball from the /tmp directory and install Java</p>
<pre class="brush: plain; title: ; notranslate">
cp /tmp/jre-8u112-linux-i586.tar.gz .
cd /usr/ports/java/linux-oracle-jre18 
make all install clean
</pre>
<p>You&#8217;ll see this warning</p>
<pre class="brush: plain; title: ; notranslate">
Warning: This JRE may be unstable. You are advised to use the native
FreeBSD 1.8 JDK, in ports/java/openjdk8.
</pre>
<p>As I said earlier, Jira does not support OpenJDK.</p>
<h1>Add user</h1>
<p>You don&#8217;t want to run Jira as root, so we&#8217;ll create an user for that.<br />
Type adduser and accept the defaults for everything except the lines below.</p>
<pre class="brush: plain; title: ; notranslate">
adduser
Username: jirauser
Full Name: Atlassian Jira
Shell: bash
Enter password:
Re-enter password: 
OK? Yes
Add another user? no
</pre>
<p>Now log as the jirauser</p>
<pre class="brush: plain; title: ; notranslate">
su - jirauser
</pre>
<p>Edit the .profile file, uncomment the PATH directive and add the bin directory for Jira. In addition, create two variables for JAVA_HOME and JIRA_HOME. My .profile looks like this.</p>
<pre class="brush: plain; title: ; notranslate">
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin:/usr/local/linux-oracle-jre1.8.0/bin; export PATH
# BLOCKSIZE=K;  export BLOCKSIZE

JAVA_HOME=/usr/local/linux-oracle-jre1.8.0; export JAVA_HOME
JIRA_HOME=/usr/local/etc/jirasoftware-home; export JIRA_HOME
</pre>
<p>Once completed, exit from the jirauser session by typing exit. You should be back as root.<br />
As root execute these commands to create the directory for Jira, copy the tarball there, extract the tarball, delete it and own the directory structure by the jirauser.</p>
<pre class="brush: plain; title: ; notranslate">
cd /usr/local
mkdir jirasoftware &amp;&amp; cd jirasoftware
cp /tmp/atlassian-jira-software-7.2.4.tar.gz .
tar xzvf atlassian-jira-software-7.2.4.tar.gz
rm atlassian-jira-software-7.2.4.tar.gz
chown -R jirauser:jirauser atlassian-jira-software-7.2.4-standalone/
chmod -R u=rwx,go-rwx atlassian-jira-software-7.2.4-standalone/
</pre>
<p>Create another directory for Jira, this is where some settings are stored.</p>
<pre class="brush: plain; title: ; notranslate">
cd /usr/local/etc
mkdir jirasoftware-home
chown -R jirauser /usr/local/etc/jirasoftware-home
chmod -R u=rwx,go-rwx /usr/local/etc/jirasoftware-home
</pre>
<h1>MySQL</h1>
<p>Install MySQL by executing</p>
<pre class="brush: plain; title: ; notranslate">
pkg install -y mysql56-server
</pre>
<p>Edit /etc/rc.conf and add this line.</p>
<pre class="brush: plain; title: ; notranslate">
mysql_enable=&quot;YES&quot;
</pre>
<p>Start the MySQL service.</p>
<pre class="brush: plain; title: ; notranslate">
service mysql-server start
</pre>
<p>Then do some initial configurations for the root password.</p>
<pre class="brush: plain; title: ; notranslate">
mysql_secure_installation
</pre>
<p>Accept the defaults for everything except when you change your root password (for the DB sys owner, not the OS root password).<br />
Then create the database for Jira.</p>
<pre class="brush: plain; title: ; notranslate">
mysql –u root –p
</pre>
<p>Enter the MySQL root password and execute these commands under mysql prompt.</p>
<pre class="brush: plain; title: ; notranslate">
create database jiradb character set utf8 collate utf8_bin;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jirauser'@'localhost' IDENTIFIED BY 'yourjirapassword';
flush privileges;
exit
</pre>
<p>Log to MySQL as the jirauser database user.</p>
<pre class="brush: plain; title: ; notranslate">
mysql -u jirauser -p
</pre>
<p>Type this.</p>
<pre class="brush: plain; title: ; notranslate">
SHOW GRANTS FOR jirauser@localhost;
exit
</pre>
<p>You should see the same result as the grant command above. Log back to MySQL as root.</p>
<pre class="brush: plain; title: ; notranslate">
mysql -u root -p
</pre>
<p>Type this.</p>
<pre class="brush: plain; title: ; notranslate">
show variables like 'default_storage_engine'; //DO NOT TYPE THIS: InnoDB is OK
show variables like 'max_allowed_packet'; //DO NOT TYPE THIS: 4194304 is default
show variables like 'innodb_log_file_size';  //DO NOT TYPE THIS: 50331648 is default
show variables like 'sql_mode'; //DO NOT TYPE THIS: STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION  is default
exit
</pre>
<p>Jira requires different values for max_allowed_packet and innodb_log_file_size, so we&#8217;ll change that.<br />
Edit /usr/local/my.cnf and add these two lines at the end.</p>
<pre class="brush: plain; title: ; notranslate">
max_allowed_packet=256M
innodb_log_file_size=2G
</pre>
<p>Restart MySQL with </p>
<pre class="brush: plain; title: ; notranslate">
service mysql-server restart
</pre>
<h1>JDBC connector</h1>
<p>We&#8217;ll have to extract the tarball first.</p>
<pre class="brush: plain; title: ; notranslate">
cd /tmp
tar xzvf mysql-connector-java-5.1.40.tar.gz
</pre>
<p>Then copy the jar archive to the lib folder under Jira.</p>
<pre class="brush: plain; title: ; notranslate">
cd /usr/local/jirasoftware/atlassian-jira-software-7.2.4-standalone/lib 
cp /tmp/mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar .
chown jirauser:jirauser mysql-connector-java-5.1.40-bin.jar
</pre>
<h1>Start Jira</h1>
<p>Log as jirauser with su &#8211; jirauser and then start Jira.</p>
<pre class="brush: plain; title: ; notranslate">
cd /usr/local/jirasoftware/atlassian-jira-software-7.2.4-standalone/bin
./start-jira.sh
</pre>
<p>It&#8217;s gonna tell you something like Server startup logs are located in /usr/local/jirasoftware/atlassian-jira-software-7.2.4-standalone/logs/catalina.out<br />
In a browser go to : http://yourserver:8080<br />
Choose the second option &#8220;I&#8217;ll set it up myself&#8221;</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-04.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-04.png" alt="" width="824" height="553" class="aligncenter size-full wp-image-7612" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-04.png 824w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-04-300x201.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-04-768x515.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-04-585x393.png 585w" sizes="(max-width: 824px) 100vw, 824px" /></a></p>
<p>Fill up the form with the values that you&#8217;ve specified when you created the database.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-05.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-05.png" alt="" width="663" height="675" class="aligncenter size-full wp-image-7613" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-05.png 663w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-05-295x300.png 295w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-05-585x596.png 585w" sizes="(max-width: 663px) 100vw, 663px" /></a><br />
Click on Test Connection and make sure it says it&#8217;s OK.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-06.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-06.png" alt="" width="796" height="133" class="aligncenter size-full wp-image-7614" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-06.png 796w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-06-300x50.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-06-768x128.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-06-585x98.png 585w" sizes="(max-width: 796px) 100vw, 796px" /></a></p>
<p>Once the DB connections is OK, click Next. You&#8217;ll see a lot of activity in the catalina.out log file.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-07.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-07.png" alt="" width="533" height="62" class="aligncenter size-full wp-image-7615" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-07.png 533w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-07-300x35.png 300w" sizes="(max-width: 533px) 100vw, 533px" /></a></p>
<p>After 2-5 mins, you&#8217;ll see this screen. Fill up the form to suit your needs.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-08.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-08.png" alt="" width="845" height="523" class="aligncenter size-full wp-image-7616" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-08.png 845w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-08-300x186.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-08-768x475.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-08-585x362.png 585w" sizes="(max-width: 845px) 100vw, 845px" /></a><br />
Jira requires a license key. I don&#8217;t have one so I&#8217;ll generate a trial one. Click on the link where it says &#8220;generate a JIRA trial license&#8221;. You&#8217;ll be redirected to their site. Create an account or you can use a Google account.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-09.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-09.png" alt="" width="788" height="435" class="aligncenter size-full wp-image-7617" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-09.png 788w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-09-300x166.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-09-768x424.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-09-585x323.png 585w" sizes="(max-width: 788px) 100vw, 788px" /></a><br />
Once you generate a trial license key, you&#8217;ll see the license in the license text box. Click Nex to setup the admin account.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-10.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-10.png" alt="" width="807" height="456" class="aligncenter size-full wp-image-7618" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-10.png 807w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-10-300x170.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-10-768x434.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-10-585x331.png 585w" sizes="(max-width: 807px) 100vw, 807px" /></a></p>
<p>I am not interested in the e-mail notifications at this time, so I&#8217;ll choose &#8220;Later&#8221;.</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-11.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-11.png" alt="" width="836" height="396" class="aligncenter size-full wp-image-7619" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-11.png 836w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-11-300x142.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-11-768x364.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-11-585x277.png 585w" sizes="(max-width: 836px) 100vw, 836px" /></a><br />
A couple of some more questions&#8230;</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-12.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-12.png" alt="" width="830" height="467" class="aligncenter size-full wp-image-7620" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-12.png 830w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-12-300x169.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-12-768x432.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-12-585x329.png 585w" sizes="(max-width: 830px) 100vw, 830px" /></a></p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-13.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-13.png" alt="" width="825" height="401" class="aligncenter size-full wp-image-7621" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-13.png 825w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-13-300x146.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-13-768x373.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-13-585x284.png 585w" sizes="(max-width: 825px) 100vw, 825px" /></a></p>
<p>And you are all set!</p>
<p><a href="https://blog.andreev.it/wp-content/uploads/2016/12/P080-14.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/12/P080-14.png" alt="" width="1227" height="404" class="aligncenter size-full wp-image-7622" srcset="https://blog.andreev.it/wp-content/uploads/2016/12/P080-14.png 1227w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-14-300x99.png 300w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-14-1024x337.png 1024w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-14-768x253.png 768w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-14-1170x385.png 1170w, https://blog.andreev.it/wp-content/uploads/2016/12/P080-14-585x193.png 585w" sizes="(max-width: 1227px) 100vw, 1227px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.andreev.it/2016/12/101-freebsd-install-atlassian-jira/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
