Configure Habitat on Sitecore V9.1
To install Habitat on your local machine it's required to have Sitecore 9.1 instance on your system. First install sitecore 9.1 with the of below article.
https://sharjeelswork.blogspot.com/2019/04/sitecore-91-installation-step-by-step.html
Step 1: Enable ASP.NET 4.7
Step 2: Download and Unzip Habitat-1.7.zip package from https://github.com/Sitecore/Habitat/releases
https://sharjeelswork.blogspot.com/2019/04/sitecore-91-installation-step-by-step.html
Step 1: Enable ASP.NET 4.7
Open (Windows Feature on or off) from Control Panel. Click on check box for ASP.Net 4.7 and click ok.
Step 2: Download and Unzip Habitat-1.7.zip package from https://github.com/Sitecore/Habitat/releases
Download Habitat-1.7
Unzip the package to a folder on your local machine, for me it’s placed in my system at
Location - F:\RSI\SharjeelsWork\RD\Habitat-1.7
Step 3: Modify Config Files
It is required to change in few configuration files. In those files you must update the settings with the appropriate values for your environment.
- Habitat.Dev.config In the configuration folder, modify the file. Modify the sourceFolder variable to match the path to your Habitat Src
Location: .\src\Project\Habitat\code\App_Config\Environment\Project\Habitat.Dev.config
- Habitat.Website.config Modify the TargetHostName variable to match the path to your Habitat Sitecore instance (example: 9Dot1.sc)
Location: .\src\Project\Habitat\code\App_Config\Include\Project\Habitat.Website.config
- Gulp-config.js Modify the instance Root variable to match the path to your Habitat Sitecore instance root (example: C:\inetpub\wwwroot\9Dot1.sc)
Step 4: Configure gulp and node js First we configure gulp on the same location where our source code is placed. Run below commands in node.js cmd
npm install gulp-cli -g
npm install gulp -D
npx -p touch nodetouch gulpfile.js
After successful run of above commands install npm modele with command npm install
Step 5 :Open Visual Studio 2017 and Run as Administrator. Open the Habitat solution placed at Location- F:\RSI\SharjeelsWork\RD\Habitat-1.7. Now Open the Visual Studio 2017 Task Runner Explorer.
Go to Habitat Solution in VS 2017, run Task “default”
Errors: I
got error in syncing unicorn as display in below screen shot.
To fix above error I just run http://9dot1.xconnect/ on my system and then re sync the unicorn item but again got same issue. After searching on net I got help from(https://community.sitecore.net/developers/f/5/t/10052). After applying steps written in this article I got error regarding Rainbow.SFS.SerializationFolderPathMaxLength issue
To fix this issue I made changes in Rainbow.config file and increase the value of Rainbow.SFS.SerializationFolderPathMaxLength upto 120.
Step 6: Rebuild search indexes Go to your Sitecore Instance (example:http://{sitename}/sitecore).
Note: This is required for Habitat search-based features to work properly. Click on rebuild the indexes.
Step 7: Habitat setup done and ready to use. To verify please go to your IIS and browse the instance
Habitat application will run on you system as shown in below screen.
On the basis of Habitat sample we can work on many things related to component in sitecore. As this solution is based on Helix based Design Principle so all the component behave as an individual module.
Happy Learning!!!
Comments
Post a Comment