{"id":154,"date":"2011-04-08T17:19:39","date_gmt":"2011-04-08T21:19:39","guid":{"rendered":"http:\/\/www.samontab.com\/web\/?p=154"},"modified":"2012-12-18T04:49:58","modified_gmt":"2012-12-18T07:49:58","slug":"how-to-install-redmine-1-1-2-on-ubuntu-server-10-04","status":"publish","type":"post","link":"https:\/\/www.samontab.com\/web\/2011\/04\/how-to-install-redmine-1-1-2-on-ubuntu-server-10-04\/","title":{"rendered":"How to install Redmine 1.1.2 on Ubuntu Server 10.04"},"content":{"rendered":"<p><a title=\"redmine\" href=\"http:\/\/www.redmine.org\/\" target=\"_blank\">Redmine<\/a> is an excellent project management tool written using Ruby on Rails. It provides everything you need to organise your workplace or personal projects. Once you see it <a title=\"Redmine demo\" href=\"http:\/\/demo.redmine.org\/\" target=\"_blank\">working<\/a> you definitely will want to use it on your own projects. Everything is great until you want to install it since redmine only works with very specific versions of its dependencies. There are many steps that you need to take into consideration, even if you install the outdated version in the repositories. In this guide, I will show you how to install redmine 1.1.2 (the latest version at the time of writing) on Ubuntu Server 10.04 32 bits (latest LTS version at the time of writing).<\/p>\n<p>Make sure that you installed <a title=\"Ubuntu Server\" href=\"http:\/\/www.ubuntu.com\/business\/get-ubuntu\/download\" target=\"_blank\">Ubuntu Server 10.04<\/a> with SSH (optional) and LAMP support. Both can be selected to be automatically installed at the end of the normal Ubuntu Server 10.04 installation. Once it is installed, remember to update and upgrade your system.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo apt-get update\r\nsudo apt-get upgrade\r\n<\/pre>\n<p>First, let&#8217;s install some dependencies:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo apt-get install ruby1.8-dev rubygems1.8 libmysql-ruby libmysqlclient-dev rake libopenssl-ruby libapache2-mod-passenger imagemagick libmagickcore-dev libmagickwand-dev\r\n<\/pre>\n<p>Now we can install the required packages for ruby, or gems. Note that some packages will take a long time to install and provide no output, so just be patient. Also, you will see some warnings like <strong>No definition for X<\/strong>. Ignore those, they mean that some documentation was not installed, and we can live with that.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo gem install rails -v=2.3.5\r\nsudo gem install mysql\r\nsudo gem install ruby-openid\r\nsudo gem install i18n -v=0.4.2\r\nsudo gem install passenger\r\nsudo gem install rmagick\r\n<\/pre>\n<p>Now we have to prepare the database. Enter the MySQL console as root:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nmysql -uroot -p\r\n<\/pre>\n<p>Provide the root password. This is the password you set in the early LAMP installation. Now, inside the MySQL console, execute these commands:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncreate database redmine character set utf8;\r\ncreate user 'redmine'@'localhost' identified by 'myPassword';\r\ngrant all privileges on redmine.* to 'redmine'@'localhost';\r\nexit\r\n<\/pre>\n<p>Remember to change <strong>myPassword<\/strong> with your actual password. This is the one that will be used for the user redmine in the database redmine at localhost.<\/p>\n<p>Now it is time to get the redmine code. Execute the following commands to get redmine 1.1.2.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd ~\r\nwget http:\/\/rubyforge.org\/frs\/download.php\/74419\/redmine-1.1.2.tar.gz\r\ntar -xvzf redmine-1.1.2.tar.gz\r\ncd redmine-1.1.2\r\n<\/pre>\n<p>Now setup the database configuration file to match our current environment:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncp config\/database.yml.example config\/database.yml\r\nnano config\/database.yml\r\n<\/pre>\n<p>Put the details of the database on the specific fields, in particular username and password. Username should be <strong>redmine<\/strong> and password should be <strong>myPassword<\/strong> or the one you provided before. Make sure that you change both, production and development sections. When you are finished, just hold Control and then press X. This is the command for exiting nano. It will ask if you want to save the changes, just press y (as in yes) and hit enter. That&#8217;s it, file saved and back to the console.<\/p>\n<p><a href=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/database.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-156 alignnone\" title=\"database\" src=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/database-300x191.png\" alt=\"\" width=\"300\" height=\"191\" srcset=\"https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/database-300x191.png 300w, https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/database.png 643w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now do the same for configuring email:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncp config\/email.yml.example config\/email.yml\r\nnano config\/email.yml\r\n<\/pre>\n<p>For this example, we are going to use gmail, but you can use any email settings that you need. Make sure that address is smtp.gmail.com, port is changed to 587, domain is set to gmail.com (or your host if you use google apps) and that the user_name and password are your credentials. Also, make sure that you add a tls: true line. And finally, the most important part, is that you change login with <strong>plain<\/strong> in authentication.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nproduction:\r\n delivery_method: :smtp\r\n smtp_settings:\r\n address: smtp.gmail.com\r\n port: 587\r\n tls: true\r\n domain: gmail.com # or your domain\r\n authentication: :plain\r\n user_name: fancyUsername@gmail.com # or your domain\r\n password: secretPassword\r\n<\/pre>\n<p>For gmail to work, we need to install a script. Let&#8217;s get it:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo apt-get install git-core\r\nruby script\/plugin install git:\/\/github.com\/collectiveidea\/action_mailer_optional_tls.git\r\n<\/pre>\n<p>Let&#8217;s proceed with the installation:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nrake generate_session_store\r\nsudo mkdir \/opt\/redmine\r\ncd \/opt\/redmine\r\nsudo cp -r ~\/redmine-1.1.2 .\r\ncd redmine-1.1.2\r\nsudo RAILS_ENV=production rake db:migrate\r\nsudo RAILS_ENV=production rake redmine:load_default_data\r\n<\/pre>\n<p>Press enter to accept the default language (English) and then execute the following:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo chown -R www-data:www-data files log tmp public\/plugin_assets\r\nsudo chmod -R 755 files log tmp public\/plugin_assets\r\nsudo nano \/etc\/apache2\/mods-available\/passenger.conf\r\n<\/pre>\n<p>Add this line inside the &lt;IfModule mod_passenger.c&gt; tag:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nPassengerDefaultUser www-data\r\n<\/pre>\n<p><a href=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/passenger.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-162 alignnone\" title=\"passenger\" src=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/passenger-300x192.png\" alt=\"\" width=\"300\" height=\"192\" srcset=\"https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/passenger-300x192.png 300w, https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/passenger.png 642w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now let&#8217;s configure apache:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/apache2\/sites-available\/default\r\n<\/pre>\n<p>Just before the closing tag, &lt;\/VirtualHost&gt;, add the following:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nRailsEnv production\r\nRailsBaseURI \/redmine\r\n<\/pre>\n<p><a href=\"..\/wp-content\/uploads\/2011\/04\/rails.png\"><img loading=\"lazy\" decoding=\"async\" title=\"rails\" src=\"..\/wp-content\/uploads\/2011\/04\/rails-300x191.png\" alt=\"\" width=\"300\" height=\"191\" \/><\/a><\/p>\n<p>Now we put a link to our application to be accessible from apache and restart it:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo ln -s \/opt\/redmine\/redmine-1.1.2\/public \/var\/www\/redmine\r\nsudo \/etc\/init.d\/apache2 restart\r\n<\/pre>\n<p>Some clean up&#8230;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd ~\r\nrm -r redmine-1.1.2\r\nrm redmine-1.1.2.tar.gz\r\n<\/pre>\n<p>The installation process is finished. Open a web browser in another computer and go to yourServerIP\/redmine and you should see the initial page of redmine. If it does not show, then something is wrong in your installation. Go back and carefully follow the steps from the beginning. If you do not know your IP address, just run ifconfig from the server.<br \/>\n<a href=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-160 alignnone\" title=\"screen\" src=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen-300x166.png\" alt=\"\" width=\"300\" height=\"166\" srcset=\"https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen-300x166.png 300w, https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen.png 904w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nClick on Sign-in. Enter <strong>admin<\/strong> for user and password. Now you are logged in as the redmine administrator. Go to <strong>Administration<\/strong> and then click on <strong>Information<\/strong>. You should see the following:<br \/>\n<a href=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-161 alignnone\" title=\"screen2\" src=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen2-300x207.png\" alt=\"\" width=\"300\" height=\"207\" srcset=\"https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen2-300x207.png 300w, https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/screen2.png 981w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nNote that Redmine 1.1.2 stable is installed correctly with RMagick and the directories that it needs are writeable. The only thing left to do here is to change the details of the administrator account (that is why there is one error sign), and start creating users and projects and manage them with this great tool. Once you change your administrator account, you should see no errors on the information page:<\/p>\n<p><a href=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/noerrors1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-164\" title=\"noerrors\" src=\"http:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/noerrors1-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/noerrors1-300x201.png 300w, https:\/\/www.samontab.com\/web\/wp-content\/uploads\/2011\/04\/noerrors1.png 981w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>And now you can enjoy all the features of this great project manager: Gantt charts, Roadmaps, wiki, file repositories, multiple project support, forums, and much more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Redmine is an excellent project management tool written using Ruby on Rails. It provides everything you need to organise your workplace or personal projects. Once you see it working you definitely will want to use it on your own projects. Everything is great until you want to install it since redmine only works with very [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,4],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-open-source","category-programming"],"_links":{"self":[{"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.samontab.com\/web\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}