RedmineInstallOSXLionServer » History » Version 11
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. This is slightly different from the install for Snow Leopard Server. This is meant only as a supplement, not a replacement, to the official install guide found here.
- Install Xcode/OS X Developer Tools
Either get XCode from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/
An alternative is the latest version of Command Line Tools for XCode https://developer.apple.com/downloads . This is a smaller download and contains all that is necessary for installation.
- Install OS X MySQL and associated Libraries
Download http://www.mysql.com/downloads/mysql/ (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/binthen 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:
[mysqld] socket = /tmp/mysql.sock [client] socket = /tmp/mysql.sock
Install the MySQL binaries. Info about client libraries is available at http://support.apple.com/kb/HT4006 , or to download directly use
http://www.opensource.apple.com/other/MySQL-55.binaries.tar.gz (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
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:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.so 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
- 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 :
git clone https://github.com/Fingertips/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
- Checkout Redmine 2
If the Sites directory doesn't exist, create it (
sudo mkdir /Library/WebServer/Sites)
git clone https://github.com/redmine/redmine
- 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.localand 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
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.
production: adapter: mysql database: redmine host: localhost username: redmine password: MYPASSWORD socket: /tmp/mysql.sock
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 imagemagickif you use Mac Homebrew
sudo gem install bundler
Make sure you are in the redmine directory
sudo bundle install --without development test
(If you don't have imagemagick, also append
rmagickto the above line)
- Establish Defaults
sudo rake generate_secret_token
sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake redmine:load_default_data
When prompted, enter the appropriate language (e.g.
enfor English) and press enter.
Note: You may receive warning message "Please install RDoc". This does not appear to prevent successful installation. For redmine 1.4, use generate_session_store instead of generate_secret_token.
Configure Apache to serve up Redmine¶You may wish to try out using webrick first, but you can move straight to apache.
- Go to Server.app, select the Web service, and add a new website. For example domain name
redmine.local, and store site files in
- Restart the web server
sudo apachectl restart
Or, in Server.app, 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 /redmineto point at the same location
- Login as Admin
By default, the user:admin has password:admin, which you should change immediately.
- 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.
- Redmine 2.0+ requires ruby gems that conflict with some Lion Server web applications such as Wiki and Profile Manager. These require earlier versions of rack (1.2.1) and rails (2.3.14). To run these applications, it is preferable to concurrently run redmine 1.4, which is compatible with older gems, or to manage separate ruby versions for redmine vs Server web apps.
- 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.