Open link in a new tab

Content

Expand project menu

Installation MacOS

Warning: Outdated

This guide is highly outdated. Please use the manual installation guide at the following URL:
https://www.openproject.org/open-source/manual-installation/manual-installation-guide/

While being targeted at Linux, it should work identically for Mac OS X.

Installation of OpenProject on MacOS X

In this guide we will use Homebrew as a packager manager (http://brew.sh/). Check it out if you don’t have it installed on your machine yet, it’s highly recommended. As an alternative, you’re of course free to use MacPorts or Fink if you prefer.

We will also assume MacOS 10.6 or higher in this guide. Installation on 10.5 is possible, but may require some extra steps.

Install XCode, Homebrew and package dependencies

You will need the XCode command line tools to be able to compile packages with Homebrew. Install XCode from the App Store.
After the installation go to XCode Preferences -> Downloads and install the command line tools.

Then install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

The script will guide you through the steps necessary to install Homebrew. Check the Homebrew website for detailed information (http://brew.sh/).

If Homebrew is already installed on your system, just run ‘brew update’ followed by ‘brew upgrade’ to upgrade your packages.

Run Brew doctor to ensure everything is properly installed:

brew doctor

Install dependencies:

brew install git curl

Also install the following dependencies if you want to enable OpenProject to generate images (recommended but optional):

brew install imagemagick graphviz 

Install the memcached cache server (optional but recommended for production environments):

brew install memcached

Install Ruby

Ruby version managers

A ruby version manager lets you deploy and use different Ruby versions. Typically, Ruby is installed in the users $HOME directory.
In this guide we will demonstrate setting up a project with both RVM (http://rvm.io/) and chruby (with ruby-install).
rbenv is also widely used.

Option 1 RVM

  \curl -L https://get.rvm.io | bash -s stable
source source $HOME/.rvm/scripts/rvm

If you need help on how to install rvm, have a look at their homepage http://rvm.io .

Option 2 ruby-install and chruby

brew install chruby ruby-install
echo "source /usr/local/opt/chruby/share/chruby/chruby.sh" >> ~/.bashrc
echo "source /usr/local/opt/chruby/share/chruby/auto.sh" >> ~/.bashrc

Ruby and Bundler

Ruby 2.1 is supported

With RVM:

rvm install 2.1.2

With chruby

ruby-install ruby 2.1.2

Install bundler:

gem install bundler

Make sure that

bundle --version

is 1.5.1 or higher. If not, update the bundler gem.

Set up a database

You will need a database to run OpenProject. If you do not have a separate database server, install your favorite (MySQL or PostgreSQL) DBMS now.

You can install MySQL through Homebrew or download a binary distribution (http://www.mysql.com/downloads/):

brew install mysql

For PostgreSQL, both a homebrew package and a binary distribution are available as well (http://www.postgresql.org/download/macosx/):

 brew install postgresql

If you’re looking for a graphical tool to administer your databases, there are many options available. We recommend to have a look at Sequel Pro for Mysql (http://www.sequelpro.com/) and PgAdmin for PostgreSQL (http://www.pgadmin.org/).

You should create a database (MySQL or PostgreSQL) user with appropriate rights (create, remove, modify the openproject tables).

For MySQL:

Open the msyql console with ‘mysql’ and paste the following statements:

CREATE DATABASE openproject CHARACTER SET utf8;
CREATE USER 'openproject'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'@'localhost';

Also create the databases openproject_development and openproject_test and grant privileges on them if you are on a development machine.

For PostgreSQL:

CREATE ROLE openproject LOGIN ENCRYPTED PASSWORD ‘my_password’ NOINHERIT VALID UNTIL ‘infinity’;
CREATE DATABASE openproject WITH ENCODING=‘UTF8’ OWNER=openproject;

Also create the databases openproject_development and openproject_test and grant privileges on them if you are on a development machine.

Replace my_password with an appropriate password (avoid to use ‘!’’ in the password).

Install OpenProject

Clone the OpenProject repository.

git clone https://github.com/opf/openproject.git
cd openproject
git checkout stable

Run bundler to install all gems

bundle install

or the following if you decided not to install rmagick

bundle install --without rmagick

Copy config/database.yml.example to config/database.yml.

cd config
cp database.yml.example database.yml

Edit database.yml and fill in your database username and password.

Create an OpenProject email account. We use a free gmail account in our example configuration.

Copy config/configuration.yml.example to config/configuration.yml.

cp configuration.yml.example configuration.yml

Edit the default key to look like this:

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    perform_deliveries: true
    smtp_settings:
      address: smtp.gmail.com
      port: 587
      enable_starttls_auto: true
      domain: "gmail.com" 
      authentication: :login
      user_name: "yourgmailaccountname”
      password: "yourpassword"

Note that the enable_starttls_auto: true line was added.

Optional: If you want to use the memcached cache server add the following line to the configuration (don’t forget to install memcached beforehand - see the package dependencies for details):

rails_cache_store: :memcache

Create databases:

Create databases:

bundle exec rake db:create:all

Note: bundle exec helps to execute OpenProject with just those gems that were explicitly installed via bundle install. It is recommended to prepend bundle exec before every ruby oder gem invocation.

Run database migrations:

bundle exec rake db:migrate

Note: Per default the development environment is loaded. If you want to execute a command (like bundle exec rake db:migrate in the production environment, do RAILS_ENV="production" bundle exec rake db:migrate. the same applies to the test environment.)

Populate your database with example data. This is useful for development. In production systems, you probably want to configure OpenProject yourself (note that this also includes creating an admin account).

bundle exec rake db:seed

In development mode the database is populated with a lot of sample usage data (some users, work packages, news, …) to simulate a lively OpenProject installation (grab a cup of coffee, this may take some time).

However, in production mode very few data is generated. Basically it’s just an admin account and some default types and roles.

Generate a secret token for the session store:

bundle exec rake generate_secret_token

Install plugins (optional)

*For general information about OpenProject plug-ins refer to to the plug-in page

Create a Gemfile.plugins file and add OpenProject plugins of your choice. In our example we install the openproject-plugins plugin (which adds a useful plugin generator so that you can start developing your custom plugin faster).

vi Gemfile.plugins
gem "openproject-plugins", "~> 1.0.2"

Run bundler to install the plugin gems:

bundle install

Read the gems README or installation instructions. Some gems need further configuration. Some gems even add migrations - you need to install them manually.

Start application server

bundle exec rails server

You should now be able to access OpenProject at http://localhost:3000, where localhost is the IP address of the current machine.

The default administrator ID is admin and the password is admin.

Further production setup

In a production system you probably want to set up

  • the passenger gem (or use another rails deployment option)
  • precompile assets (bundle exec rake assets:precompile)
  • backups
  • init scripts
  • monitoring
  • in production.rb set config.serve_static_assets = true when you are not behind a webserver

For a production setup, we recommend to use the [[openproject:Mod_security|mod_security]] apache module (if you deploy with an apache webserver).