How to Install and Run SAP Hybris 1905 locally on a windows 10 system

Yogesh Suthar
4 min readMar 22, 2021

Hello guys, in this article I will walkthrough you the installation steps for the for Hybris 1905 on a windows system. Before we proceed, make sure your computer system has enough space on the C drive and at least 4 GB of ram.

Step 1 — Download and Unzip hybris-commerce-suite

Download the Hybris 1905 source zip file from SAP Market Place.

Once downloaded, copy it in a desired folder in your local system,. In my cased, I have copied it in S:\projects\hybris-commerce-suite folder (I will be using this folder for all hybris folder path, so kindly adjust it accordingly in your system)

Unzip it at the same folder. The folder shall look like below:

Now, we can deleted the zipped folder of Hybris from this folder path.

Step 2 — Installation of Recipe

Recipe concept is available from Hybris v5.5 and later. It is used to install B2C accelerators, B2B accelerators, Telco accelerators, etc.

Before proceeding with Recipe installation, kindly make sure that there is only bin folder inside hybris folder.

The command to install Recipe install.bat –r recipeName.

So, go to installer path in command prompt and run below coto install recipes using :

S:\projects\hybris-commerce-suite\installer>install.bat -r b2c_acc_plusS:\projects\hybris-commerce-suite\installer>install.bat -r b2c_china

If you encounter any issue related to initial password, then run below command: (This is to add the required extensions to the localextensions.xml file as per the recipe name we have provided above)

S:\projects\hybris-commerce-suite\installer>install.bat -r b2c_china -A local_property:initialpassword.admin=1414

Now we can shall be able to see that Recipe command ran successfully.

Now open the hybris folder and check the folders created.

Inside config folder, we can see that localextensions.xml got created with all the extensions specified in the given recipe.

localextensions.xml after installing Recipe looks like below

We can find all the available recipe in hybris in \installer\recipes folder.

Step 3 — Modulegen (Optional)

This is an Ant command which is used to generate the set of logically related extensions at once.

Navigate to platform folder in command prompt and Run the below command

setantenv.bat

Now, run the modulegen command as below:

ant modulegen -Dinput.module=accelerator -Dinput.name=training -Dinput.package=com.hybris.training -Dinput.template=develop

We have specified module as accelerator which means, we are developing B2C module.

We can specify any name to the module, we have given training for the same.

We can also specify the java class package prefix, we have given as

com.hybris.training

Template specifies whether configuration is for development or production.

We have given it as develop as we are doing for development environment.

We should be able to see the Build success in the command prompt as below:

Step 4 — Run ant clean all

Run below command in the command prompt.

ant clean all

Make sure the build is success.

Step 5 — Start the hybris server

Start the Hybris server using the below command

hybrisserver.bat debug

Step 6 — Initialization

We can do the initialization of the system in 2 ways:

  • Using below command in command prompt ant initialize
  • Initialize from HAC directly.

Lets do it using HAC,

  • Access the url - http://localhost:9001 and make sure Toggle all checkbox is selected.
  • Click on initialize button and confirm the initialization:

This will take considerable amount of time based on the system memory and processor as it creates new DB schema, tables and loads the configured data.

Wait till the initialization gets finished as shown in below image:

Step 7 — Host Entry

Add below Host mappings in the host file at the at path C:\Windows\System32\drivers\etc\

127.0.0.1 apparel.local
127.0.0.1 electronics.local

Step 8 — Access the sample site locally

Now try to access the sample sites shipped with Hybris using below url of the sample Apparel UK site:

http://apparel.local:9001/trainingstorefront/?site=apparel-uk

Thanks for the reading the article. I hope it would have helped you.

--

--

Yogesh Suthar

UI Developer with overall experience of 12+ years in HTML5, CSS3, JavaScript, Angular, React, NextJs, Gatsby, Hugo, HandlebarJs, Grunt, Hybris, PWA, GIT, etc.