# Installation of OpenProject 4.2 with Apache on Debian 7.7 or Ubuntu 14.04 LTS
# Installation of OpenProject 4.2 with Apache on Ubuntu 14.04. LTS
**This tutorial helps you to deploy OpenProject 4.2. Please, aware that:**
This tutorial helps you to deploy OpenProject 4.2. Please, aware that:
1. This guide requires that you have a clean **Debian 7.7 x64** or **Ubuntu 14.04 x64** installation with administrative rights. We have tested the installation guide on a Debian minimal netinstall image and on an Ubuntu Server image, but it should work on any derivative.
2. OpenProject will be installed with a MySQL database (the guide should work analogous with PostgreSQL).
3. OpenProject will be served in a production environment with Apache (this guide should work analogous with other servers, like nginx and others)
This guide requires that you have a clean Ubuntu 14.04 x64 installation
with administrative rights. We have tested the installation guide on an
Ubuntu Server image, but it should work on any derivative.
In this guide, we will install **OpenProject 4.2** with a **MySQL** database. Openproject will be served with the **Apache** web server. When your server needs to reboot, OpenProject should start automatically with your server.
OpenProject will be installed with a MySQL database (the guide should
work similarly with PostgreSQL).
OpenProject will be served in a production environment with Apache
(this guide should work similarly with other servers, like nginx and others)
Note: We have highlighted commands to execute like this
```bash
[user@host] command
[user@host] command to execute
```
Where the `user` is the operating system user the command is executed with. The `host` is either `debian` (when the command is Debian-specific), `ubuntu` (when the command is Ubuntu-specific), or `all` (when the command shall be executed on either operating system).
The `user` is the operating system user the command is executed with.
In our case it will be `root` for most of the time or `openproject`.
If you find any bugs or you have any recommendations for improving this tutorial, please, feel free to create a pull request against this guide.
If you find any bugs or you have any recommendations for improving this
tutorial, please, feel free to create a pull request against this guide.
## Prepare Your Environment
# Prepare Your Environment
Install tools needed to compile Ruby and run OpenProject:
It can be that curl fails to download the RVM source, because of the missing GPG key. If that is the case, download the key (as suggested in the error message):
Now, edit the `configuration.yml` file as you like.
Now we edit the `configuration.yml` file to suit our needs.
```ruby
```yaml
production: #main level
email_delivery_method: :smtp #settings for the production environment
smtp_address: smtp.gmail.com
@ -208,132 +197,81 @@ production: #main level
smtp_authentication: plain
```
Add this line into `configuration.yml` file at the of of file for better performance of OpenProject:
Add this line into `configuration.yml` file at the end of the file for
a better performance of OpenProject:
```ruby
```yaml
rails_cache_store: :memcache
```
**NOTE:** You should validate your .yml-files, for example with http://www.yamllint.com/. Both, the `database.yml` and `configuration.yml` file are sensitive to whitespace. It is pretty easy to write invalid .yml files without seeing the error. Validating those files prevents you from such errors.
__NOTE:__ You should validate your `yml` files, for example with
http://www.yamllint.com/. Both, the `database.yml` and `configuration.yml`
file are sensitive to whitespace. It is pretty easy to write
invalid `yml` files without seeing the error. Validating those files
The passenger installer will ask you the question in "Which languages are you interested in?". We are interested only in ruby.
As told by the installer, add this lines to `/etc/apache2/apache2.conf`.
But before copy&pasting the following lines, check if the content (especially the version numbers!) is the same as the `passenger-install-apache2-module` installer said. When you're in doubt, do what passenger tells you.
The passenger installer will ask you the question in "Which languages are you interested in?". We are interested only in ruby.
The passenger installer will ask you the question in "Which languages are you
interested in?". We are interested only in ruby.
The passenger installer tells us to edit the apache config files. To do this, continue as the root user:
The passenger installer tells us to edit the apache config files.
To do this, continue as the root user:
```bash
[openproject@ubuntu] exit
[openproject@host] exit
```
As told by the installer, create the file `/etc/apache2/mods-available/passenger.load` and add the following line.
But before copy&pasting the following lines, check if the content (especially the version numbers!) is the same as the `passenger-install-apache2-module` installer said. When you're in doubt, do what passenger tells you.
As told by the installer, create the file /etc/apache2/mods-available/passenger.load and add the following line.
But before copy&pasting the following lines, check if the content (especially the version numbers!) is the same as the passenger-install-apache2-module installer said. When you're in doubt, do what passenger tells you.
If you have modified the `Gemfile.plugin` file, always repeat the following steps of the OpenProject installation:
@ -514,3 +450,4 @@ If you need to restart the server (for example after a configuration change), do
If you have any further questions, comments, feedback, or an idea to enhance this guide, please tell us at the appropriate community [forum](https://community.openproject.org/projects/openproject/boards/9).
[Follow OpenProject on twitter](https://twitter.com/openproject), and follow the news on [openproject.org](http://openproject.org) to stay up to date.