Update cookies preferences

How To Install OroCRM On Your Local Machine

OroCRM is a new CRM system created by some of the original Magento team. Being massive Magento fans, we thought it was rude not to check it out! However we found installation not the easiest, and with it being so new (OroCRM only went beta last month!), there are limited resources to help guide developers through the installation.

Hopefully this step by step “how to install OroCRM” guide will help you overcome any installation problems.

Step By Step: How Install OroCRM Locally

1. Ensure you have composer installed on your machine

2. Create a new directory, and browse to that directory in your console.

mkdir Documents/work_space/crm 
cd Documents/work_space/crm

3. Run the following git command to clone the repository:

git clone https://github.com/orocrm/crm-application.git

4. You’ll notice that a new folder called crm-application has magically appeared in the directory. Cd to the new directory then run Composer install to download the files.

cd crm-application 
composer install

5. After the download has finished it’ll attempt to write a config file. However you will have to provide some database information. At this point you can provide external database settings however I am running the whole thing on my local machine so first you need to create a new database. Call it whatever you want I called mine oro_crm. And depending on your SQL settings your config parameters should look something like this:

database_host: localhost database_port: // leave default 
database_name: oro_crm database_user: root
database_password: mysecurepassword // Obviously change to your password

6. Next you’ll be required to add your mail settings. By default it’ll presume you want SMTP access, and you can easily set this up to use your email’s SMTP settings.

mailer_transport: smtp
mailer_host: smtp.yourmailserver.com

7. Your SMTP server might need some additional security settings, which you can configure after OroCRM has been installed.

8. Next you’ll need to ad the websock host and port but just leave these as the default settings:

websocket_port: 8080

9. Leave the session handler option as it’s default setting (null)

10. Update your locale setting as required:

locale: en

11. Then we need to add some security settings. WordPress has a salt key generatorso you can just add one of the hashes from there if you want.

secret: 3,QVH7N-]oFIJ^K+(,Ux+M=Pmo4TnY#7Y}a-3^s>[@H_3r5nxR%,3h:Jh-Dd<[P-

12. Leave the last setting ‘installed’ as default (false) and let composer do it’s business…

13. When composer has finished then run the install shell script.

sudo ./install.sh

… wait a while…

14. The page should now load a system requirements check page. Make sure all the options look correct, and make alterations to your php.ini file to anything that is not configured correctly.

15. Next you’ll be presented with some configuration options. Most of these should be filled in based on the data you entered during the command line setup process. However if you need to update anything or add a password for your SMTP server. You can do so here.

16. After you click next be prepared to wait a very long time while the system installs and updates your database.

17. Now you’ll be presented with an admin setup screen. This is the final setup screen so just add your admin user details and install!

Install OROCRM Locally – Troubleshooting:

Top Tip – Keep checking the log files. OROCRM doesn’t give much feedback so make friends with the log files!

An error occurred when executing the “‘cache:clear –no-warmup'” command.

You might come across this error when running composer install or composer update.

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception  [RuntimeException] An error occurred when executing the "'cache:clear --no-warmup'" command.

Now this is a really annoying error which took us a while to resolve. But if you have a look in your PHP logs you’ll notice there is a PHP timeout error. This seems to be a known issue with the installation of OROCRM, which their team is working on but for the time being you need to update the memory limit in your php.ini file to something stupid like 256M.

Uncaught exception ‘RuntimeException,��^�Ayn^U’ with message ‘Failed to write cache file

Another problem we came across was a  write issue with the cache, which was causing a fatal error when loading the site up:

Uncaught exception 'RuntimeException,��^�Ayn^U' with message 'Failed to write cache file

You can fix this easily enough by updating your cache folder’s permissions to 777:

cd app/cache
sudo chmod -R 777 

500 Internal Server Error

So we had an issue when we thought everything has installed correctly, yet we were getting a 500 internal server error. This proved very difficult to track down, but it turned out that we didn’t have the PHP INTL extension correctly configured. (This 500 error appeared before the system settings validation page so its particularly tough to track down)

Luckily there are some handy INTL installation instructions here, so make sure you check them out.

Database Errors

We ran into a position where the system thought it had all installed correctly however the database had not been populated. We then couldn’t run the installation script in order to correctly populate the database. If you get in this situation then find the config/parameters.yml file and change installed to false:

installed: false

OroCRM Installation Tips

  • Keep checking the log files. OroCRM doesn’t give much feedback so make friends with the log files! Symfony2 has it’s own log files located in app/logs, but don’t forget to check your apache and php error logs for clues.
  • Run the OroCRM in dev mode. If you load /app_dev.php you’ll notice any exceptions are turned on, and other useful information. Run the whole installation in dev mode if you can.
  • Ask at the OroCRM forum for help. Community is pretty small at the moment but it is helpful.

If you enjoyed this article, read the other Blog articles from our Magento agency or browse the site to see what else we do with Adobe Commerce, PunchOut Catalog and more.

Get in touch for help with your latest Magento or eCommerce project.



Ready to start your next project?

See how we can help you accelerate your business