RedmineInstallOSXServer » History » Version 12

Art Kuo, 2012-06-29 19:39

1 11 Art Kuo
h1. Installing Redmine on Mac OS X 10.6 Server
2 11 Art Kuo
 
3 1 Josh Galvez
{{>TOC}}
4 1 Josh Galvez
5 12 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). There is a slightly different install for [[RedmineInstallOSXLionServer|Lion Server]]. 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 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 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@
72 8 Art Kuo
(If rails cannot access log file, do this: @sudo chmod 0666 log/production.log@)
73 8 Art Kuo
74 8 Art Kuo
h3. Try out using webrick
75 9 Art Kuo
76 9 Art Kuo
# Run the ruby web server with @ruby script/server webrick -e production@
77 9 Art Kuo
# Go to a web browser and view @http://localhost:3000@
78 8 Art Kuo
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).
79 10 Josue Alvarez
80 10 Josue Alvarez
For automated installs, check out [[How to install Redmine in Linux Windows and OS X using BitNami Redmine Stack]]