一、环境
# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.3 (Final)
Release: 6.3
Codename: Final
# getconf LONG_BIT
64
# rpm -qa | grep mysql
mysql-libs-5.1.73-3.el6_5.x86_64
php-mysql-5.3.3-27.el6_5.x86_64
mysql-5.1.73-3.el6_5.x86_64
mysql-server-5.1.73-3.el6_5.x86_64
courier-authlib-mysql-0.62.4-1.el6.FT.x86_64
# env | grep -i java
JAVA_HOME=/data/jdk1.6.0_27
二、文件准备
官方下载地址:https://www.atlassian.com/software/jira/download
jira4.2.2包下载地址:wget http://wpc.29c4.edgecastcdn.net/8029C4/downloads/software/jira/downloads/atlassian-jira-enterprise-4.2.2-b589-standalone.tar.gz
破解包:http://files.cnblogs.com/flyingzl/jira_licence.rar
由于jira是商业软件,所以为了……,您懂的,以下是jira4.2版本包与破解包:
atlassian-jira-enterprise-4.2.2-b589-standalone.tar.gz
atlassian-jira.zip
(程序包都已上传至 /usr/local/src 目录下)
三、安装
cd /usr/local/src
tar xzvf atlassian-jira-enterprise-4.2.2-b589-standalone.tar.gz
mv atlassian-jira-enterprise-4.2.2-b589-standalone /usr/local/jira
cd /usr/local/jira
mkdir jira_home
四、配置
4.1 数据库(mysql)配置
4.1.1 安装mysql,并修改/etc/mysql/my.cnf文件,在[mysql]和[mysqld]下分别增加一句:default-character-set=utf8
4.1.2 通过mysql -u root -p 命令登入mysql,创建数据库jiradb,操作命令为 create database jiradb character set 'utf8'
4.1.3 创建用户jira,操作命令为 grant all privileges on jiradb.* to 'jira'@'%' identified by 'jira'
4.1.4 创建用户jira,操作命令为 grant all privileges on jiradb.* to 'jira'@'localhost' identified by 'jira'
4.2 JIRA配置
4.2.1 进入/usr/local/jira/conf/目录,编辑server.xml,找到如下内容并修改:
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8"
username="jira"
password="jira"
maxActive="20"
validationQuery="SELECT 1"
/>
4.2.2 进入/usr/local/jira/atlassian-jira/WEB-INF/classes目录下,编辑jira-application.properties文件,修改jira.home =/usr/local/jira/jira_home
4.2.3 进入/usr/local/jira/atlassian-jira/WEB-INF/classes目录下,编辑entityengine.xml文件,将<datasource name= "defaultDS" field-type-name= "hsql" 中的hsql改为"mysql",并删除
schema-name="PUBLIC"
五、破解
下载licence文件 http://files.cnblogs.com/flyingzl/jira_licence.rar解压出来并覆盖/usr/local/jira/atlassian-jira 目录;
六、启动JIRA
/usr/local/jira/bin/startup.sh
七、关闭JIRA
/usr/local/jira/bin/shutdown.sh
八、访问JIRA
打开浏览器,输入http://ip:8080/就能看到jira的主页面了。在首页会看到你的ServerID,比如ServerID为BL7M-KJJC-06XD-R275,那么拷贝如下licence:
Description=JIRA\: COMMERCIAL
CreationDate=2014-08-08
ContactName=flyingzl@gmail.com
jira.LicenseEdition=ENTERPRISE
ContactEMail=flyingzl@gmail.com
Evaluation=false
jira.LicenseTypeName=COMMERCIAL
jira.active=true
licenseVersion=2
MaintenanceExpiryDate=2020-10-24
Organisation=flyingzl
jira.NumberOfUsers=-1
ServerID=BL7M-KJJC-06XD-R275
LicenseID=LID
LicenseExpiryDate=2020-10-24
PurchaseDate=2014-08-08
注:把加粗部分更改为您自己的ServerID;
网络参考资料:http://hi.baidu.com/davice_li/item/c27759184862b2787b5f25a2
转载于:https://blog.51cto.com/63638790/1436949