日期:2014-05-16 浏览次数:20847 次
花了一整天的时间安装jira最新版,现在记录一下。
1.下载最新的jira4.1.2版本并解压
?
2.在mysql数据库中新建数据库:create database jiradb character set utf8;,新建mysql用户jirauser,并将jiradb的所有操作权限都赋给jirauser(GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON jiradb.* TO jirauser@'192.168.0.%' IDENTIFIED BY 'jira';),最后记得flush privileges;
?
3.设置环境变量
vi /etc/profile
export CATALINA_HOME="/usr/local/atlassian-jira-enterprise-4.1.2-standalone"
source /etc/profile?
?4.修改配置文件
/usr/local/atlassian-jira-enterprise-4.1.2-standalone/conf/server.xml
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="jirauser" password="jira" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://10.10.20.170:3306/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
?/usr/local/atlassian-jira-enterprise-4.1.2-standalone/atlassian-jira/WEB-INF/classes/entityengine.xml
<datasource name="defaultDS" field-type-name="mysql" helper-class="org.ofbiz.core.entity.GenericHelperDAO" check-on-start="true" use-foreign-keys="false" use-foreign-key-indices="false" check-fks-on-start="false" check-fk-indices-on-start="false" add-missing-on-start="true" check-indices-on-start="true"> <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/JiraDS"/> <!-- Orion format: <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/JiraDS"/> --> <!-- JBoss format: <jndi-jdbc jndi-server-name="default" jndi-name="java:/JiraDS"/> --> <!-- Weblogic format: <jndi-jdbc jndi-server-name="default" jndi-name="JiraDS"/> --> </datasource>
vi atlassian-jira/WEB-INF/classes/jira-application.properties jira.home =/usr/local/atlassian-jira-enterprise-4.1.2-standalone
?
?
5.启动tomcat,在浏览器输入:http://10.10.20.170:8899(ip为实际ip,port为tomcat的server.xml配置的,默认8080)开始jira安装页面,获取ServerID
?
6.破解jira4.1.2,将/usr/local/atlassian-jira-enterprise-4.1.2-standalone/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar复制到本地windows机子上,解压附件的crack.rar,双击keygen.bat,输入上一步获取的ServerID信息,点击gen,生成序列号,再 patch一下atlassian-extras-2.2.2.jar,patch成功后将atlassian-extras-2.2.2.jar拷贝覆盖服务器上的jar。
?
7.如果出现jira安装页面不可以访问,尝试重启,我遇到过第一次安装页面不可访问,重启即可。
?
8.汉化。下载汉化包:http://www.fangwai.net/software/jira/download/language_zh_CN.jar替换原有的简体中文语言包。
?
9.因为jira的描述官方不支持富文本,被很多用户诟病。现提供一种简单的方式实现,来源自jira官方评论。
1. Extract tinyMCE to the "\atlassian-jira\includes\js\" folder. 2. Edit "\atlassian-jira\secure\views\createissue-details.jsp" a. Add this under <body>, you may also want to remove the add comment on create (one line of code) if you don’t use it or exempt it using the tinyMCE editor_selector option. <script type="text/javascript" src="/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", the