Installing OroCRM on Ubuntu using Composer.

Installing OroCRM on Ubuntu using Composer.

OroCRM is an easy-to-use, open source CRM with built-in marketing tools for your ecommerce business. It’s the CRM both marketing and sales can agree on!

Installing all the prerequisites:

sudo apt-get update
sudo apt-get install -y mysql-server apache2
sudo apt-get install -y php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-mcrypt php5-intl
sudo apt-get install -y git
sudo apt-get install -y openjdk-7-jre
sudo apt-get install -y php-apc # This is optional

Installing Composer

If you don’t have composer yet, run the following command:

curl -s | php

This will download the composer.phar file to you current directory. Alternatively, you can download it from

Cloning the repository

Clone the repository on your system with:
git clone

Installing with Composer

Run composer to install all remaining dependencies and prerequisites by running the next command in your crm-application application folder.
php composer.phar install

This will take a while, and if it seemed very slow, you can speed it up a litte more by running this command instead
php composer.phar --prefer-dist install

At the end, you will be asked to enter the parameters for your database connection, and email settings.
Don’t worry you can still change them later.

Creating the Database

Next to create the database “oro_crm” and database user “oro_crm”:
$ mysql -u root -p
> CREATE USER 'oro_crm'@'localhost' IDENTIFIED BY 'somepassword';
> GRANT ALL PRIVILEGES ON oro_crm.* TO 'oro_crm'@'localhost' WITH GRANT OPTION;
> quit

Creating the virtual host

You can use the default host, and put everything in /var/wwww/ but for the sake or the tutorial, I will assume you it’s installed in /var/crm-application

To create a new virtual host in apache2 in Ubuntu, you need to create its vhost file in /etc/apache2/sites-available/

vim /etc/apache2/sites-available/orocrm
This is a sample of the content of the vhost file (Make sure it’s pointing to the “web” folder, to keep other library files private):

<VirtualHost *:80>
    ServerName orocrm.keeward.local
    ServerAdmin orocrm@keeward.local
    # Change /var/crm-application/web to /var/www/web in the two
    # following lines in case you installed the CRM in /var/www
    DocumentRoot /var/crm-application/web/
    <Directory /var/crm-application/web>
        AllowOverride All
        Order allow,deny
        allow from all
    # The following vaue should be 512MB during installation,
    # put it back to 256MB after the installation is finished.
    php_value memory_limit 256M
    # This is optional, in order to remove the warning during the
    # installation check
    php_value short_open_tag Off

Now we need to enable the virtual host and restart apache with:
sudo a2ensite orocrm
sudo apache2ctl restart

Running the installation wizard

Now, in your browser, navigate to the crm.
Assuming most prerequistes are met, and no server errors occur, you will be redirected to the first step of an installation wizard.

OroCRM - Install check

OroCRM – Install check

If there were no errors in the installation check, go to the next step for modifiying your database and email parameters.

OroCRM - Configuration

OroCRM – Configuration

Once done, click on next to go to the administration setup to create the CRM administrator.

OroCRM - Admin Setup

OroCRM – Admin Setup

And finally click on install so that the CRM finalizes the installation.
Once it’s over, click on the Launch application button to visit the CRM and start testing it

OroCRM - Finish

OroCRM – Finish


If a blank page was shown during the installation wizard, you can check your error logs at

Make sure apache has write access to the following file & folders:

After the installation is complete, you should revoke the write access from


Like this Article? Share it!

About the Author

Author Gravatar

Favorite quote: If .NET had true garbage collection, most programs would delete themselves upon execution.

Related Posts

Comments are closed.