Redmine, Installing RVM, Ruby on Rails, and Passenger on Ubuntu

1-
apt-get update
apt-get upgrade
apt-get install curl libcurl3 git-core liberror-perl sqlite3 build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf apache2 apache2-dev libapr1-dev libaprutil1-dev libcurl4-openssl-dev libmysqlclient-dev libmagickcore-dev libmagickwand-dev

2-

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
locate .bashrc
cp .bashrc .bashrc.origional
echo ‘[[ -s “$/usr/local/rvm/scripts/rvm” ]] && . “$/usr/local/rvm/scripts/rvm”‘ >> ~/.bashrc
source /etc/profile.d/rvm.sh
type rvm | head -1
rvm install ruby-1.9.3
rvm use 1.9.3 –default
a2enmod rewrite
a2enmod proxy

3-

gem install passenger bundler –no-ri –no-rdoc
passenger-install-apache2-module
vi /etc/apache2/apache2.conf                       ADD THE passenger LOAD INFORMATION HERE
vi /etc/apache2/sites-available/redmine            CREATE SIMPLE VHOST HERE

<VirtualHost *:80>
ServerName redmine.com
# !!! Be sure to point DocumentRoot to ‘public’!
DocumentRoot /var/www/redmine/public
<Directory /var/www/redmine/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
a2ensite redmine
service apache2 restart

4-

apt-get install mysql-server
cd /var/www/
mkdir redmine
cd redmine/
wget http://rubyforge.org/frs/download.php/76495/redmine-2.1.2.tar.gz
tar -xzvf redmine-2.1.2.tar.gz
cd redmine-2.1.2/
mv * ../
cd ..
bundle install

5-

mysql -u root -p

CREATE database redmine;
cd config/
cp database.yml.example database.yml
vi database.yml                                    USE mysql2 as adapter and edit password field
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data

Create Host entry and test with your own system
sudo vi /etc/hosts

192.168.106.139 redmine.com
192.168.106.139 http://www.redmine.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
———————————————
After that you can access your redmine with   http://redmine.com

Completed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s