HowTo Install Redmine in Ubuntu » History » Version 28
Dave Thomas, 2011-06-10 21:38
1 | 1 | Umit Uzun | {{>toc}} |
---|---|---|---|
2 | |||
3 | 22 | Anthony C | h1. Ubuntu 10.04 (and 10.04.1) using Passenger |
4 | |||
5 | The installation assumes that the web server and database are already in place, so you probably want to install the LAMP stack first if you don't already have it: |
||
6 | |||
7 | > $ sudo tasksel install lamp-server |
||
8 | |||
9 | Also, the default AppArmor configuration can get in the way, so you may need to set the mysqld profile to complain: |
||
10 | |||
11 | > $ sudo aa-complain /usr/sbin/mysqld |
||
12 | |||
13 | 14 | allen yeh | As of 10.04, Redmine is available through Ubuntu's package manager, and installation is simple: |
14 | 3 | Sam Wilson | |
15 | 14 | allen yeh | > $ sudo apt-get install redmine redmine-mysql subversion |
16 | 3 | Sam Wilson | |
17 | 1 | Umit Uzun | The second package, _redmine-mysql_, can be replaced by either _redmine-pgsql_ or _redmine-sqlite_ if you want to use either of those databases. |
18 | |||
19 | 22 | Anthony C | The installation process should prompt you for all the interesting details. |
20 | |||
21 | 1 | Umit Uzun | Redmine will now be installed in @/usr/share/redmine@ and @/etc/redmine@ |
22 | |||
23 | 24 | John Hogenmiller | Note: The package with Ubuntu is stuck in the 0.9.x branch for now. A PPA exists that has the 1.1 branch here: https://launchpad.net/~ondrej/+archive/redmine |
24 | |||
25 | To install redmine using the PPA: |
||
26 | |||
27 | sudo add-apt-repository ppa:ondrej/redmine |
||
28 | sudo apt-get update |
||
29 | sudo apt-get install redmine |
||
30 | |||
31 | 27 | Joshua Villagomez | Note: If your server is behind a firewall, you will need to export your firewall settings before running @add-apt-repository@. Otherwise, the command will hang. |
32 | Run the following <pre>export http_proxy="http://proxy.your.server:port" and export https_proxy="http:proxy.your.server:port".</pre> |
||
33 | |||
34 | 28 | Dave Thomas | You will also need to install the Passenger apache module. |
35 | |||
36 | > sudo apt-get install libapache2-mod-passenger |
||
37 | |||
38 | 22 | Anthony C | If you set your AppArmor mysqld profile to complain you ought to set it back to enforce: |
39 | |||
40 | > $ sudo aa-enforce /usr/sbin/mysqld |
||
41 | |||
42 | 1 | Umit Uzun | h2. Configuration |
43 | |||
44 | 22 | Anthony C | Symlink @/usr/share/redmine/public@ to your desired web-accessible location. E.g.: |
45 | |||
46 | > $ sudo ln -s /usr/share/redmine/public /var/www/redmine |
||
47 | |||
48 | By default, passenger runs as 'nobody', so you'll need to fix that. In @/etc/apache2/mods-available/passenger.conf@, add: |
||
49 | |||
50 | > PassengerDefaultUser www-data |
||
51 | |||
52 | You'll also need to configure the @/var/www/redmine@ location in @/etc/apache2/sites-available/default@ by adding: |
||
53 | |||
54 | <pre><Directory /var/www/redmine> |
||
55 | RailsBaseURI /redmine |
||
56 | PassengerResolveSymlinksInDocumentRoot on |
||
57 | </Directory> |
||
58 | </pre> |
||
59 | |||
60 | Enable passenger: |
||
61 | |||
62 | > $ sudo a2enmod passenger |
||
63 | |||
64 | 25 | Maxim Nikolaevich | Restart apache2 |
65 | |||
66 | > $ sudo /etc/init.d/apache2 restart |
||
67 | |||
68 | and you should be able to access Redmine at: http://redmine.server.ip.address/redmine |
||
69 | 22 | Anthony C | |
70 | If you receive a "403: Forbidden" error after setting up Redmine, the Redmine 'public' folder may have incorrect permissions set. The executable bit on the public folder must be enabled or you will receive a "403: Forbidden" error when attempting to access Redmine. |
||
71 | |||
72 | > $ sudo chmod a+x /usr/share/redmine/public |
||
73 | |||
74 | h1. Ubuntu 10.4 using mod_cgi |
||
75 | |||
76 | The installation assumes that the web server and database are already in place, so you probably want to install the LAMP stack first if you don't already have it: |
||
77 | |||
78 | > $ sudo tasksel install lamp-server |
||
79 | |||
80 | Also, the default AppArmor configuration can get in the way, so you may need to set the mysqld profile to complain: |
||
81 | |||
82 | > $ sudo aa-complain /usr/sbin/mysqld |
||
83 | |||
84 | As of 10.04, Redmine is available through Ubuntu's package manager, and installation is simple: |
||
85 | |||
86 | > $ sudo apt-get install redmine redmine-mysql subversion |
||
87 | |||
88 | The second package, _redmine-mysql_, can be replaced by either _redmine-pgsql_ or _redmine-sqlite_ if you want to use either of those databases. |
||
89 | |||
90 | The installation process should prompt you for all the interesting details. |
||
91 | |||
92 | Redmine will now be installed in @/usr/share/redmine@ and @/etc/redmine@ |
||
93 | |||
94 | If you set your AppArmor mysqld profile to complain you ought to set it back to enforce: |
||
95 | |||
96 | > $ sudo aa-enforce /usr/sbin/mysqld |
||
97 | |||
98 | h2. Configuration |
||
99 | |||
100 | 3 | Sam Wilson | > Using Ubuntu Server 10.04.1, configuring Redmine via mod_cgi as described in this section does not seem to work. If you can successfully make this work, please update these instructions! Otherwise follow the instructions in the next section for installing on Ubuntu 10.04 using Passenger if mod_cgi does not work for you. |
101 | |||
102 | Symlink @/usr/share/redmine/public@ to your desired web-accessible location. E.g.: |
||
103 | |||
104 | > $ sudo ln -s /usr/share/redmine/public /var/www/redmine |
||
105 | |||
106 | The other files that you need to modify/create are as follows: |
||
107 | |||
108 | @/etc/redmine/default/database.yml@: |
||
109 | 1 | Umit Uzun | |
110 | 14 | allen yeh | <pre> |
111 | 6 | Roger Lipscombe | production: |
112 | adapter: mysql |
||
113 | 5 | Roger Lipscombe | database: redmine |
114 | 14 | allen yeh | host: localhost |
115 | 5 | Roger Lipscombe | username: redmine |
116 | password: pa55w0rd |
||
117 | encoding: utf8 |
||
118 | </pre> |
||
119 | |||
120 | @/usr/share/redmine/public/dispatch.cgi@: |
||
121 | |||
122 | <pre> |
||
123 | #!/usr/bin/ruby |
||
124 | |||
125 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) |
||
126 | 20 | Peter Hobor | |
127 | 5 | Roger Lipscombe | require "dispatcher" |
128 | |||
129 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) |
||
130 | Dispatcher.dispatch |
||
131 | </pre> |
||
132 | |||
133 | @/usr/share/redmine/public/.htaccess@: |
||
134 | 15 | Spenser Gilliland | |
135 | 5 | Roger Lipscombe | <pre> |
136 | RewriteEngine On |
||
137 | RewriteBase /redmine |
||
138 | RewriteRule ^$ index.html [QSA] |
||
139 | RewriteRule ^([^.]+)$ $1.html [QSA] |
||
140 | RewriteCond %{REQUEST_FILENAME} !-f |
||
141 | 17 | Tim M | RewriteRule ^(.*)$ dispatch.cgi [QSA,L] |
142 | </pre> |
||
143 | |||
144 | And that's it! If these instructions didn't work for you, please expand them to include whatever is needed. |
||
145 | 5 | Roger Lipscombe | |
146 | 14 | allen yeh | h1. Redmine Installation on Virtual or Normal Ubuntu < 10.04 |
147 | 1 | Umit Uzun | |
148 | 21 | Graham King | 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 have installed your Redmine server successfully in almost an hour. |
149 | 1 | Umit Uzun | |
150 | 2 | Sam Wilson | h2. Step 1: Install Ubuntu |
151 | 1 | Umit Uzun | |
152 | 2 | Sam Wilson | If you are installing on a non-virtual Ubuntu instance, please skip this section. |
153 | 1 | Umit Uzun | |
154 | 2 | Sam Wilson | *Installing VirtualBox:* |
155 | |||
156 | 21 | Graham King | 1.Download the latest version of Sun VirtualBox (version 3.0.10 or newer). |
157 | 2.Install VirtualBox by following the instructions. |
||
158 | 1 | Umit Uzun | |
159 | *Installing Ubuntu on VirtualBox:* |
||
160 | |||
161 | 21 | Graham King | 1.Download the latest version of Ubuntu (version 9.10 or newer). |
162 | 2.After installing VirtualBox 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 Google. |
||
163 | 1 | Umit Uzun | |
164 | 21 | Graham King | 3.While installing Ubuntu you should enter the following configuration: |
165 | (This suggested configuration is optional, you can enter any names you want.) |
||
166 | 1 | Umit Uzun | Q: What is your name? A: Redmine Server |
167 | Q: What name do you want to use to login? A: redmine |
||
168 | Q: Choose to password to keep your account safe? A: redmine |
||
169 | Q: What is the name of this computer? A: redmine-server |
||
170 | Choose “Log in automatically.” radio button. |
||
171 | |||
172 | 21 | Graham King | 4.When you've finished the installation, open up your new VirtualBox Ubuntu OS and open up a terminal (console) screen and issue these commands: |
173 | 1 | Umit Uzun | > sudo apt-get update |
174 | > sudo apt-get upgrade |
||
175 | |||
176 | *Configuring VirtualBox:* |
||
177 | |||
178 | 21 | Graham King | 1.If you want to reach your VirtualBox Ubuntu OS from a different machine, you have to configure VirtualBox Ubuntu OS's network settings to Bridged Adapter. So you can reach your VirtualBox Ubuntu from an internal IP address easily. Because it get's the same IP block as you from DHCP easily. I mean your guest and host computer is same IP block as different network client. |
179 | 1 | Umit Uzun | |
180 | 21 | Graham King | 2.If you had assigned a static IP to your Network Consult by giving your static ethernet MAC address, you have to assign the unique MAC address your VirtualBox Ubuntu OS by Setting->Network->MAC address initialization box. By this MAC address, you can get a static IP easily or you can configure your Ubuntu system to not use DHCP, instead of that you can assign a static IP manually. |
181 | 1 | Umit Uzun | |
182 | 2 | Sam Wilson | h2. Step 2: Install Redmine |
183 | 1 | Umit Uzun | |
184 | 2 | Sam Wilson | Once you have a functioning Ubuntu operating system up and running, you can continue with installing Redmine. |
185 | 1 | Umit Uzun | |
186 | 2 | Sam Wilson | h3. Install dependencies |
187 | |||
188 | The following packages are required to install and run Redmine. Please install them by running @apt-get@ as root: |
||
189 | |||
190 | 26 | Caner Candan | >sudo apt-get install package-name |
191 | 2 | Sam Wilson | |
192 | where @package-name@ is each of: |
||
193 | * apache2 |
||
194 | * apache2-threaded-dev |
||
195 | * build-essential |
||
196 | * libapache-dbi-perl |
||
197 | * libapache2-mod-perl2 |
||
198 | * libapache2-svn |
||
199 | * libdigest-sha1-perl |
||
200 | * libgemplugin-ruby |
||
201 | * libgemplugin-ruby1.8 |
||
202 | * libruby-extras |
||
203 | * libruby1.8-extras |
||
204 | * mongrel |
||
205 | * mysql-server |
||
206 | * rails |
||
207 | * rake |
||
208 | * ruby |
||
209 | * rubygems |
||
210 | * rubygems1.8 |
||
211 | 1 | Umit Uzun | * ruby1.8-dev |
212 | 2 | Sam Wilson | * subversion |
213 | 1 | Umit Uzun | |
214 | _(Could someone please clean up this list?)_ |
||
215 | 2 | Sam Wilson | |
216 | h3. Package Installation and Setup |
||
217 | 16 | Ian Epperson | |
218 | 1 | Umit Uzun | 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: |
219 | > sudo apt-get install |
||
220 | 2 | Sam Wilson | > sudo apt-get install |
221 | 21 | Graham King | (_Surely some missing package names above?_) |
222 | 1 | Umit Uzun | |
223 | The packages we’re installing above are MySQL, phpMyAdmin, Rails, Ruby Gems, Mongrel and Ruby Dev environment. |
||
224 | 21 | Graham King | 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 phpMyAdmin. To make things simple you can set all passwords to “redmine”. |
225 | 1 | Umit Uzun | |
226 | 21 | Graham King | 2.Create a new directory for Redmine. I put mine in /opt/redmine. And download the latest version of Redmine in to it with the wget command line downloader and extract it by issuing: |
227 | 1 | Umit Uzun | > sudo mkdir /opt/redmine |
228 | > sudo cd /opt/redmine |
||
229 | > sudo wget http://rubyforge.org/frs/download.php/66633/redmine-0.8.6.tar.gz |
||
230 | > tar -xvf redmine-0.8.6.tar.gz |
||
231 | |||
232 | 16 | Ian Epperson | h3. Database Setup |
233 | 1 | Umit Uzun | |
234 | 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. |
||
235 | Type in “root” and the MySQL “password” you created when installing MySQL. |
||
236 | |||
237 | 21 | Graham King | 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”. |
238 | 1 | Umit Uzun | |
239 | 3.Now, go back to the home screen and click on: |
||
240 | “Privileges” |
||
241 | “Add a new User” |
||
242 | 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. |
||
243 | In the “Database for user” section, check “Create database with same name and grant all privileges” and click on the “Go” button. |
||
244 | |||
245 | 4.Log out of phpMyAdmin. |
||
246 | |||
247 | 16 | Ian Epperson | h3. Redmine Database Connection Configuration |
248 | 1 | Umit Uzun | |
249 | 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: |
||
250 | > sudo cd /opt/redmine/redmine-0.8.6/config |
||
251 | |||
252 | 2.So now, assuming you’re in the “/opt/redmine/redmine-0.8.6/config” directory, issue: |
||
253 | > sudo cp database.yml.example database.yml |
||
254 | |||
255 | 3.Then, open the “database.yml” file, issue: |
||
256 | > sudo gedit database.yml |
||
257 | … and edit it as in the example for a MySQL database below: |
||
258 | |||
259 | production: |
||
260 | adapter: mysql |
||
261 | socket: /var/run/mysqld/mysqld.sock |
||
262 | database: redmine |
||
263 | host: localhost |
||
264 | username: redmine |
||
265 | password: [password] |
||
266 | |||
267 | 21 | Graham King | Then save the “database.yml” file and exit to the command prompt. |
268 | 1 | Umit Uzun | On Ubuntu the “mysql.sock” is located in /var/run/mysqld/mysqld.sock, as noted in the “config” above. |
269 | (The standard Redmine installation assumes the socket is located in “/opt/redmine/redmine-0.8.6/tmp/mysqld.sock”.) |
||
270 | |||
271 | 21 | Graham King | 4.Create the database structure, by running the following command under the application root directory (I mean “/opt/redmine/redmine-0.8.6”): |
272 | 1 | Umit Uzun | > sudo rake db:migrate RAILS_ENV="production" |
273 | 21 | Graham King | It will create the necessary tables in the redmine database you created earlier and an administrator account. |
274 | 1 | Umit Uzun | |
275 | 21 | Graham King | 5.Insert the default configuration data in to the database, by issuing: |
276 | 1 | Umit Uzun | > sudo rake redmine:load_default_data RAILS_ENV="production" |
277 | 21 | Graham King | (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.) |
278 | 1 | Umit Uzun | |
279 | 16 | Ian Epperson | h3. Setting up Permissions |
280 | 1 | Umit Uzun | |
281 | 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: |
||
282 | > sudo mkdir /opt/redmine/redmine-0.8.6 |
||
283 | |||
284 | 2.If you haven’t created a Redmine user, do it now by issuing: |
||
285 | > sudo useradd redmine |
||
286 | |||
287 | 3.Now, assuming you run Redmine with a redmine user, from your /opt/redmine/redmine-0.8.6 directory issue: |
||
288 | > sudo chown -R redmine:redmine files log tmp |
||
289 | > sudo chmod -R 755 files log tmp |
||
290 | |||
291 | 16 | Ian Epperson | h3. Testing the Installation |
292 | 1 | Umit Uzun | |
293 | 1.It should all be working now. Test the installation by running the WEBrick web server issue: |
||
294 | > sudo cd /opt/redmine/redmine-0.8.6 |
||
295 | > sudo ruby script/server -e production |
||
296 | |||
297 | 21 | Graham King | Once WEBrick has started, point your browser to http://localhost:3000/. Or, if you are using a browser on a computer other than the one 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. |
298 | 1 | Umit Uzun | |
299 | *Log in:* |
||
300 | |||
301 | 1.Use default administrator account to log in: |
||
302 | Login : admin |
||
303 | Password : admin |
||
304 | |||
305 | 2.You can go to Admin & Settings to modify application settings. |
||
306 | |||
307 | 16 | Ian Epperson | h3. Setting Up Static IP |
308 | 1 | Umit Uzun | |
309 | 21 | Graham King | 1.An easier 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. |
310 | 1 | Umit Uzun | |
311 | 21 | Graham King | 2.Or you should determine the configuration parameters given below, and then you can configure your system to have a static IP address: |
312 | 1 | Umit Uzun | The desired IP address |
313 | Network mask and broadcast address |
||
314 | Gateway address |
||
315 | Your local DNS server address(es) |
||
316 | |||
317 | 16 | Ian Epperson | h3. Assigning Host Name and Domain for VirtualBox OS |
318 | 1 | Umit Uzun | |
319 | 21 | Graham King | 1.An easier method for adding your IP address - Host name pair configuration to your DNS server . Consult your network administrator. |
320 | 1 | Umit Uzun | |
321 | 2 | Sam Wilson | h2. Configuring the Passenger Apache module |
322 | 1 | Umit Uzun | |
323 | 21 | Graham King | Passenger is a module for apache2 that allows Apache to run Ruby on Rails applications. Install it thus: |
324 | 2 | Sam Wilson | |
325 | >$ sudo gem install passenger |
||
326 | |||
327 | Then go to the passenger apache2 module installation directory and run @passenger-install-apache2-module@ |
||
328 | |||
329 | > $ cd /var/lib/gems/1.X/gems/passenger-X.X.X/ |
||
330 | |||
331 | > $ sudo bin/passenger-install-apache2-module |
||
332 | |||
333 | Next, configure Apache: |
||
334 | |||
335 | In /etc/apache2/mods-available/passenger.load we will add next line |
||
336 | |||
337 | > LoadModule passenger_module /var/lib/gems/1.X/gems/passenger-X.X.X/ext/apache2/mod_passenger.so |
||
338 | |||
339 | We have to edit the conf of the passenger apache2 module in /etc/apache2/mods-available/passenger.conf |
||
340 | |||
341 | > PassengerRoot /var/lib/gems/1.X/gems/passenger-X.X.X |
||
342 | > PassengerRuby /usr/bin/ruby1.X |
||
343 | |||
344 | 21 | Graham King | And now we activate the module |
345 | 2 | Sam Wilson | |
346 | > $ sudo a2enmod passenger |
||
347 | |||
348 | Apache virtualhost for redmine web app |
||
349 | |||
350 | <pre> |
||
351 | <VirtualHost *:80> |
||
352 | ServerName redmine.server.com |
||
353 | |||
354 | DocumentRoot /var/www/redmine/public |
||
355 | |||
356 | ServerAdmin user@server.com |
||
357 | LogLevel warn |
||
358 | ErrorLog /var/log/apache2/redmine_error |
||
359 | CustomLog /var/log/apache2/redmine_access combined |
||
360 | |||
361 | <Directory /var/www/redmine/public> |
||
362 | Options Indexes FollowSymLinks MultiViews |
||
363 | AllowOverride None |
||
364 | Order allow,deny |
||
365 | allow from all |
||
366 | </Directory> |
||
367 | </VirtualHost> |
||
368 | </pre> |
||
369 | |||
370 | 1 | Umit Uzun | subversion server config in apache |
371 | |||
372 | 2 | Sam Wilson | <pre> |
373 | <VirtualHost *:80> |
||
374 | ServerName svn.server.com |
||
375 | ServerAdmin user@server.com |
||
376 | ErrorLog /var/log/apache2/svn_error |
||
377 | CustomLog /var/log/apache2/svn_access combined |
||
378 | <Location /project> |
||
379 | DAV svn |
||
380 | SVNPath /var/lib/svn/project |
||
381 | |||
382 | AuthType Basic |
||
383 | AuthName "Trac system for Server projects" |
||
384 | AuthUserFile "/var/lib/svn/.htpasswd" |
||
385 | Require valid-user |
||
386 | <LimitExcept GET PROPFIND OPTIONS REPORT> |
||
387 | Require valid-user |
||
388 | </LimitExcept> |
||
389 | </Location> |
||
390 | </Virtualhost> |
||
391 | </pre> |
||
392 | |||
393 | 16 | Ian Epperson | h2. Sendmail Server Configuration |
394 | 2 | Sam Wilson | |
395 | 21 | Graham King | 1.Before configuring email support for Redmine, we should download the sendmail application for Ubuntu, issue: |
396 | 1 | Umit Uzun | > sudo apt-get install sendmail |
397 | 21 | Graham King | > sudo sendmailconfig (Answer Yes to all questions which you will be asked) |
398 | 1 | Umit Uzun | |
399 | 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: |
||
400 | > sudo cd /opt/redmine/redmine-0.8.6/config |
||
401 | |||
402 | 3.So now, assuming you’re in the “/config” directory, issue: |
||
403 | > sudo cp email.yml.example email.yml |
||
404 | |||
405 | 4.Then, open the “email.yml” file, issue: |
||
406 | > sudo gedit email.yml |
||
407 | … and edit it as in the example for sendmail configuration below: |
||
408 | |||
409 | production: |
||
410 | delivery_method: :sendmail |
||
411 | sendmail_settings: |
||
412 | location: /usr/sbin/sendmail |
||
413 | arguments: -i -t |
||
414 | address: smtp.example.net |
||
415 | port: 25 |
||
416 | domain: example.net |
||
417 | authentication: :none |
||
418 | user_name: redmine@example.net |
||
419 | password: redmine |
||
420 | |||
421 | Then save “email.yml” file and exit to the command prompt. |
||
422 | |||
423 | 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”. |
||
424 | |||
425 | h2. Subversion Installation and Configuration |
||
426 | |||
427 | 21 | Graham King | 1.Before configuring Subversion support for Redmine, we should download the Subversion application for Ubuntu, issue: |
428 | 1 | Umit Uzun | > sudo apt-get install subversion |
429 | |||
430 | 2.If your Redmine can't find the “subversion” command you can help to find by issuing: |
||
431 | · > sudo cd /opt/redmine/redmine-0.8.6/config |
||
432 | · > sudo gedit environment.rb |
||
433 | · Add ENV['PATH'] = "#{ENV['PATH']}:/subversion/path" line in it. |
||
434 | · Save and close the “environment.rb” |
||
435 | |||
436 | 16 | Ian Epperson | h2. Start Application at Boot Time |
437 | 1 | Umit Uzun | |
438 | 1.To automatically start the application on booting your server you need to modify your “crontab”, issue: |
||
439 | > export EDITOR=gedit |
||
440 | > crontab -e |
||
441 | |||
442 | 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): |
||
443 | @reboot cd /opt/redmine/redmine-0.8.6 ; rm -f log/mongrel.pid ; mongrel_rails start -e production -p 3000 -d |
||
444 | |||
445 | 16 | Ian Epperson | h2. Backup |
446 | 1 | Umit Uzun | |
447 | 1.Running backups is always a good idea. Redmine backups should include: |
||
448 | 16 | Ian Epperson | * data (stored in your redmine database) |
449 | 1 | Umit Uzun | /usr/bin/mysqldump -u -p | gzip > /path/to/redmine/backup/db/redmine_`date +%y_%m_%d`.gz |
450 | 16 | Ian Epperson | * attachments (stored in the files directory of your Redmine install) |
451 | 1 | Umit Uzun | rsync -a /path/to/redmine/files /path/to/redmine/backup/files |
452 | |||
453 | 21 | Graham King | 2.Or you can use the bash shell to automate this kind of operation, issue: |
454 | 1 | Umit Uzun | > sudo cd /opt/redmine/redmine-0.8.6 |
455 | > sudo mkdir backup |
||
456 | > sudo mkdir backup/db |
||
457 | > sudo mkdir backup/files |
||
458 | > sudo gedit backup/runRedmineBackup.bash |
||
459 | |||
460 | 21 | Graham King | And after open “runRedmineBackup.bash” with gedit, write all commands below: |
461 | 16 | Ian Epperson | <pre> |
462 | 1 | Umit Uzun | #!/bin/bash |
463 | data=`date -I` |
||
464 | mysqldump --user=root --password="redmine" --all-databases | gzip > db/backup-$data.sql.gz |
||
465 | cd db |
||
466 | ftp -i -n << EOF |
||
467 | open ftpserver.example.net |
||
468 | user username password |
||
469 | bin |
||
470 | mput backup-$data.sql.gz |
||
471 | bye |
||
472 | EOF |
||
473 | 16 | Ian Epperson | </pre> |
474 | 21 | Graham King | Then save the “runRedmineBackup.bash” file and exit to the command prompt. After creation of runRedmineBackup.bash you can add this bash script to run continually between specified periods. Issue: |
475 | 1 | Umit Uzun | |
476 | > export EDITOR=gedit |
||
477 | > crontab -e |
||
478 | Add 0 0 * * 0 cd /opt/redmine/redmine-0.8.6/backup ; sh runRedmineBackup.bash commands to crontab to backup database weekly. |
||
479 | |||
480 | 21 | Graham King | For this to work without any permission problems you have to change the permissions of the files to maximum, issue: |
481 | 1 | Umit Uzun | |
482 | > sudo chmod -R 777 backup |
||
483 | > sudo chown -R redmine:redmine backup |
||
484 | |||
485 | 21 | Graham King | That's all. Now we have completely installed Redmine on our virtual Ubuntu OS and can reach it from any machine in our network easily. Congratulations..! |
486 | 1 | Umit Uzun | |
487 | h2. Sources & contributors. |
||
488 | 2 | Sam Wilson | |
489 | * Ümit Uzun 06/11/2009. |
||
490 | * 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":http://wiki.ousli.org/index.php/Redmine_in_Ubuntu_Jaunty_9.04 by David 'macada', last modified 2010-02-08, accessed 2010-05-26. |
||
491 | * Sam Wilson 2010-05-26, formatting changes. |
||
492 | 14 | allen yeh | * Allen Yeh 2010-09-08, Added apt-get install subversion into instructions for 10.04 otherwise once redmine is setup an error like this will result this error -> +*The entry or revision was not found in the repository.*+ |
493 | 18 | Glenn Gould | |
494 | h2. Additional Sources |
||
495 | |||
496 | * http://www.techrecipes.net/web/redmine/install-in-ubuntu |