【背景】
原先的Confluence, JIRA, Fisheye都部署在一台服务器(192.168.200.203)上,导致这台机器太卡,公司又分配了两台虚拟机来分开这几个应用(192.168.200.241, 192.168.200.242),按照以下进行分配:
Fisheye: 192.168.200.241,考虑到Fisheye是代码审查工具,开发人员有18个人同时使用,而且访问频率很高,故单独给Fisheye放在一台机器上
Confluence, JIRA:192.168.200.242:这两个放在一台机器上,访问人数不是特别多,访问频率不是很高
【开工】
JIRA:
直接从老的系统拷贝过来:
整个tomcat拷贝过来:
scp -r oecs-g2/apache-tomcat-6.0.35-jira/ sysadmin@192.168.200.242:/usr/local/oecs-g2/apache-tomcat-6.0.35-jira/
整个jirahome拷贝过来:
scp -r oecs-g2/jirahome/ sysadmin@192.168.200.242:/usr/local/oecs-g2/jira/jirahome
配置web目录下jirahome路径,在webapps/jira下面的配置文件:
配置文件:WEB-INF/classes/jira-application.properties
修改内容,红色内容,改成拷贝过来的jirahome
# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.
jira.home=/usr/local/oecs-g2/jira/jirahome
配置jira的数据库,:
配置文件:/usr/local/oecs-g2/jira/jirahome/dbconfig.xml
修改内容,如果以前是使用localhost,需要改成对应的IP,如果换了数据库,则需要配置成新的数据库(以下红色连接)及用户名密码:
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mysql</database-type>
<jdbc-datasource>
<url>jdbc:mysql://192.168.200.203:3306/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB</url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<username>jira</username>
<password>jira</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-while-idle>true</pool-test-while-idle>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>
将老的JIRA停掉,然后启动新的tomcat服务器,成功,至此,JIRA迁移成功。