Project

General

Profile

RedmineInstallOSXServer » History » Version 8

Art Kuo, 2011-06-09 02:21

1 3 Bevan Rudge
h1. Installing Redmine on Mac OS X 10.6
2 1 Josh Galvez
3
{{>TOC}}
4
5 7 Art Kuo
This is a quick summary of the necessary steps for a simple install of Redmine on Apple OS X Snow Leopard Server 10.6.4 (or 10.6.7).  It is meant only as a supplement, not a replacement, to the official install guide found [[RedmineInstall|here]].
6 1 Josh Galvez
7
h2. Step by Step
8
9
h3. Install Prerequisites 
10
11
# Install Xcode/OS X Developer Tools
12
Install from OS X Server DVD that was shipped with your Mac, or register for a free account and download from: http://developer.apple.com/technologies/xcode.html
13
# Install OS X MySQL Libraries ( http://support.apple.com/kb/HT4006 )
14 6 Art Kuo
Download http://www.opensource.apple.com/other/MySQL-53.binaries.tar.gz (or MySQL-54 for OSX 10.6.7)
15
	@sudo tar -xvf ~/Downloads/MySQL-53.binaries.tar -C ~/Downloads@
16
or if you downloaded a .gz file,
17
	@sudo tar -xzvf ~/Downloads/MySQL-53.binaries.tar.gz -C ~/Downloads@
18
This will produce a root.tar archive, which must then be extracted
19
	@sudo tar -xzvf ~/Downloads/MySQL-53.binaries/MySQL-53.root.tar.gz -C /@
20
If successful, tar should list the many files being placed in appropriate locations 
21 1 Josh Galvez
# Install Ruby Gems
22
	@sudo gem install rails -v=2.3.5@
23
	@sudo gem install rack -v=1.0.1@
24 6 Art Kuo
	@sudo gem install rake -v=0.8.3@
25 1 Josh Galvez
	@sudo gem install fastthread@
26 8 Art Kuo
	@sudo env ARCHFLAGS="-arch x86_64" gem install mysql -v=2.8.1@
27 1 Josh Galvez
# If you are running desktop OS X  (not the Server edition):  See [[RedmineInstallOSX]]
28 5 Bevan Rudge
# If you are running OS X *Server*: Install Passenger
29 1 Josh Galvez
	@sudo gem install passenger@
30
	@sudo passenger-install-apache2-module@
31 6 Art Kuo
The apache2 module installation will ask you to add several lines to the apache configuration file. Some likely locations for this are /etc/apache2/httpd.conf (standard OS X Server installation) and /opt/local/apache2/conf/httpd.conf (MacPorts installation).
32 1 Josh Galvez
# Install Passenger Pref Pane
33
Download and Install: http://www.fngtps.com/passenger-preference-pane
34
35
h3. Install Redmine
36
37
# Checkout Redmine
38
	@cd /Library/WebServer/Sites/@
39 6 Art Kuo
	@sudo svn checkout http://redmine.rubyforge.org/svn/trunk redmine@
40 1 Josh Galvez
# Configure Passenger
41
	Open /Library/WebServer/Sites/redmine in Finder
42
	Start Passenger preference pane in System Preferences
43
	Drag redmine folder to Passenger (you may have to 'click to make changes')
44
	Set "Address" and click "Production"
45 3 Bevan Rudge
# If you are running desktop OS X  (not the Server edition):  See [[RedmineInstallOSX]]
46 1 Josh Galvez
# If you are running OS X *Server*: Enable MySQL
47
	Launch Server Admin, click + Sign, Add Service, Check MySQL box, click Save
48
	Choose the MySQL service, click Set Root Password, click Start to start the service
49
# Setup Database
50
	@mysql -u root -p@
51
<pre>	create database redmine character set utf8;
52
	create user 'redmine'@'localhost' identified by 'my_password';
53
	grant all privileges on redmine.* to 'redmine'@'localhost';</pre>
54
# Configure Redmine
55
	@cd /Library/WebServer/Sites/redmine@
56 6 Art Kuo
	@sudo mkdir tmp public/plugin_assets@
57 1 Josh Galvez
	@sudo chmod -R 755 files log tmp public/plugin_assets@
58 6 Art Kuo
	@sudo cp config/database.yml.example config/database.yml@
59
Edit database.yml, ie.:
60 1 Josh Galvez
<pre>
61
production:
62
  adapter: mysql
63
  database: redmine
64
  host: localhost
65
  username: redmine
66
  password: my_password
67
</pre>
68
# Establish Defaults
69 6 Art Kuo
	@sudo rake generate_session_store@ (may require gems i18n and updated rails)
70
	@sudo RAILS_ENV=production rake db:migrate@
71 1 Josh Galvez
	@RAILS_ENV=production rake redmine:load_default_data@
72 8 Art Kuo
(If rails cannot access log file, do this: @sudo chmod 0666 log/production.log@)
73
74
h3. Try out using webrick
75
@ruby script/server webrick -e production
76
Go to web browser and view @http://localhost:3000@
77
There may be some errors. An error regarding undefined "csrf_meta_tag" can be dealt with by deleting the corresponding line in app/views/layouts/base.rhtml (perhaps line 8, but use the error message to be sure of proper line).