Install redmine in RHEL6 and RH based distributions

Redmine

Step 1: Install packages needed
su
yum install mysql-server ruby rubygems httpd ruby-devel mysql-devel gcc-c++ curl-devel httpd-devel apr-devel apr-util-devel

Step 2: Enable services at boot-time
apache server
chkconfig httpd on

mysql server
chkconfig mysqld on

Step 3: Open needed ports

open /etc/sysconfig/iptables in your config file and add these rules

-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

-A INPUT -m state –state NEW -m tcp -p tcp –dport 3000 -j ACCEPT

Step 4: Install ruby libs
gem install rails -v=2.3.5
gem install rack -v=1.0.1
gem install mysql
gem install -v=0.4.2 i18n
gem install passenger

Step 5: Download redmine
wget http://rubyforge.org/frs/download.php/74419/redmine-1.1.2.tar.gz

step 6: add redmine user

groupadd redmine
useradd -g redmine redmine
passwd redmine

step 7: decompress redmine
tar -xzvf redmine-1.1.2.tar.gz

step 8: move to destination dir
cd <dest_dir>

step 9: copy redmine
cp -R <redmine_uncompress_dir>/* ./

Step 10: create a new database and a new username in mysql

step 11: configure redmine
cd config/
mv database.yml.example database.yml
open database.yml #complete the data needed
cd ..

step 12: generate session store secret
rake generate_session_store

step 13: generate database structure
RAILS_ENV=production rake db:migrate

step 14: generate default configuration
RAILS_ENV=production rake redmine:load_default_data

step 15 Setting up permissions
mkdir tmp public/plugin_assets #in case of the dirs doesn’t exists
sudo chown -R redmine:redmine files log tmp public/plugin_assets # change redmine:redmine if you create a diferent user
sudo chmod -R 755 files log tmp public/plugin_assets

step 16 check redmine installation
ruby script/server webrick -e production
open in your browser :3000
login is admin pass is admin too

step 17 enable mod_cgi in apache
check in /etc/httpd/conf/httpd.conf if exist the line
LoadModule cgi_module modules/mod_cgi.so

step 18 create public/dispatch.cgi file
mv public/dispatch.cgi.example public/dispatch.cgi
edit the first line
from
#!/usr/bin/env ruby
to
#!/usr/bin/ruby

step 19 grant execution rights
chmod 755 public/dispatch.cgi

step 20 grant apache permissions
chown -R apache:apache files log tmp vendor

step 21 set production state in file config/environment.rb
uncoment the line ENV[‘RAILS_ENV’] ||= ‘production’

step 22 configure passenger
passenger-install-apache2-module and follow instructions

if you get an error check this http://stackoverflow.com/questions/5585583/problem-in-installing-passenger
In fact, just need to edit the ” /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/platform_info/apache.rb” file, and replace “test_exe_outdir” with “tmpexedir”.

step 23 Enable cgi in SeLinux
setsebool -P httpd_enable_cgi 1

step 24 add virtual host in apache config file
ServerName redmine..com
ServerAdmin webmaster@.com
DocumentRoot /live/redmine/public/
ErrorLog logs/redmine_error_log
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all

Step 25: close 3000 port editing /etc/sysconfig/iptables file

-A INPUT -m state –state NEW -m tcp -p tcp –dport 3000 -j ACCEPT

Step 26: reboot or restart services

Redmine Working

Keysigning Fosdem quick howto

step 1: Install gnugp

debian: apt-get install gnupg

fedora: yum install gnupg

step2: create your key

gpg --gen-key

you’ll have to answer several questions:

kind and key size that do you want: defaults appears to be good enough.

how long the key will be valid : your decision mine never expires.

your name and surname (Use your real name Do you trust in a person called Bart Simpson or Zero Trust?)

your email address

comment: optional

A passphrase: Don’t forget, if you lost your passphrase your encripted data will useless .

Trick: Open a flash video or run a virtual machine for create entropy .

gpg generated key

step 3: Generate a revoke key

changue mykey for your key fingerprint last characters

gpg –output revoke.asc –gen-revoke mykeyfingerprint

step 4: Export public and private keys

exporting private key

gpg –output private.gpg –export-secret-key mykeyfingerprint

exporting public key

gpg –output public.gpg –export mykeyfingerprint

step 5: Backup tour keys

Store your keys into a Floppy disk, usb memory, CD, or wherever, you can print your keys for security.

step 6: Send your public key to fosdem server

the instructions appear in the fosdem site http://fosdem.org and check the public key uploaded

step 7: Print the keys list

a few days before the fosdem start will appear a document to print. (https://ksp.fosdem.org/files/ksp-fosdem2011.txt)

trick try to print the document in the minor number of pages.

step 8: Keysinging Event

Stay at time.

Wear warm clothing.

if you come later  try to find your position asking the key numbers to the participants try to Maintain the order easy for you easy for everyone

keysinging positions

fosdem 2011 keysigning

step 9; Import keys

After the Fosdem you’ll receive several emails signing your public key,  you must import the public keys.

Download the key hashes from https://ksp.fosdem.org/files/ksp-fosdem2011-keyring.asc.bz2

how?

wget –no-check-certificate https://ksp.fosdem.org/files/ksp-fosdem2011-keyring.asc.bz2

bunzip  ksp-fosdem2011-keyring.asc.bz2

gpg –import ksp-fosdem2011-keyring.asc

now your have all the public keys in your ring

step 10: parse fosdem keys

pass your paper maks to a new copy of  the txt keys file

I create this perl script in order to get the key hashes to sing

fosdemparse.pl

unzip and execute

./fosdemparse.pl <path to your file>

this script show the key hashes to

step 11: configure your sSMTP

CAFF sends the sing keys using your system mail transfer agent (MTA), nowadays using your ISP ip address is a warranty  of appears in the receiver  spam box

install sSMTP

on debian: apt-get install ssmtp

on fedora:

yum install ssmtp

(select ssmtp)

alternatives –config mta

configure sSMTP : https://wiki.archlinux.org/index.php/SSMTP

step 12: configure CAFF

install caff

on debian: apt-get install signing-party

on fedora: yum install pgp-tools

now we’ll configure caff

first we’ll execute caff

caff

this creates a config file named .caffrc in your home folder.

edit .caffrc file

gedit $HOME/.caffrc

complete the config file reading the instructions.

final step: send the keys

simply execute caff and paste your fosdemparse.pl output.

enjoy writing your password several times.