This page is a guide to installing Redmine on either a virtual or actual installation of the Ubuntu operating system. If you follow all instructions correctly you will be installed your Redmine server successfully almost an hour.

If you are installing on a non-virtual Ubuntu instance, please skip this section.

Installing VirtualBox:

1.Download last version of Sun VirtualBox (version 3.0.10 or newer) tool in your system.2.Install to your system by following the instructions.

Installing Ubuntu on VirtualBox:

1.Download last version of Ubuntu(version 9.10 or newer) OS in your system.2.After installed VirtualBox on your system you will create a new virtual operating which will be Linux type and Ubuntu subtype. If you don't know anything about VirtualBox and/or its usage please refer to the google.

3.While installing Ubuntu you should type the related configurations as follows:(These all configurations are optional, you can give any name what you what.)Q: What is your name? A: Redmine ServerQ: What name do you want to use to login? A: redmineQ: Choose to password to keep your account safe? A: redmineQ: What is the name of this computer? A: redmine-serverChoose “Log in automatically.” radio button.

4.When you finished up installation all of them open up your new VirtualBox Ubuntu OS and open up terminal(console) screen and issuing these commands:

sudo apt-get updatesudo apt-get upgrade

Configuring VirtualBox:

1.If you want to reach your VirtualBox Ubuntu OS from different machine, you have to configure VirtualBox Ubuntu OS's network setting to Bridged Adapter. So you can reach your VirtualBox Ubuntu from internal IP address easily. Because it get's same IP block as you from DHCP easily. I mean your guest and host computer is same IP block as different network client.

2.If you had assigned a static IP to your Network Consult by giving your static ethernet MAC address, you have to assign unique MAC address your VirtualBox Ubuntu OS by Setting->Network->MAC address initialization box. By this MAC address, you can get static ip easily or you can configure your Ubuntu system to not use DHCP, instead of that you can assign static IP manually.

The following packages are required to install and run Redmine. Please install them by running apt-get as root:

sudo apt-get package-name

where package-name is each of:

apache2

apache2-threaded-dev

build-essential

libapache-dbi-perl

libapache2-mod-perl2

libapache2-svn

libdigest-sha1-perl

libgemplugin-ruby

libgemplugin-ruby1.8

libruby-extras

libruby1.8-extras

mongrel

mysql-server

rails

rake

ruby

rubygems

rubygems1.8

ruby1.8-dev

subversion

(Could someone please clean up this list?)

Package Installation and Setup:

1.Once you’ve installed the VirtualBox Ubuntu OS and updated it, you need to install a bunch of packages that we will prepare the server for the Redmine installation. So, as root, install the following packages by issuing:

sudo apt-get install sudo apt-get install

The packages we’re installing above are MySQL, phpMyAdmin, Rails, Ruby Gems, Mongrel and Ruby Dev environment.During the installation of the packages, when MySQL is installed, it will prompt you to create a password. Make sure you remember it. You will need it later to log in to the phpMyAdmin. To make simplicity you can set all passwords to “redmine”.

2.Create a new directory for Redmine. I put mine in /opt/redmine. And download last version of Redmine in it with wget command line downloader and extract it by issuing:

1.Now it’s time to create an empty database for Redmine. As you may have noticed, we installed phpMyAdmin earlier. phpMyAdmin will come in handy now. Head over to http://localhost/phpmyadmin. You should be presented with the phpMyAdmin login screen.Type in “root” and the MySQL “password” you created when installing MySQL.

2.First, click on “Databases” Then, at the bottom of the screen, in the “Create new database” text box create a new database called “redmine” and set “Collation” to “utf8_general_ci”.

3.Now, go back to the home screen and click on:“Privileges”“Add a new User” Fill out the “Login Information” boxes. Call your user “redmine”. Make sure you remember password you create here. It will be used when you set up the database connection details in Redmine.In the “Database for user” section, check “Create database with same name and grant all privileges” and click on the “Go” button.

4.Log out of phpMyAdmin.

Redmine Database Connection Configuration:

1.It’s time to configure the database connection. If you installed Redmine as I did above, then copy “config/database.yml.example” to “config/database.yml” and edit this file in order to configure your database settings for “production” environment. You’ll find the “database.yml.example” issuing:

Then save “database.yml” file and exit to the command prompt.On Ubuntu the “mysql.sock” is located in /var/run/mysqld/mysqld.sock, as noted in the “config” above. (The standard Redmine installation assumes the socket is located in “/opt/redmine/redmine-0.8.6/tmp/mysqld.sock”.)

4.Create the database structure, by running the following command under the application root directory(I mean “/opt/redmine/redmine-0.8.6”):

sudo rake db:migrate RAILS_ENV="production"

It will create the necessary tables in the redmine database you created earlier and an administrator account.

5.Insert default configuration data in database, by issuing:

sudo rake redmine:load_default_data RAILS_ENV="production"

(This step is optional but highly recommended, as you can define your own configuration from scratch. It will load default roles, trackers, statuses, work flows and enumerations. While loading default data command prompt wants to given language selection by you.)

Setting up Permissions:

1.The user who runs Redmine must have write permission on the following sub directories: “files”, “log”, “tmp” (create the last one if not present). You probably already have a “tmp” directory in /opt/redmine/redmine-0.8.6, but if you don’t, create one now by issuing:

sudo mkdir /opt/redmine/redmine-0.8.6

2.If you haven’t created a Redmine user, do it now by issuing:

sudo useradd redmine

3.Now, assuming you run Redmine with a redmine user, from your /opt/redmine/redmine-0.8.6 directory issue:

Once WEBrick has started, point your browser to http://localhost:3000/. Or, if you are using a browser on another computer than what you installed Redmine on, point your browser to http://192.168.1.10:3000/ (if that’s the IP address you gave your Redmine server). You should now see the application welcome page.

1.A more easy method for configuring a static IP address is to use your local DHCP server to assign a permanent IP to the VirtualBox OS mac address. That way you will not have to do anything inside VBS. Consult your network administrator.

2.Or you should learn configuration parameters as given below, and can configure your system to get static IP address:The desired IP addressNetwork mask and broadcast addressGateway addressYour local DNS server address(es)

1.Before configure the email support of Redmine, we should download sendmail application for Ubuntu, issue:

sudo apt-get install sendmailsudo sendmailconfig (Answer Yes to all questions which will be asked you)

2.It’s time to configure the server connection. Copy “config/email.yml.example” to “config/email.yml” and edit this file in order to configure your database settings for “production” environment. You’ll find the “email.yml.example” issue:

5.It’s time to configure the “environmet.rb” configuration. Open up the “environment.rb” and change “config.action_mailer.perform_deliveries = false” to “config.action_mailer.perform_deliveries = true” then save and close the “environment.rb”.

Subversion Installation and Configuration:

1.Before configure the subversion support of Redmine, we should download subversion application for Ubuntu, issue:

sudo apt-get install subversion

2.If your Redmine can't find the “subversion” command you can help to find by issuing:· > sudo cd /opt/redmine/redmine-0.8.6/config· > sudo gedit environment.rb· Add ENV['PATH'] = "#{ENV['PATH']}:/subversion/path" line in it.· Save and close the “environment.rb”

2.Your “crontab” file will be presented. This is the list of programs that start at certain times or at boot. Add the following to the “crontab” (all on one line):@reboot cd /opt/redmine/redmine-0.8.6 ; rm -f log/mongrel.pid ; mongrel_rails start -e production -p 3000 -d

Some of the above material comes from Macada's wiki, licenced under the GNU Free Documentation License 1.2. See Redmine in Ubuntu Jaunty 9.04 by David 'macada', last modified 2010-02-08, accessed 2010-05-26.