10/19/2009

Redmine + PostgreSQL installation notes.

PostgreSQL install
==================
yum install postgresql postgresql-devel postgresql-server postgresql-contrib

userdel postgres
To change home directory for postgres user from /var/lib/postgres to /home/postgres

useradd postgres
passwd postgres

mkdir /usr/local/pgsql
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su postgres
initdb -D /usr/local/pgsql/data -E utf-8

su - postgres
vi .bash_profile
add the following lines and save.
###
export PATH="$PATH":/usr/local/pgsql/bin
export POSTGRES_HOME=/usr/local/pgsql
export PGLIB=$POSTGRES_HOME/lib
export PGDATA=$POSTGRES_HOME/data
export MANPATH="$MANPATH":$POSTGRES_HOME/man
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB"
###

pg_ctl -D /usr/local/pgsql/data -l logfile start

psql -e
postgres=# CREATE DATABASE redmine;
postgres=# \c redmine;
postgres=# ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";


Redmine install
===============

Ruby
====
yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri

Rubygems
========
wget http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-1.3.4.tgz
tar xzvf rubygems-1.3.4.tgz
cd rubygems-1.3.4
ruby setup.rb
gem --version

Ruby on Rails
=============
gem install rails


useradd redmine
passwd redmine
su - redmine

wget http://rubyforge.org/frs/download.php/63583/redmine-0.8.5.tar.gz
tar xvfz redmine-0.8.5.tar.gz
cd redmine-0.8.5

/home/redmine/redmine-0.8.5/config
cp database.yml.example database.yml
vi database.yml
Edit the file like following and save.
###
production:
adapter: postgresql
database: redmine
host: localhost
username: postgres
password: anything_you_like
encoding: utf8
###

gem install postgres-pr
cd /home/redmine/redmine-0.8.5
rake db:migrate RAILS_ENV="production" &

That's it!!

10/12/2009

How to fix MBR problem

I have a lap top PC with Ubuntu 9.04 installed.

Today I tried to install Windows on my lap top to use as dual boot OS.

I followed the instruction written by here. When I boot with Windows XP CD and choose the partition to install Windows, I could not choose the free space. After that I reboot the laptop. then, Ubuntu couldn't boot up because Windows installation overwrote the MBR!

After the research to recover my MBR, I followed the instruction with this link and got around the issue.

http://ubuntuforums.org/showthread.php?t=224351



Windows sucks!!


To summarlize the solution, the commands I did are below.

1. Boot up with the Ubuntu live CD. In the terminal,

sudo grub

find /boot/grub/stage1

The output is like hd0,0
root (hd?,?)
# e.g. root (hd0,0)
setup (hd?)
# e.g. root (hd0)
quit

That's it!

How to fix the apt-get error on Ubuntu.

I got a following error when I tried to install something using apt-get.



'E:Encountered a section with no Package: header, Eroblem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hardy-updates_multiverse_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.'


I checked the web for the solution and found this command worked for me.

sudo rm /var/lib/apt/lists/* -vf

sudo apt-get update

Referral

http://ubuntuforums.org/showthread.php?t=863742

10/07/2009

Office 2007 replaces Outlook Express dictionary English to French!

Today I was asked that my colleague have a problem with spell check in Outlook Express.

She told me that after I installed Microsoft Office 2007 to her PC, the spell checker got weird. I checked her PC and found that the dictionary of Outlook Express changed English to French. I researched the web and found the solution.

There is a fix program. You can access from here