Content
Download and Installation of OpenProject 3.0
Installation via package manager for Debian and Ubuntu systems
If you want the OpenProject core (stable release 3.0.14), you can use the package manager to install OpenProject.
Big thanks goes to pkgr.io who host the instructions at our pkgr project page .
Disclaimer: This is a first version for the installation via package manger. Please provide feedback.
Detailed Installation Instructions
We provide detailed instructions for the following systems:
- Ubuntu 12.04
- Debian (setup with Apache and MySQL)
- Mac OS
- CentOS 6.5 (production setup using PostgreSQL 9.3)
- Windows (Thanks Paul Onwude)
- Docker (experimental, not production-ready)
- Automated deployment with Chef*
Unofficial installation instructions:
(*looking forward to contributions for installation instructions)
If your system is not listed, continue reading the general installation instructions. Please consider to adapt every step to your individual system set-up.
General Installation Instructions
If you’re upgrading from OpenProject 2.4, we have a migration guide to 3.0.
Requirements
- Ruby 2.1.0
- Git
-
Bundler (version
1.5.1
or higher required) - Database (MySQL 5.x/PostgreSQL 8.x)
Before you start the installation make sure that you have a running database server, a current git version, ruby 2.1.0 and a working bundler installed.
Debian Wheezy w/ Postgres 9.1
Basic prerequisites:
apt-get install postgresql-9.1 git gcc make libxml2-dev libxslt-dev g libpq-dev
To install Ruby on debian it is recommended to use RVM, you can install it by following these commands:
curl -sSL https://get.rvm.io | bash -s stable —ruby=2.1
source /etc/profile.d/rvm.sh
You can check if it was successful by typing in ruby -v afterwards and seeing an output such as:
root@server:/# ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
Install bundler (a dependency manager for Ruby Gems):
gem install bundler —version ‘>=1.5.1’
Optional: Install the memcached service (e.g. apt-get install memcached)
Assuming you have your Postgres already setup all you will need to do is create an openproject, openproject_test and openproject_development database. If you don’t then follow these Instructions:
1) log into your postgres user by typing the following into the command line:
su - postgres
2)Proceed by changing your the password by typing in:
psql
\password postgres
3) Exit Postgresql and add a system user(within Debian/your OS) via “adduser username”, log back into postgresql(su - postgres) , and enter the psql command. Follow this by creating a user with the “createuser” function within psql and make that user a superuser.
4) Exit psql by typing “\q” and type in “su - yourcreatedusername” and enter the password you provided earlier when creating the account. Create your Databases by issueing the following commands
createdb -O createdusername openproject
createdb -O createdusername openproject_test
createdb -O createdusername openproject_development
5) Type in PSQL and issue the following commands:
create role openproject login encrypted password ‘passwordhere’ noinherit valid until ‘infinity’;
create database openproject with encoding=‘UTF8’ owner=openproject;
6) You’re done with the DB setup now
Clone the OpenProject repository
git clone https://github.com/opf/openproject.git cd openproject git checkout stable
Add plugins
Plugins in OpenProject behave like normal ruby gems. To preserve the distinction between gems required for OpenProject itself and the plugin gems we decided to have a distinct Gemfile for the later. That way it is also easier to update.
- Create a file called Gemfile.plugins in the OpenProject root directory.
- Within the Gemfile.plugins file add the plugins of your choice like this:
gem "openproject-help_link", :git => "https://github.com/finnlabs/openproject-help_link.git", :branch => "3-0-3"
Available plugins are listed as subprojects to the “Plugins”-project
Install gems
bundle install --without mysql mysql2 sqlite development test rmagick
Configure config/database.yml
There is an example file config/database.yml.example you can copy and edit.
You choose a database for production, development and test environment.
Configure config/configuration.yml
There is an example file config/configuration.yml.example you can copy and edit.
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 section 2.1.1 for details):
rails_cache_store: :memcache
Generate a secret token for the session store
bundle exec rake generate_secret_token
Create databases
bundle exec rake db:create:all
All databases listed in your database.yml will be created.
Run database migrations and seeds
bundle exec rake db:migrate RAILS_ENV=production bundle exec rake db:seed RAILS_ENV=production
Note: because of a known issue (#3782) you will need to execute these Rake tasks separately.
Creates the default database structure and some test data.
Precompile assets
bundle exec rake assets:precompile
Start application server
bundle exec rails server RAILS_ENV=production
You start your application server and by default it should be available under http://localhost:3000
Login
Use the default administrator account to log in.
- Login:
admin
- Password:
admin
Set up delayed job (e-mail, user deletion, …)
For some jobs that might take some time to execute, we choose to rely on delayed job. This enables OpenProject to answer a user’s request quickly while doing the heavy lifting where the user doesn’t care - in the background. We will strive to shift more and more work to the background to increase the responsiveness. Jobs already executed in the background include:
- Sending update notifications via e-mail
- Deleting users
- Copying projects
Thus, you need to set up delayed job for those background jobs to work.
Note: If you come from an existing database you want to delete all entries in the table delayed_jobs
.
You start delayed job with the following command executed from the OpenProject main folder:
RAILS_ENV=production bundle exec script/delayed_job start
and you stop it with:
RAILS_ENV=production bundle exec script/delayed_job stop
Note: Be aware that you have to restart the delayed job if you change (e.g. update) the OpenProject code because delayed job runs with the code which it finds on startup.
Deployment Considerations
OpenProject may be deployed similar to any Rails3 application. However, some things need to be considered:
- write access to some directories is necessary (e.g. the
RAILS_ROOT/files
directory, where user uploads are stored by default) - If you run OpenProject in a production setup, consider security:
- run OpenProject with a separate system user, only having the access right necessary to run OpenProject
- We recommend to install mod_security when deploying with apache