環(huán)境
操作系統(tǒng) Ubuntu 14.04.5 LTS
軟件版本 atlassian-jira-software-7.1.9-x64.bin
安裝前準備
安裝 Vim怠缸,用于編輯配置文本
sudo apt-get install vim
安裝 Java 環(huán)境
檢查是否安裝了 Java 環(huán)境
java -version
如果輸出為類似這樣诗轻,則表示當前沒有安裝 Java 環(huán)境,需要進行安裝
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: apt-get install <selected package>
更新包并安裝相關依賴
sudo apt-get update
sudo apt-get install default-jre
sudo apt-get install default-jdk
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
這里運行 sudo add-apt-repository ppa:webupd8team/java
可能會遇到以下報錯揭北,是因為沒有配置好相關依賴扳炬,需要運行 sudo apt-get install software-properties-common
才能順利執(zhí)行
sudo: add-apt-repository: command not found
然后安裝 Java8
sudo apt-get install oracle-java8-installer
如果報錯如下:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java8-installer
執(zhí)行一次包更新就可以了
sudo apt-get update
完成后,查看 Java 版本
java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
這樣罐呼,Java 已經(jīng)順利安裝完成鞠柄。
配置 Java 環(huán)境
查看當前 Java 安裝位置
sudo update-alternatives --config java
輸出如下,可直接 Enter 回車嫉柴,不進行修改
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 auto mode
1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
2 /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 manual mode
Press enter to keep the current choice[*], or type selection number:
之后配置 Java 環(huán)境變量
sudo vim /etc/environment
將其修改為:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
然后應用修改
source /etc/environment
這時候查詢 Java 的系統(tǒng)變量值:
echo $JAVA_HOME
應該可以得到:
/usr/lib/jvm/java-8-oracle
獲取 JIRA 安裝文件
從官網(wǎng)下載文件厌杜,用 wget 方式,注意選擇版本
sudo wget https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.1.9-x64.bin
下載成功如下:
--2016-08-22 15:17:11-- https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.1.9-x64.bin
Resolving downloads.atlassian.com (downloads.atlassian.com)... 54.230.8.86, 54.230.8.215, 54.230.8.52, ...
Connecting to downloads.atlassian.com (downloads.atlassian.com)|54.230.8.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 321966262 (307M) [application/octet-stream]
Saving to: 'atlassian-jira-software-7.1.9-x64.bin'
100%[======================================>] 321,966,262 77.8MB/s in 6.2s
2016-08-22 15:17:17 (49.6 MB/s) - 'atlassian-jira-software-7.1.9-x64.bin' saved [321966262/321966262]
安裝 JIRA
解壓文件并啟動安裝
chmod a+x atlassian-jira-software-7.1.9-x64.bin
./atlassian-jira-software-7.1.9-x64.bin
其中的配置,可以選默認值或者自定義夯尽,具體輸出如下:
Unpacking JRE ...
Starting Installer ...
Aug 22, 2016 3:22:11 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
This will install JIRA Software 7.1.9 on your computer.
OK [o, Enter], Cancel [c]
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
Where should JIRA Software be installed?
[/opt/atlassian/jira]
Default location for JIRA Software data
[/var/atlassian/application-data/jira]
Configure which ports JIRA Software will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to startup and shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]
Details on where JIRA Software will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/jira
Home Directory: /var/atlassian/application-data/jira
HTTP Port: 8080
RMI Port: 8005
Install as service: Yes
Install [i, Enter], Exit [e]
Extracting files ...
Please wait a few moments while JIRA Software starts up.
Launching JIRA Software ...
Installation of JIRA Software 7.1.9 is complete
Your installation of JIRA Software 7.1.9 is now ready and can be accessed
via your browser.
JIRA Software 7.1.9 can be accessed at http://localhost:8080
Finishing installation ...
這時候瞧壮,JIRA 就安裝完成了,如果是在虛擬機安裝的匙握,那么打開 http://ip-address:8080
就可以看到 JIRA 的頁面了咆槽。
其它配置
JIRA 目前版本,是需要在線激活并認證才能使用圈纺,支持免費試用 14 天秦忿。
打開后其中可以配置 mysql 或其他數(shù)據(jù)庫,也可以使用內(nèi)置數(shù)據(jù)庫蛾娶,不過內(nèi)置數(shù)據(jù)庫是用來演示及測試的灯谣,生產(chǎn)環(huán)境不建議使用。
常見問題
打開網(wǎng)頁后蛔琅,如果在配置 JIRA 的過程中胎许,遇到網(wǎng)頁顯示 error,不用太擔心罗售,可能是服務在后臺正在配置辜窑,稍微等待一會兒,過一會刷新下就可以了寨躁。
參考資料
- 安裝 Java
https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
- Python 命令配置
http://www.arthurtoday.com/2010/09/ubuntu-add-apt-repository.html
- 安裝 JIRA
https://www.mininodes.com/how-to-install-jira-on-an-ubuntu-arm-server/