This purpose of this blog is to help all those people who wish to learn SAP Hybris Commerce but do not know where to start from. Here I will guide you through the steps to install SAP Hybris on your local machine.I will start with initial setup of SAP Hybris out-of-the-box B2C and B2B Accelerators.I will also cover prerequisites, software installation details and Dev environment Setup steps.

System Requirements

Hardware requirement

Demonstration/DevelopmentMinimumRecommended
CPUDual Core like i5Quad Core like i7
RAM8GB16GB
Hard Disk7200 rpm IDESSD
Hard Disk Space10 GB20 GB

ProductionSmall ServerLarge Server
CPUDual Core like i5multiple Quad Core CPUs
RAM4GB16 GB or more
Hard DiskRAID 7200 rpm SAS/SCSIRAID 1/5 10000 rpm+ SAS SCSI
Hard Disk Space40 GB>40 GB
Network100 M Bit EthernetOne or two 1 GB Ethernet adapters

Software requirement

Java VersionJDK 8 and above
Application ServerOut-of-the-box hybris server will be used which is bundled based on Tomcat 7.0.41
Web BrowserAll the latest versions of web browser
EclipseLatest version of Eclipse can be used as IDE

Installation Guide

  • Download and Unzip Hybris Commerce Package.The hybris Commerce Suite package is downloaded as ZIP archive files. To download and unpack the hybris Commerce Suite packages, perform the following steps:

Go to the SAP Software Download Center or SAP ONE Support Launchpad and log in with your S-user ID. Search for “SAP Commerce” in Downloads using the search field provided.

Extract the ZIP archives into directory. For Ex – C:\hybris\

Note: When extracting a ZIP file on Windows, you may encounter an error due to  path length. You may receive an error message for ex- "Cannot create  <pathname> total path and file name length must not exceed 260  characters". If so, you can:   
Use an alternative extraction tool, one that doesn't limit the path or name size. For Ex – 7-zip is a free tool which I used
  • After all the files have been successfully downloaded and unpacked, we need to build the hybris. To build hybris, perform the following steps:

Set Up Apache Ant

Before you build the hybris, you need to configure Apache Ant, a tool for automating software build processes. SAP Hybris comes with pre-bundled Apache Ant:

  • setantenv.bat batch file for Microsoft Windows systems
  • setantenv.sh shell script file for Unix-related systems (such as Linux or Mac OS X)

Performing the Build Procedure

  • Open a command prompt in Microsoft Windows (shell in Unix).
  • Navigate to the ${HYBRIS_BIN_DIR}/platform directory, for example : C:\hybris\bin\platform.
  • Run the setantenv file that matches your operating system.
For Windows systems enter setantenv.bat
For Unix Systems, including MacOSX enter ./setantenv.sh

This command sets up Apache ant environment.

  • Go to the Windows command prompt (shell in Unix), navigate to the ${HYBRIS_BIN_DIR}/platform directory and type ant clean all. This is the command which is used for actual build process.
  • The application build process now prompts you to choose a configuration template for your environment. You can choose from either development, or production.

Select the appropriate configuration template.

 To choose the default develop template, press Enter.
To choose the production template, type production, then press Enter.

You should see output similar to the following:

BUILD SUCCESSFUL
  • After you have successfully done with the build process, you will find the /config directory. The default location is ${platformhome}/../../config. For ex-C:\hybris\hybris\config
  • It contains localextensions.xml, local.properties files and other folders

Starting the Application Server and Deploying the Application

  1. Navigate to <HYBRIS_BIN_DIR>/platform. For ex-C:\hybris\bin\platform
  2. Start SAP Commerce Server using the appropriate command for your platform.

Normal mode is the default mode. To start in debug mode, add the debug parameter to the start command.

To start in normal mode in 
Windows use hybrisserver.bat
Unix use ./hybrisserver.sh
To Start in debug mode in 
Windows use hybrisserver.bat debug
Unix, use ./hybrisserver.sh debug
  • Start the hybris server on Windows Then wait until the server has started up.
On Windows use  $(HYBRIS_BIN_DIR) /platform/hybrisserver.bat
On Unix use $(HYBRIS_BIN_DIR) /platform/hybrisserver.sh
  • Initialize your platform using the administration console (http://localhost:9001/, log in with admin user, leave all defaults), wait until fully initialized.

Initialize or Update the System

System Initialization

hac -> Platform -> Initialize

  • Entire type system is created from scratch.
  • ALL database tables are dropped.
  • Data model is created from scratch as defined in the items.xml files.
  • New tables with initial dataset are created.
  • Existing data model definitions will be lost!

System Update

hac -> Platform -> Update

  • Existing tables are updated to match changes in the domain model.
  • No loss of data!
  • Adding newly defined types to the type system definition in the database
  • Modifying type system definition in the database to match the definition in the domain model

Installing SAP Commerce Using Installer Recipes

  1. In the latest versions of SAP Hybris commerce with version 6.0 and above the installation has been automated for development and demonstration purposes by using an installer recipe. Recipes are gradle scripts that take care of creating directories, moving files, updating configuration and properties files, and initializing the system.
  2. The installer is currently only intended to install SAP Commerce in development environments or for demonstration purposes. Do not use the installer to install SAP Commerce in a production environment.
  3. With the installer, we can easily install the SAP Commerce setup with the desired applications, such as B2C Accelerator. Each installer recipe includes SAP Commerce Platform and all the required modules for the specific application. The installer replaces the manual procedure for configuring and setting up SAP Commerce. Caution- Don’t use the installer to run one recipe after another on the same SAP Commerce. The installer won’t uninstall previous configurations, and doesn’t restore your SAP Commerce file system to its original settings. To install a different recipe, use a clean environment.
  1. Go to the installer directory, for example: C:\hybris\installer.

If you don’t know the name of your installer recipe, you can verify it in the recipes directory, for example: C:\hybris\installer\recipes.

  • Install the SAP Commerce setup you need using the required recipe by entering the following command
On Windows: install.bat -r <recipe_name> 
On Linux or Mac: ./install.sh -r <recipe_name>

For example, to install SAP Commerce with B2C Accelerator, enter the following command:

On Windows: install.bat -r b2c_acc 
On Linux or Mac: ./install.sh -r b2c_acc

Note- Please refer to the readme.txt file provided in the recipe folder for specific instructions on how to install the particular SAP Commerce setup that your require. Some recipes include additional instructions to install or initialize SAP Commerce.
  • Initialize SAP Commerce by entering the following command:
On Windows: install.bat -r <recipe_name> initialize 
On Linux or Mac: ./install.sh -r <recipe_name> initialize

For example, to initialize SAP Commerce with B2C Accelerator, enter the following:

On Windows: install.bat -r b2c_acc initialize 
On Linux or Mac: ./install.sh -r b2c_acc initialize
  • Start SAP Commerce by entering the following command
On Windows: install.bat -r <recipe_name> start 
On Linux or Mac: ./install.sh -r <recipe_name> start

For example, to start SAP Commerce with B2C Accelerator, enter the following:

On Windows: install.bat -r b2c_acc start 
On Linux or Mac: ./install.sh -r b2c_acc start

Your SAP Commerce is now installed and ready for you to use.

Accessing the Storefront

The out-of-the-box storefront can be accessed now by using below links for B2C Accelerator as follows

http://localhost:9001/yacceleratorstorefront/electronics/en/?site=electronics

http://localhost:9001/yacceleratorstorefront/apparel-de/en/?site=apparel-de

http://localhost:9001/yacceleratorstorefront/apparel-uk/en/?site=apparel-uk

Leave a Comment