RedmineInstallOSXLionServer » History » Version 4

Version 3 (Art Kuo, 2012-06-02 02:58) → Version 4/16 (Art Kuo, 2012-06-02 03:00)

h1. Installing Redmine on Mac OS X 10.7 Lion Server

This is a quick summary of the necessary steps for a simple install of Redmine on Apple OS X Lion Server 10.7. It is meant only as a supplement, not a replacement, to the official install guide found [[RedmineInstallOSXLionServer|here]]. here.

h2. Install Prerequisites

# Install Xcode/OS X Developer Tools
Either get XCode from the Mac App Store or register for a free account and download from:
An alternative is the latest version of Command Line Tools for XCode . This is a smaller download and contains all that is necessary for installation.
# Install OS X MySQL and associated Libraries
Download (select latest 64-bit version, e.g. 5.5.25)
Run the installation package .pkg file. This will install into /usr/local/mysql/bin
Run the MySQLStartupItem.pkg file to use GUI to start automatically after startup of your server. (Of course, command line also works.)
Open the MySQL.prefPane and install for all users. This provides a GUI for starting and stopping. (Of couse, command line also works.)
Set the root password for your new installation of MySQL. One way is to use the "MySQLWorkbench": Or from the command line:
@mysqladmin -u root password NEWPASSWORD@ (where your password substitutes for NEWPASSWORD)
Add MySQL to the path. In terminal:
@sudo touch /etc/paths.d/mysql@ (creates a file in which you type the path)
@sudo nano /etc/paths.d/mysql@
In editor type @/usr/local/mysql/bin@ then save and exit
Enter startup options to tell the MySQL client and daemon to connect to the local server. In terminal:
@sudo nano /etc/my.cnf@
In editor, add the following as appropriate:
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock</pre>
Install the MySQL binaries. Info about client libraries is available at , or to download directly use (or latest version)
@sudo tar -xzvf ~/Downloads/MySQL-55.binaries.tar.gz -C ~/Downloads@
This will produce a root.tar archive, which must then also be extracted:
@sudo tar -xzvf ~/Downloads/MySQL-55.binaries/MySQL-55.root.tar.gz -C /@
If successful, tar should list the many files being placed in appropriate locations throughout the system
# Install "Phusion Passenger":
This is a gem that handles Ruby on Rails applications and makes them accessible on the web server.
@sudo gem install passenger@
@sudo passenger-install-apache2-module@
The apache2 module installation will ask you to add several lines to the apache configuration file. For the standard Lion Server, the file is /etc/apache2/httpd.conf . Typical lines to add are:
<pre>LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/ext/apache2/
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.12
PassengerRuby /System/Library/Frameworks/Ruby.framework/Version/1.8/usr/bin/ruby@
It may also be helpful to specify the user that runs passenger, with the line
<pre>PassengerDefaultUser www</pre>
# Build and install Passenger Pref Pane
This is a GUI interface for the Mac, to make it easy to add Ruby on Rails applications. Many of the binary prefPanes on the "web": are not compatible with 10.7, so it is necessary to "build": :
@cd ~/Downloads
git clone
cd passengerpane
(If you can't find xcodebuild, it may be in /usr/bin/xcodebuild)
Install the preference pane. Look in ~/Downloads/passengerpane/build/Release, and double-click on Passenger.prefPane to install it.
An alternative is to download a pre-compiled build for 10.7, e.g. "SoftwhisperSL-PassengerPrefPane":

h2. Install Redmine

# Checkout Redmine 2
@cd /Library/WebServer/Sites/@
If the Sites directory doesn't exist, create it (@sudo mkdir /Library/WebServer/Sites@)
@git clone
# Configure Passenger
Open /Library/WebServer/Sites in Finder
Start Passenger preference pane in System Preferences
Drag redmine folder to Passenger (you may have to 'click to make changes')
Set "Address" to something like @redmine.local@ and click "Production"
Enter any aliases for the website, such as
# Setup Database with redmine user and database
@mysql -u root -p@
(Enter the MySQL root password when prompted)
Now enter the following into MySQL, substituting a password of your choice for MYPASSWORD:
@create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'MYPASSWORD';
grant all privileges on redmine.* to 'redmine'@'localhost';@
# Configure Redmine
@cd /Library/WebServer/Sites/redmine
sudo mkdir tmp public/plugin_assets
sudo chown -R www:www tmp public/plugin_assets log files
sudo chmod -R 755 files log tmp public/plugin_assets
sudo cp config/database.yml.example config/database.yml@
Edit database.yml, e.g.
adapter: mysql
database: redmine
host: localhost
username: redmine
password: MYPASSWORD
socket: /tmp/mysql.sock</pre>
If necessary, do the same for configuration.yml, for example to set up email SMTP.
# Install appropriate gems
Optional: It helps to have imagemagick, which can be installed with @brew install imagemagick@ if you use "Mac Homebrew":
@sudo gem install bundler@
Make sure you are in the redmine directory @cd /Library/WebServer/Sites/redmine@:
@sudo bundle install --without development test@
(If you don't have imagemagick, also append @rmagick@ to the above line)
# Establish Defaults
@sudo rake generate_secret_code
sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake redmine:load_default_data@
When prompted, enter the appropriate language (e.g. @en@ for English) and press enter

h2. Configure Apache to serve up Redmine

You may wish to try out using webrick first, but you can move straight to apache.
# Go to, select the Web service, and add a new website. For example domain name @redmine.local@, and store site files in @/Library/WebServer/Sites/redmine/public@
# Restart the web server
@sudo apachectl restart@
Or, in, turn the web service off and then on.
Go to the Passenger prefPane and restart your redmine app
The site should now be visible, e.g. at redmine.local
To serve outside of local, instructions may be found "here":
For example, to serve as a subdomain from your main server, do the following. First, link the redmine directory into the directory where Server stores files in, e.g.
@ln -s /Library/WebServer/Sites/redmine/public /Library/Server/Web/Data/Sites/Default/redmine@
edit the appropriate .conf file in /etc/apache2/sites, and under VirtualHost add @RailsBaseURI /redmine@ to point at the same location

h2. Notes

For automated installs, check out [[How to install Redmine in Linux Windows and OS X using BitNami Redmine Stack]]
The following references were helpful for compiling this howto:
[[RedmineInstallOSXServer]] for Snow Leopard Server
This same procedure also works for Redmine 1.4. Installation for 1.4+ is made vastly easier by the gem bundler, which ensures the appropriate gem versions are maintained.
Probably a better idea to use PostgreSQL instead of installing MySQL, which is no longer provided by Apple with OS X Server. There are also alternative methods to install MySQL, such as @brew install mysql@.