Tikejhya: Ashish Nepal

Knowledgebase

Category: Redmine

Redmine HTML support

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

How to enable html tagging/macro in redmine.

# Redmine HTML macro
desc “Insert html” + “nn” +
” !{{html(html block)}}”
macro :html do |obj, args, text|
text.html_safe
end

REDMINE: Disabling User Account

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

REDMINE: Disabling User Account (Disable Login) from mysql

mysql -u user.name -pPASSWORD --database redmine -h redmine.ashishnepal.com --port 3306 -ss -e "update redmine.users set status='3' where mail='$username@ashishnepal.com

http to http requestHeader

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Change http header request to https

RequestHeader set X_FORWARDED_PROTO ‘https’

Move and upgrade Redmine

There were three main things that must be copied over:
The Subversion repository
The Redmine database
the Redmine uploaded

Copy over the latest Redmine database,
Redmine files and
Subversion from the old dev box:

sudo svnadmin dump svn/repository > /tmp/svn_repository.dmp
gzip /tmp/svn_repository.dmp
tar czf /tmp/redmine_files.tar.gz -P /var/www/apps/redmine
mysqldump -uredmine redmine > /tmp/redmine_backup.sql
gzip /tmp/redmine_backup.sql
cd /tmp
scp svn_repository.dmp.gz redmine_backup.sql.gz redmine_files.tar.gz workbooks@172.16.19.85:

Back on the new dev box, drop and recreate the redmine database:

mysql -uroot -p
drop database redmine;
create database redmine character set utf8;
grant all privileges on redmine.* to ‘redmine’@’localhost’;
exit

Restore the Redmine database:

gunzip redmine_backup.sql.gz
mysql -uredmine redmine < redmine_backup.sql Restore the Redmine file attachments and set permissions: tar xzf redmine_files.tar.gz sudo chown -R www-data:www-data /var/www/apps/redmine/* Restore the SVN repository: gunzip svn_repository.dmp.gz sudo mv /var/svn/repository /var/svn/repository.test sudo svnadmin create /var/svn/repository sudo svnadmin load /var/svn/repository < svn_repository.dmp DO not forgot the file attachments - they aren't stored in Redmine's database - they are in the redmine application directory on the filesystem. (rake upgrade of the database structure) http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

Redmine | RoR

How to install Redmine On Centos 5.6 x86_64

# I Prefer having source in certain location

cd /usr/local/src/
yum install subversion make gcc gcc-c++ zlib-devel ruby-devel rubygems ruby-libs apr-devel apr-util-devel httpd-devel mysql-devel mysql-server automake autoconf ImageMagick ImageMagick-devel curl-devel

# Download recent version of redmine
# NOte: I have been using right version of ruby, rubygems and thin please check that which is available at redmine.org

wget http://rubyforge.org/frs/download.php/76495/redmine-2.1.2.tar.gz

#untar

tar -zxvf redmine-2.1.2.tar.gz
cd redmine-2.1.2

# check status and start mysql

service mysqld start

#Create database, change password as per your need

mysql -e "CREATE DATABASE redmine DEFAULT CHARACTER SET utf8;"
mysql -e "create user 'redmine'@'localhost' identified by 'my_password';"
mysql -e "grant all privileges on redmine.* to 'redmine'@'localhost';"
mkdir -p /data/www/
mv redmine-2.1.2 /data/www/
cd /data/www/redmine-2.1.2
cp config/database.yml.example config/database.yml

####################################################
#Edit: config/database.yml
# Production: username: redmine
# password: my_password
####################################################

yum install -y gcc zlib zlib-devel
cd /usr/local/src/ 

# If you get curl SSL error use insecure mode

echo insecure >> ~/.curlrc
curl -L https://get.rvm.io | bash -s stable --ruby

# How to setup rubygems

cd /usr/local/src
wget http://rubyforge.org/frs/download.php/75309/rubygems-1.8.10.tgz
tar -zxvf rubygems-1.8.10.tgz
cd rubygems-1.8.10
ruby setup.rb

# Now install bundle using gem

gem install bundle
cd /data/www/redmine/
bundle install --without development test postgresql sqlite

# Install ImageMagick from source if you recieve version conflict
congiure ImageMagick-6.8.0 from source
Download source

./configure  && make && make install

Problem:
before doing gem install bundle
Make sure that `gem install rmagick -v ‘2.13.1’` succeeds before bundling.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

Solution:

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
gem install rmagick -v '2.13.1'

Building native extensions. This could take a while…
Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1…
Installing RDoc documentation for rmagick-2.13.1…

# was succesfull

bundle install --without postgresql sqlite test development

Fetching gem metadata from http://rubygems.org/….

tcp_server.rb:16:in `connect’: no such file to load — thin/connection (LoadError)

How to install redmine Plugin Backlog

Redmine Plugin “Backlog”

download plugin inside plugins folder /data/www/redmine/plugins/backlog_redmine
cd /data/www/redmine/plugins/backlog_redmine

yum install libxml2-devel libxslt-devel
bundle install

gem install nokogiri

Problem: libxml2 is missing
libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
Solution: yum install libxml2-devel

Problem
libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
Solution:
yum install libxslt-devel

Problem:
Could not find gem ‘ZenTest (= 4.5.0) ruby’ in the gems available on this machine.
Run `bundle install` to install missing gems.
Solution:

gem install ZenTest --version 4.5.0

Problem:
Could not find gem ‘capybara (>= 0) ruby’ in the gems available on this machine.
Run `bundle install` to install missing gems.
Solution:

gem install capybara --no-ri --no-rdoc

Problem
You cannot specify the same gem twice with different version requirements. You specified: test-unit (>= 0) and test-unit (= 1.2.3)
solution:
vi Gemfile (comment out test)

Problem:
Could not find gem ‘inifile (>= 0) ruby’ in the gems available on this machine.
Solution
Run `bundle install` to install missing gems.

Problem
Could not find gem ‘cucumber-rails (>= 0) ruby’ in the gems available on this machine.
Run `bundle install` to install missing gems.
Solution:

gem install cucumber-rails

Problem

rake db:migrate_plugins RAILS_ENV=production
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/yaml.rb:56:in `‘:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
rake aborted!
You have already activated rake 10.0.2, but your Gemfile requires rake 10.0.1. Using bundle exec may solve this.

Solution: a)

bundle exec rake db:migrate_plugins RAILS_ENV=production

Solution: a-1)

gem install activerecord-mysql-adapter

Problem:
Could not find gem ‘gherkin (= 2.6.8) ruby’ in the gems available on this machine.
Run `bundle install` to install missing gems.
Solution:

gem install gherkin --version 2.6.8

Solution
:

bundle install
rake exec redmine:plugins:migrate RAILS_ENV=production

Backlog is installed to configure.

########## Copy paste (configure redmine.conf for apache)
########## Please be aware that Passenger module should be copied while installation so that you donot make mes of
########## LoadModules so location , root and ruby directory

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.18/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.18
PassengerRuby /usr/bin/ruby

ServerName redmine.ashishnepal.com
DocumentRoot /data/www/redmine/public

AllowOverride all #loosen apache security
Options -MultiViews #turn of multi views allow from all

ErrorLog “| /usr/sbin/rotatelogs /data/etc/httpd/logs/redmine-error.%Y-%m-%d.log 86400”
CustomLog “| /usr/sbin/rotatelogs /data/etc/httpd/logs/redmine-access.%Y-%m-%d.log 86400” “%h %l %u %t %D “%r” %>s %b “%{Referer}i” “%{User-Agent}i””

Powered by WordPress & Theme by Anders Norén