Jira8.8.1安裝@項目管理工具之一


前言

收藏了很多文章,也沒有去好好整理,今天幫忙搭jira,翻出了久遠的筆記,秉着溫故而知新的態度,順手也整理更新一下筆記。

JIRA是Atlassian公司出品的項目與事務跟蹤工具,被廣泛應用於缺陷跟蹤、客戶服務、需求收集、流程審批、任務跟蹤、項目跟蹤和敏捷管理等工作領域。

本文主要講在Centos7.x下的安裝與配置Jira,准確快速搭建Jira,免費方式僅限學習交流,請支持正版軟件

 

一、前期准備


  •  1.1 Linux創建Jira用戶
#root用戶 創建jira組
groupadd jira

#創建jira用戶
useradd -g jira -d /home/jira -m -s /bin/bash jira

#jira配置Sudo權限
visudo 添加jira sudo權限

說明:root用戶安裝,則跳過此步

  • 1.2 相關軟件(5個)

# jira安裝文件
atlassian-jira-software-8.8.1-x64.bin

# java
java-1.8.0-openjdk

# Mysql數據庫
mariadb

# Mysql-jdbc包
mysql-connector-java-5.1.44.jar

# Jira免費包
atlassian-extras-3.2.jar
  • 1.3 配置mariadb國內源(yum)

# root用戶
vim /etc/yum.repos.d/mariadb.repo
# 添加如下內容

# MariaDB 10.3 CentOS repository list - created 2017-07-03 06:59 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.3/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

 

  • 1.4 注冊atlassian帳號

必須注冊,后面需要申請試用許可
https://id.atlassian.com/signup

 

 

二、軟件安裝

  • 2.1 JDK(JAVA)安裝

# 查找所需JDK版本
yum search java|grep openjdk

# 安裝所需版本1.8+
yum -y install java-1.8.0-openjdk

# 檢查是否安裝成功
java -version

說明:

1.可以安裝java11
2.非root用戶,命令前需要加sudo 
  • 2.2 Mysql安裝配置

yum -y install MariaDB-server MariaDB-client
# 啟動MariaDB
systemctl start mariadb
# 設置開機啟動 systemctl enable mariadb
#配置Mysql
mysql_secure_installation

#首先是設置密碼,會提示先輸入密碼
Enter current password for root (enter for none):<–初次運行直接[回車]

#設置密碼:舉例findyou123456
Set root password? [Y/n] <– 是否設置root用戶密碼,輸入y並回車或直接回車
New password: <– 設置root用戶的密碼
Re-enter new password: <– 再輸入一次你設置的密碼

#其他配置
Remove anonymous users? [Y/n] <– 是否刪除匿名用戶,[回車]
Disallow root login remotely? [Y/n] <–是否禁止root遠程登錄,[回車]
Remove test database and access to it? [Y/n] <– 是否刪除test數據庫,[回車]
Reload privilege tables now? [Y/n] <– 是否重新加載權限表,[回車]

#初始化MariaDB完成,接下來測試登錄
mysql -u root -pfindyou123456

#查看字符集
mysql>show variables like "%character%";show variables like "%collation%";
  • 2.3 創建Jira數據庫

mysql>create database jira default CHARACTER SET utf8 COLLATE utf8_bin;
mysql>grant all on jira.* to jira@'%' identified by "findyou123456";
mysql>flush privileges;
mysql>quit;

 

 

三、Jira安裝配置


 

  • 3.1 查看Linux系統 bit

getconf LONG_BIT
  • 3.2 下載對應Jira版本

# 選擇 Linux 64 Bit
# 最新版本8.8.1 - 2020年4月21日
https://www.atlassian.com/software/jira/download

# 文件上傳Centos服務器
  • 3.3 安裝Jira 8.8.1

# 添加可執行權限
chmod 755 atlassian-jira-software-8.8.1-x64.bin

# 安裝jira服務
./atlassian-jira-software-8.8.1-x64.bin
[root@localhost ~]$ ./atlassian-jira-software-8.8.1-x64.bin
Unpacking JRE ...
Starting Installer ...
You do not have administrator rights to this machine and as such, 
\ some installation options will not be available. 
\ Are you sure you want to continue?
Yes [y, Enter], No [n]  # 回車

This will install Jira Software 8.8.1 on your computer.
OK [o, Enter], Cancel [c] # 回車

Click Next to continue, or Cancel to exit Setup.

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]  # 回車

Select the folder where you would like Jira Software to be installed.
Where should Jira Software be installed?
[/home/jira/atlassian/jira]  # 可以修改軟件安裝地址
/data/atlassian/jira

Default location for Jira Software data
[/home/jira/atlassian/application-data/jira]  # 可以修改數據存放地址
/data/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]  # 回車,或改端口為80
Details on where Jira Software will be installed and the settings that will be used.
Installation Directory: /data/atlassian/jira
Home Directory: /data/atlassian/application-data/jira
HTTP Port: 8080
RMI Port: 8005
Install as service: No
Install [i, Enter], Exit [e]  # 回車

Extracting files ...

Please wait a few moments while Jira Software is configured.

Installation of Jira Software 8.8.1 is complete
Start Jira Software 8.8.1 now?
Yes [y, Enter], No [n]  # 回車

Please wait a few moments while Jira Software starts up.
Launching Jira Software ...

Installation of Jira Software 8.8.1 is complete
Your installation of Jira Software 8.8.1 is now ready and can be accessed
via your browser.
Jira Software 8.8.1 can be accessed at http://localhost:8080
Finishing installation ...
  • 3.4 安裝Mysql-JDBC包

# 下載mysql jdbc依賴
http://mvnrepository.com
搜索mysql,找到對應jar包下載

# 上傳服務器
mysql-connector-java-5.1.44.jar

# 拷貝包至jira目錄lib中
cp mysql-connector-java-5.1.44.jar /data/atlassian/jira/atlassian-jira/WEB-INF/lib/
# 重啟jira
cd /data/atlassian/jira/bin
sh shutdown.sh
sh startup.sh

說明:/data/atlassian/jira為本文jira路徑,如與我路徑不同,需要自行修改

  • 3.5 Linux防火牆設置

# 檢查是否開放8080端口
iptables --list

# 開發8080端口訪問
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
  • 3.6 瀏覽器訪問並配置

# 3.6.1 瀏覽器打開地址(安裝Jira服務器IP)
http://172.27.1.18:8080

# 3.6.2 圖1:配置擇第二項
我將設置它自已(I'll set it up myself)

 

# 3.6.3 圖2:數據庫選擇第二項
其它數據庫 (推薦用於正式生產環境)

 

# 3.6.4 圖3:設置應用程序的屬性
程序標題:項目管理系統
運行模式:私營 # 即只有管理員才可創帳號
基本URL:默認

 

# 3.6.5 圖4:請指定您的許可證關鍵字
記住服務器 ID :B7E0-xxxx-xxxx-JVI5
點擊 {MyAtlassian生成JIRA試用許可證} 鏈接

#3.6.6 圖5-8:跳轉后登錄1.4申請的帳號
申請Jira 90天試用
點擊 [Generate Licenes]按鈕生成Licenes

 

# 3.6.7 設置管理員帳戶
全名(顯示):findyou
郵箱:albert.peng@foxmail.com
用戶名(登錄用):findyou
密碼:123456

# 3.6.8 設置電子郵件通知
以后再說

# 3.6.9 默認語言
中文 (中國) [默認]

# 3.6.10 選擇頭像
跳過

# 3.6.11 創建一個項目
Scrum開發方法

  

 

四、Jira免費使用


  •  4.1 僅供交流學習使用

# 下載免費使用的jar包
atlassian-extras-3.2.jar

# 替換lib目錄同名文件
/data/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar

# 重啟jira
cd /data/atlassian/jira/bin
sh shutdown.sh
sh startup.sh

# 檢查是否無用戶限制
設置-》系統-》應用程序-》版本和許可證
user無限
2033年

  

五、其他配置


Jira默認時間格式不太符合國人習慣,簡單說明如何修改顯示時間格式。

  • 5.1 界面時間格式修改 

管理員-->設置-->系統-->外觀-->日期/時間格式
# 例如23:55
時間格式:HH:mm

# 例如 星期二 23:55
日期格式:EEEE HH:mm

# 例如2007/05/22 23:55
完成日期/時間格式:yyyy/MM/dd HH:mm 

#例如2007/05/22
年月日格式: yyyy/MM/dd
  • 5.2 彈窗時間格式修改

管理員-->設置-->系統-->一般設置-->高級設置
jira.date.picker.java.format  yyyy/MM/dd
jira.date.time.picker.java.format  yyyy/MM/dd HH:mm
  • 5.3 郵件服務器

管理員-->設置-->系統-->外發郵件-->添加SMTP
# 與郵件客戶端配置方法基本一致
  • 5.4 修改內存使用大小

cd /data/atlassian/jira/bin
vim setenv.sh

JVM_MINIMUM_MEMORY="1024m"
JVM_MAXIMUM_MEMORY="4096m"

暫時先就這些了,其他見google,慢慢整理筆記,隔三差五碼一篇出來,請不要期待

 

 

轉載說明

本文為原創文章,如需轉載,請在開篇顯著位置注明作者Findyou和出處


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM