Skip over navigation
Documentation

Quick Start Installation: OroCRM Community Edition

  • Clone the OroCRM Community Edition repository:

    git clone -b x.y.z https://github.com/oroinc/crm-application.git
    

    where x.y.z is latest release tag

  • Make sure that you have NodeJS installed.

  • OroCRM Community Edition uses Composer to manage its dependencies. If you do not have Composer yet, download it and follow the steps provided in the installation documentation or simply run the following command:

    curl -s https://getcomposer.org/installer | php
    
  • Install project dependencies with Composer. If the installation is going too slow, you can use the –prefer-dist option. Run composer installation:

    composer install --prefer-dist --no-dev
    

    Note

    For Enterprise Editions, it is strongly recommended to use ElasticSearch as a search engine and RabbitMQ as a message queue broker in production environment.

  • Create the database with the name specified in the previous step (default name is oro_crm).

  • Install the application and the admin user with the Installation Wizard by opening install.php in the browser or from CLI:

    php app/console oro:install --env=prod
    
  • Configure the Web Socket server process and the Message Queue consumer process in Supervisor:

    [program:<oro_application>_web_socket]
    command=/path/to/app/console clank:server --env=prod
    numprocs=1
    autostart=true
    startsecs=0
    user=www-data
    redirect_stderr=true
    
    [program:<oro_application>_message_consumer]
    command=/path/to/app/console oro:message-queue:consume --env=prod
    process_name=%(program_name)s_%(process_num)02d
    numprocs=5
    autostart=true
    autorestart=true
    startsecs=0
    user=www-data
    redirect_stderr=true
    

    Note

    Replace <oro_application> with orocrm, orocommerce, or platform.

    or run them manually:

    php /path/to/app/console clank:server --env=prod
    php /path/to/app/console oro:message-queue:consume --env=prod
    

    Note

    The port used by Web Socket must be open in the firewall for outgoing/incoming connections.

  • Configure crontab:

    */1 * * * * /path/to/app/console oro:cron --env=prod
    

    or scheduled tasks execution to run the command below every minute:

    php /path/to/app/console oro:cron --env=prod
    

    Note

    app/console is a path from the project root folder. Please make sure you are using the full path for crontab configuration if you are running console command from a different location.

Installation Notes

Configuration of used PHP Accelerator must be compatible with with Symfony and Doctrine and should support DOCBLOCKs.

Note that the port used by the WebSocket server must be open in firewall for outgoing/incoming connections.

MySQL Configuration

Use SSD storage in production environment, as using MySQL 5.6 on HDD is potentially risky.

Recommended configuration for this case:

innodb_file_per_table = 0

Ensure that the timeout has a default value.

wait_timeout = 28800

See Optimizing InnoDB Disk I/O for more information.

The default MySQL character set utf8 uses a maximum of three bytes per character and contains only BMP characters. The utf8mb4 character set uses a maximum of four bytes per character and supports supplemental characters (e.g. emojis). It is recommended to use utf8mb4 character set in your app/config.yml:

doctrine:
    dbal:
        connections:
            default:
                driver:       "%database_driver%"
                host:         "%database_host%"
                port:         "%database_port%"
                dbname:       "%database_name%"
                user:         "%database_user%"
                password:     "%database_password%"
                charset:      utf8mb4
                default_table_options:
                    charset: utf8mb4
                    collate: utf8mb4_unicode_ci
                    row_format: dynamic

Using utf8mb4 might have side effects. MySQL indexes have a default limit of 767 bytes, so any indexed fields with varchar(255) will fail when inserted, because utf8mb4 can have 4 bytes per character (255 * 4 = 1020 bytes), thus the longest data can be 191 (191 * 4 = 764 < 767). To be able to use any 4 byte charset all indexed varchars should be at most varchar(191).

To overcome the index size issue the server can be configured to have large index size by enabling sysvar_innodb_large_prefix.

However, innodb_large_prefix requires some additional settings to work:

  • innodb_default_row_format=DYNAMIC (you may also enable it per connection as in the config above)
  • innodb_file_format=Barracuda
  • innodb_file_per_table=1 (see above performance issues with this setting)

More details about this issue can be found here.

Web Server Configuration

OroCRM Community Edition is based on the Symfony standard application, so the web server configuration recommendations are the same.

Opcache

Recommended configuration:

opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=512
opcache.max_accelerated_files=32531
opcache.interned_strings_buffer=32
#http://symfony.com/doc/current/performance.html
realpath_cache_size=4096K
realpath_cache_ttl=600

See Symfony Performance.

Using Redis for application caching

To use Redis for application caching, follow the corresponding configuration instructions.

Browse maintained versions:3.01.122.02.32.6

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.desso for oroinc.fr
Back to top