How to install Redmine 1.1.2 on Ubuntu Server 10.XX
follow the steps bellow and see how easly and step by step you are going to install and configure redmine on your local machine:
1 : sudo apt-get update
2 : sudo apt-get upgrade
3 : sudo apt-get install ruby1.8-dev rubygems1.8 libmysql-ruby libmysqlclient-dev rake libopenssl-ruby libapache2-mod-passenger imagemagick libmagickcore-dev libmagickwand-dev
4 : sudo gem install rails -v=2.3.5
if it requires the Ruby version v >= 1.3.1
Then follow the steps:
4.a: Install the following packages for ruby
sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8
We need to create some symlinks from the install to locations every programme would look for
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
sudo ln -s /usr/bin/ri1.8 /usr/bin/ri
sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb
Check Ruby Version
4.b: If you want to check ruby version use the following command
ruby -v
####################### Rubygems ###################
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool designed to easily manage the installation of gems, and a server for distributing them.
RubyGems Features
Easy Installation and removal of RubyGems packages and their dependents.
Management and control of local packages
Package dependency management
Query, search and list local and remote packages
Multiple version support for installed packages
Web-based interface to view the documentation for your installed gems
Easy to use interface for building gem packages
Simple server for distributing your own gem packages
you can download latest rubygems
4.c: wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
4.d: tar xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
Install rubygem using the following command
sudo ruby setup.rb
This will complete the rubygem installation.
Now create a symbolic link using the following command
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Check gem version using the following command
gem -v
Update gem packages using the following command
sudo gem update --system
4.e: now repeat the step 4
gem install rails -v=3.2.5
you will see some warnings like No definition for X. Ignore those, they mean that some documentation was not installed, and we can live with that.
5 : sudo gem install mysql
6 : sudo gem install ruby-openid
7 : sudo gem install i18n -v=0.4.2
8 : sudo gem install passenger
9 : sudo gem install rmagick
you will see some warnings like No definition for X. Ignore those, they mean that some documentation was not installed, and we can live with that.
10 : Enter the MySQL console as root:
mysql -u root -p
password:
11 : inside the MySQL console, execute these commands:
11.a) create database redmine character set utf8;
11.b) create user 'redmine'@'localhost' identified by 'redmine@123';
11.c) grant all privileges on redmine.* to 'redmine'@'localhost';
exit from mysql.
Remember to change myPassword with your actual password. This is the one that will be used for the user redmine in the database redmine at localhost.
12 : Execute the following commands to get redmine 1.1.2.
server@root# wget http://rubyforge.org/frs/download.php/74419/redmine-1.1.2.tar.gz
download completed
then
13 : tar -xvzf redmine-1.1.2.tar.gz
14 : cd redmine-1.1.2
15 : Now setup the database configuration file to match our current environment:
cp config/database.yml.example config/database.yml
vim config/database.yml
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: redmine@123
encoding: utf8
development:
adapter: mysql
database: redmine_development
host: localhost
username: redmine
password: redmine@123
encoding: utf8
save and exit!
16 : generate session and db migration:
rake generate_session_store
If you have a problem by installing Redmine 1.2.2:
rake aborted!
uninitialized constant Gem::SyckDefaultKey
then run the following command:
sudo gem update --system 1.3.7
rake generate_session_store
sudo mkdir /opt/redmine
cd /opt/redmine
sudo cp -r ~/redmine-1.1.2 .
cd redmine-1.1.2
sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake redmine:load_default_data
Note: Press enter to accept the default language (English) and then execute the following:
17 : Now do the following
sudo chown -R www-data:www-data files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
sudo nano /etc/apache2/mods-available/passenger.conf
Add this line inside the <IfModule mod_passenger.c> tag:
18 : PassengerDefaultUser www-data
19 : Now let’s configure apache:
sudo nano /etc/apache2/sites-available/default
20 : Just before the closing tag, </VirtualHost>, add the following:
RailsEnv production
RailsBaseURI /redmine
21 : Now we put a link to our application to be accessible from apache and restart it:
sudo ln -s /opt/redmine/redmine-1.1.2/public /var/www/redmine
sudo /etc/init.d/apache2 restart
22 : now open your browser and type:
http://localhost/redmine
username: admin
password: admin
Thats it!
No comments:
Post a Comment