JDK自行安装 【 参考地址 】
了解JIRA
不管你知不知道JIRA 还是先大概的了解下。
(大致归纳下)JIRA 是目前比较流行的基于Java架构的管理系统 ,是集项目计划、任务分配、需求管理、错误跟踪于一体的商业软件,功能全面,界面友好,安装简单,配置灵活,权限管理以及可扩展性方面都十分出色。
因为是基于JAVA的所以需要JAVA环境,因为是商业软件所以会要有license key 。
下载JIRA
JIRA 官网:http://www.atlassian.com/software/jira/
点击导航栏上方的Downloads—? 点击DOWNLOAD图标连接
接着在跳转后的页面选择对应的系统我是linux安装的,然后在Download即可
查看已下载好的安装tar包
[root@test jira]# ll atlassian-jira-enterprise-4.2-standalone.tar.gz
-rw-r–r– 1 root root 65984641 01-14 23:07 atlassian-jira-enterprise-4.2-standalone.tar.gz
解压并创建快捷方式
[root@test jira]# tar -zxvf atlassian-jira-enterprise-4.2-standalone.tar.gz -C /dbdata/jira/
[root@test jira]# ln -s atlassian-jira-enterprise-4.2-standalone/ jira
进入链接的jira文件内
[Root@test jira]$/dbdata/jira/jira
创建Mysql的jira帐号
[Root@test jira]$ /usr/local/mysql/bin/mysql –user=root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.41-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database jiradb character set utf8;
Query OK, 1 row affected (0.11 sec)
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jira'@'localhost' IDENTIFIED BY 'jira';
Query OK, 0 rows affected (0.11 sec)
mysql>flush privileges;
Query OK, 0 rows affected (0.00 sec)
登录测试请将/usr/local/mysql/bin/mysql换成你mysql所安装位置
[Root@test jira]$ /usr/local/mysql/bin/mysql –user=jira –password=jira –database=jiradb
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 5.0.41-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> quit
Bye
[Root@test jira]$ mysql –user=root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 67
Server version: 5.0.41-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select user,host from mysql.user;
+———–+———————–+
| user | host |
+———–+———————–+
| localhost | % |
| root | 127.0.0.1 |
| jira | localhost |
| root | localhost |
| root | localhost.localdomain |
+———–+———————–+
5 rows in set (0.00 sec)
mysql> update mysql.user set host='localhost.localdomain' where user='jira';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
安装MYSQL/JDBC 驱动
作用就是让JAVA可以通过JDBC连接MYSQL
下载地址:http://dev.mysql.com/downloads/connector/j/5.1.html
JDBC下载要跟你的MYSQL基本相同,mysql 5.0选择5.0的驱动,依以类推
[root@test jira]# tar -zxvf mysql-connector-java-5.0.8.tar.gz
[root@test mysql-connector-java-5.0.8]# pwd
/dbdata/jira/mysql-connector-java-5.0.8
将mysql-connector-java-5.0.8-bin.jar拷贝到jira下的lib内有些拷到common/lib
[root@test mysql-connector-java-5.0.8]# cp mysql-connector-java-5.0.8-bin.jar ../jira/lib/
修改JIRA配置
[root@test conf]# pwd
/dbdata/jira/jira/conf
[root@test conf]# vim server.xml
修改
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"
characterEncoding=UTF8" ##此处为编辑错误填写!
username="jirausername"
password="jirapassword"
删除以下两行
minEvictableIdleTimeMillis="4000"
timeBetweenEvictionRunsMillis="5000"
进入atlassian-jira/WEB-INF/classes
编辑 entityengine.xml
找到
<datasource name="defaultDS" field-type-name="hsql"
schema-name="PUBLIC"
helper-class="org.ofbiz.core.entity.GenericHelperDAO"
check-on-start="true"
use-foreign-keys="false"
将hsql修改为mysql
删除 schema-name="PUBLIC"
保存即可
修改jira home
创建jira_home (不可以创建在jira其子目录内)
编辑atlassian-jira/WEB-INF/classes/jira-application.properties
找到jira.home 在其他添加/usr/local/jira_home
jira.home =/usr/local/jira_home
保存即可
启动 bin/startup.sh
访问http://ip:8080或者localhost:8080
Server ID申请,可以到http://www.atlassian.com/注册个帐号,然后申请30天的~破解吗,我还没有试呢!
参考
安装成功后,在页面首页显示如下信息:
WARNING: you are using MySQL but do not have a validation query configured. Because of MySQL connection timeouts, this situation can cause data corruption in JIRA
请在下面查找原因
http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures
mysql的数据库请在conf/server.xml文件内添加validationQuery="select 1"
<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="jirauser"
password="jirapassword"
maxActive="20"
validationQuery="select 1"
/>
http://confluence.atlassian.com/display/JIRA/Setting+up+JIRA+Standalone+and+MySQL+on+Linux
http://confluence.atlassian.com/display/JIRA/Setting+your+JIRA+Home+Directory
1 条评论。