How to set up IceScrum on Ubuntu 12.04

How to set up IceScrum on Ubuntu 12.04

Autor: Adrian Najczuk    Data publikacji: 28-08-12

ubuntuSerwer Tomcat 7 and MySQL 5.5

Preparation

Install Tomcat 7

First you should install Tomcat 7 server and Tomcat Admin Module. To do so just type into console the following:

sudo apt-get install tomcat7 tomcat7-admin

Prepare icescrum

Next we will download icescrum package:

# open any download location

cd ~/Download/icescrum/

# download package

wget http://www.icescrum.org/downloads/icescrum_R5_1.2_war.zip

# unzip war package

unzip icescrum_R5_1.2_war.zip

 

Get MySQL connector

Finally you should download and unpack MySQL Java Connector

            tar -xzf mysql-connector-java-{version}.tar.gz or unzip mysql-connector-java-{version}.zip

  • From unpacked folder copy mysql-connector-java-{version}-bin.jar to Tomcat library:

           sudo cp mysql-connector-java-{version}-bin.jar /usr/share/tomcat7/lib

Thanks to this your icescrum app will be able to work with MySQL database.

 

Icescrum deployment

Server configuration

In Tomcat server configuration file (/var/lib/tomcat7/conf/server.xml) replace the following lines:

<Connector port="8080"

protocol="HTTP/1.1"

connectionTimeout="20000"

redirectPort="8443" />

by

<Connector port=”8080″

protocol=”org.apache.coyote.http11.Http11NioProtocol” connectionTimeout=”2000″

maxThreads=”500″

URIEncoding=”UTF-8″/>

User configuration

In tomcat user configuration (/var/lib/tomcat7/conf/tomcat-users.xml ) file type:

<role rolename="manager-gui"/>

<user username="admin" password="pass" roles="manager-gui"/>

This will allow you to log into Tomcat application management panel to deploy downloaded icescrum.war file.

 

Deploying application

In your browser go to http://localhost:8080/manager/html and using credentials from previous step log into manager panel. Then deploy icescrum.war in section ‘WAR file to deploy’

If you’ll get error saying there is not enough memory go to usr/share/tomcat7-admin/manager/WEB-INF/web.xml and modify the following section:

<multipart-config>

     <max-file-size>52428800</max-file-size>

     <max-request-size>52428800</max-request-size>

     <file-size-threshold>0</file-size-threshold>

</multipart-config>

with greater values like 104857600  (100 mb).

Such deployed application isn’t ready to work. We should configure it.

NOTE: You may also deploy app by putting war package in /var/lib/tomcat7/webapps/ and restarting server /etc/init.d/tomcat7 restart

Environment configuration

MySQL

On MySQL create new user and database:

CREATE DATABASE IF NOT EXISTS icescrum; GRANT ALL PRIVILEGES ON icescrum.* TO %27icescrum%27@%27localhost%27%20IDENTIFIED" data-mce-href="mailto:%27icescrum%27@%27localhost%27%20IDENTIFIED">'icescrum'@'localhost' IDENTIFIED BY "pass";

exit;

Work folder

Create new folder /home/icescrum, which will be used to store attachments and give owner permissions to that folder to user tomcat7 (created automatically while installing Tomcat)

Also create /etc/icescrum folder to keep configuration file there

chown tomcat7:tomcat7 -R /home/icescrum/

usermod -d /home/icescrum tomcat7

 

Permissions

Next you should grant all permissions to iscescrum app on Tomcat Server in filr /etc/tomcat7/policy.d/50local.policy adding the following lines at the end:

grant codeBase "file:${catalina.base}/webapps/icescrum/-" {

permission java.security.AllPermission;

};

Application requires more memory than it is avalible by default JVM settings, thats why we should export new settings at server startup. To do so we will modify script starting server. At the begining of /usr/share/tomcat7/bin/catalina.sh insert:

JAVA_OPTS="-Djava.awt.headless=true -XX:MaxPermSize=1024m -Xmx1024m -Dicescrum_config_location=/etc/icescrum/icescrum_config.properties"

Line with -Dicescrum_config_location defines where server should look for the icescrum configuration. We will talk about this file later.

 

App configuration

Default icescrum configuration file id located in webapps/icescrum/WEB-INF/classes/config.properties. It’s convenient to put this file somewhere else:

cp /var/lib/tomcat7/webapps/icescrum/WEB-INF/classes/config.properties /etc/icescrum/icescrum_config.properties

We replace the following properties in the newly created file:

#Data Source

dataSource.driverClassName=com.mysql.jdbc.Driver

dataSource.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

dataSource.url=jdbc:mysql://localhost:3306/icescrum?useUnicode=true&characterEncoding=utf8&autoReconnect=true

dataSource.username=icescrum

dataSource.password=pass

dataSource.dbCreate=update

 

#Use pool connection

dataSource.pooled=true

dataSource.properties.maxActive = 50

dataSource.properties.maxIdle = 25

dataSource.properties.minIdle = 1

dataSource.properties.initialSize = 1

dataSource.properties.minEvictableIdleTimeMillis = 1800000

dataSource.properties.timeBetweenEvictionRunsMillis = 1800000

dataSource.properties.numTestsPerEvictionRun = 3

dataSource.properties.maxWait = 10000

dataSource.properties.testOnBorrow = true

dataSource.properties.testWhileIdle = true

dataSource.properties.testOnReturn = false

dataSource.properties.validationQuery = "SELECT 1"

 

#serverURL Absolute link required with context name like : http://localhost:8080/icescrum

grails.serverURL=http://localhost:8080/icescrum

If you’re using older MySQL version you may replace

dataSource.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

with

dataSource.dialect=org.hibernate.dialect.MySQLInnoDBDialect

and to enable debugging type

icescrum.debug.enable = true

 

Start working

Now you can restart Tomcat server:

/etc/init.d/tomcat7 restart

and start working with application under http://localhost:8080/icescrum/ . If you have any problem try to check gedit /var/log/tomcat7/catalina.out log file (be sure that you’ve enabled debuging). To log in register or use default admin account:

login: admin

password: adminadmin!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值