Thursday, January 20, 2011

installing redmine on ubuntu 10.04

--------------------------first steps--------------------------

$ sudo apt-get install redmine redmine-mysql subversion

The second package, redmine-mysql, can be replaced by either redmine-pgsql or redmine-sqlite if you want to use either of those databases.

Ubuntu should prompt you for all the interesting details.

Redmine will now be installed in /usr/share/redmine and /etc/redmine

Configuration
Symlink /usr/share/redmine/public to your desired web-accessible location. E.g.:

$ ln -s /usr/share/redmine/public /var/www/redmine

By default, passenger runs as 'nobody', so you'll need to fix that. In /etc/apache2/mods-available/passenger.conf, add a PassengerDefaultUser www-data directive.

You'll also need to configure the /var/www/redmine location in /etc/apache2/sites-available/default:


RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on

$ sudo a2enmod passenger

Restart apache2 and you should be good to go.

If you receive a "403: Forbidden" error after setting up Redmine, the Redmine 'public' folder may have incorrect permissions set. The executable bit on the public folder must be enabled or you will receive a "403: Forbidden" error when attempting to access Redmine.

$ sudo chmod a+x /usr/share/redmine/public


---------------- 2nd -----------------------------------------------
1. Get the Redmine source code by either downloading a packaged release or checking out the code repository. See Download.

2. Create an empty database and accompanying user named redmine for example.

For MySQL:

create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
For versions of MySQL prior to 5.0.2 - skip the 'create user' step and instead:

grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';
For PostgreSQL:

CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
3. Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment.

Example for a MySQL database:

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
If your server is not running on the standard port (3306), use this configuration instead:

production:
adapter: mysql
database: redmine
host: localhost
port: 3307
username: redmine
password: my_password
Example for a PostgreSQL database (default port):

production:
adapter: postgresql
database:
host:
username:
password:
encoding: utf8
schema_search_path: (default - public)
4. Generate a session store secret.

rake generate_session_store
5. Create the database structure, by running the following command under the application root directory:

RAILS_ENV=production rake db:migrate
It will create tables and an administrator account.

If you get this error:

Rake aborted!
no such file to load -- net/https
you need to install libopenssl-ruby1.8, in ubuntu, just like this: apt-get install libopenssl-ruby1.8

6. Insert default configuration data in database, by running the following command:

RAILS_ENV=production rake redmine:load_default_data
This step is optional but highly recommended, as you can define your own configuration from scratch. It will load default roles, trackers, statuses, workflows and enumerations.

7. Setting up permissions

NB: Windows users have to skip this section.

The user who runs Redmine must have write permission on the following subdirectories: files, log, tmp (create the last one if not present).

Assuming you run Redmine with a redmine user:

Wednesday, January 19, 2011

Tomcat utf-8 config

make the following changes and it will ok

<connector acceptcount="100" connectiontimeout="20000" executor="tomcatThreadPool" maxkeepaliverequests="15" port="${http.port}" protocol="HTTP/1.1" redirectport="8443" URIEncoding="UTF-8"></connector>