RedmineInstallOSXServer » History » Version 6

Art Kuo, 2011-06-09 01:46
Clarified how to extract MySQL binaries. The download is an archive, which when extracted, yields another archive to be extracted. Also found some gem versions needed to be explicitly stated for compatibility with redmine.

1 3 Bevan Rudge
h1. Installing Redmine on Mac OS X 10.6
2 1 Josh Galvez
3 1 Josh Galvez
{{>TOC}}
4 1 Josh Galvez
5 1 Josh Galvez
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.  It is meant only as a supplement, not a replacement, to the official install guide found [[RedmineInstall|here]].
6 1 Josh Galvez
7 1 Josh Galvez
h2. Step by Step
8 1 Josh Galvez
9 1 Josh Galvez
h3. Install Prerequisites 
10 1 Josh Galvez
11 1 Josh Galvez
# Install Xcode/OS X Developer Tools
12 1 Josh Galvez
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 1 Josh Galvez
# 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 6 Art Kuo
	@sudo tar -xvf ~/Downloads/MySQL-53.binaries.tar -C ~/Downloads@
16 6 Art Kuo
or if you downloaded a .gz file,
17 6 Art Kuo
	@sudo tar -xzvf ~/Downloads/MySQL-53.binaries.tar.gz -C ~/Downloads@
18 6 Art Kuo
This will produce a root.tar archive, which must then be extracted
19 6 Art Kuo
	@sudo tar -xzvf ~/Downloads/MySQL-53.binaries/MySQL-53.root.tar.gz -C /@
20 6 Art Kuo
If successful, tar should list the many files being placed in appropriate locations 
21 1 Josh Galvez
# Install Ruby Gems
22 1 Josh Galvez
	@sudo gem install rails -v=2.3.5@
23 1 Josh Galvez
	@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 6 Art Kuo
	@sudo gem install mysql -v=2.8.1@ (may also help to use env ARCHFLAGS="-arch x86_64")
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 1 Josh Galvez
	@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 1 Josh Galvez
Download and Install: http://www.fngtps.com/passenger-preference-pane
34 1 Josh Galvez
35 1 Josh Galvez
h3. Install Redmine
36 1 Josh Galvez
37 1 Josh Galvez
# Checkout Redmine
38 1 Josh Galvez
	@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 1 Josh Galvez
	Open /Library/WebServer/Sites/redmine in Finder
42 1 Josh Galvez
	Start Passenger preference pane in System Preferences
43 1 Josh Galvez
	Drag redmine folder to Passenger (you may have to 'click to make changes')
44 1 Josh Galvez
	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 1 Josh Galvez
	Launch Server Admin, click + Sign, Add Service, Check MySQL box, click Save
48 1 Josh Galvez
	Choose the MySQL service, click Set Root Password, click Start to start the service
49 1 Josh Galvez
# Setup Database
50 1 Josh Galvez
	@mysql -u root -p@
51 1 Josh Galvez
<pre>	create database redmine character set utf8;
52 1 Josh Galvez
	create user 'redmine'@'localhost' identified by 'my_password';
53 1 Josh Galvez
	grant all privileges on redmine.* to 'redmine'@'localhost';</pre>
54 1 Josh Galvez
# Configure Redmine
55 1 Josh Galvez
	@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 6 Art Kuo
Edit database.yml, ie.:
60 1 Josh Galvez
<pre>
61 1 Josh Galvez
production:
62 1 Josh Galvez
  adapter: mysql
63 1 Josh Galvez
  database: redmine
64 1 Josh Galvez
  host: localhost
65 1 Josh Galvez
  username: redmine
66 1 Josh Galvez
  password: my_password
67 1 Josh Galvez
</pre>
68 1 Josh Galvez
# Establish Defaults
69 6 Art Kuo
	@sudo rake generate_session_store@ (may require gems i18n and updated rails)
70 6 Art Kuo
	@sudo RAILS_ENV=production rake db:migrate@
71 1 Josh Galvez
	@RAILS_ENV=production rake redmine:load_default_data@