InstallationInstall Sana Webstore on Web and Database Server

Install Sana Webstore on Web and Database Server

Sana Commerce 9.2
Your connector

Install Sana Enterprise

 NOTE

Applies to: Sana Enterprise

Sana Enterprise is the integrated e-Commerce solution for large businesses that need to handle high traffic volume and require optimized performance. It is optimized for large installations which demand high availability and scalability.

Sana Enterprise can be installed on multiple servers and use more than 2 cores per server to increase performance and reliability. The number of servers on which Sana Enterprise can be installed is specified in the Sana Commerce license. For more information, see 'Sana Enterprise License'.

By configuring Network Load Balancing (NLB) you can distribute the traffic across several servers that are running Sana Enterprise to provide reliability and performance for the Web servers.

In Sana Admin you can see all registered servers and manage the active/passive servers. Multiple servers can be active simultaneously to optimize Sana infrastructure and deliver unsurpassed performance, reliability and availability. For more information, see 'Server Management'.

Install Sana Enterprise on multiple servers

Step 1: Install Sana Commerce using the Sana Commerce Installer on multiple servers.

  1. Optional: If you have a running Sana Commerce solution and you have already configured your web store, back up your Sana Commerce SQL database before setting up new instances.
  2. Install Sana Commerce on the first server.
  3. Remove the database user from the SQL database created during installation. This is needed for the correct installation of Sana Commerce on other servers.
  4. Repeat steps 2 and 3 on all other servers. Each time when you install a new instance of Sana Commerce overwrite the Sana Commerce SQL database. Do not remove the database user when the last instance of Sana Commerce is installed.
  5. Optional: If you did step 1.1 restore the Sana Commerce SQL database from the backup file.

All instances of Sana Commerce are now installed on all servers.

Step 2: Create the "InstalledPackages" folder in the root directory of the Sana Commerce solution on all Web servers where Sana is installed.

Step 3: Modify the "Web.config" file of the Sana Commerce frontend on all Web servers that are hosting Sana Commerce:

  1. Decrypt the following configuration sections in the "Web.config" file of the Sana Commerce frontend: "connectionStrings", "sanaCommerce/securityKeys" and "system.web/machineKey".

    Execute the following command from the command prompt to decrypt each configuration section in the "Web.config" file:
    aspnet_regiis -pdf [configuration section] [path to the 'web.config' file]
    
    Before executing the command enter the configuration section name you are going to decrypt and the path to the "Web.config" file of the Sana Commerce frontend.

    Example:
    C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pdf "sanaCommerce/securityKeys" C:\inetpub\wwwroot\SanaStoreEnterprise\Frontend
    
  2. machineKey and securityKeys should be the same in the "Web.config" file of the Sana Commerce frontend on all servers. You can copy them from the 'web.config' file on the server where you decrypted these sections and paste to the "Web.config" file on all other servers.

  3. Sana Commerce should connect to the same SQL database. Therefore, the SQL Server connection string should be the same in the "Web.config" file of the Sana Commerce frontend on all servers. You can copy it from the "Web.config" file on the server where you decrypted it and paste to the "Web.config" file on all other servers.

  4. Locate the <sessionState> section and change it on all servers to:
    <sessionState timeout="60" mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="LocalSqlServer">
    </sessionState>
  5. In the <appSettings> section change the value of the "PackagesDirectoryPath" key to "..\InstalledPackages".

  6. Add an extra connection string to the <connectionStrings> section:
    <add name="SharedPackageStorage" connectionString="..\@data\packages" providerName="NetworkShare"/>
    
  7. Now you need to encrypt the following configuration sections in the "Web.config" file of the Sana Commerce frontend on all servers: "connectionStrings", "sanaCommerce/securityKeys" and "system.web/machineKey".

    Execute the following command from the command prompt to encrypt each configuration section of the "Web.config" file:
    aspnet_regiis -pef [configuration section] [path to the 'web.config' file]
    
    Before executing the command enter the configuration section name you are going to encrypt and the path to the "Web.config" file of the Sana Commerce frontend.

    Example:
    C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pef "sanaCommerce/securityKeys" C:\inetpub\wwwroot\SanaStoreEnterprise\Frontend
    

Step 4: The application pool of the Sana web store should run under a single domain account in IIS on all Web servers that are hosting Sana. The user under whom the application pool of the Sana Commerce solution is running in IIS must have read/write permissions to the root directory where Sana is installed. This should be done on all Web servers.

Step 5: Share the "files" folder of the Sana Commerce solution (Frontend\content\files) either on one of the Web servers or on a separate server. This folder stores the frontend files.

On all servers that are hosting Sana Commerce you should remove the "files" folder from your Sana Commerce solution, except the shared "files" folder, and create the directory symbolic link "files" instead of the 'files' folder. This directory symbolic link will be used to synchronize all files from the shared "files" folder on all servers.

 NOTE

It is recommended to create a new shared "files" folder on a separate server, which is not a Web server that hosts the Sana Commerce web store, copy the contents of the "files" folder from your Sana Commerce solution to the shared "files" folder and create a directory symbolic link "files" to this shared "files" folder on all servers that are hosting Sana Commerce. Moreover, if you are looking for high availability, by setting up data redundancy you can eliminate single points of failure. Setting up the high-availability infrastructure of this kind is a responsibility of your system administrators. For more information, read about data redundancy and high-availability cluster.

To create a symbolic link the mklink command is used:

  1. Open the command prompt and navigate to the "Frontend\content" directory of the Sana Commerce solution. In this directory we will create the "files" directory symbolic link.
  2. Execute the mklink command using the /D parameter that creates a directory symbolic link:
    mklink /D files <path to the shared "files" folder>
    
    Example:
    mklink /D files \\server1\files
    
 NOTE

The "files" directory symbolic link should be created in the "Frontend\content" directory of the Sana Commerce solution on all Web servers.

For more information about the mklink command, see 'Mklink' in the Microsoft Library.

Step 6: Just in the same way as described for the "files" folder in the previous step share the "@data" folder (stores index, logs, sitemap and notification files) of the Sana Commerce solution. Create the directory symbolic link for the "@data" folder.

Now Sana Enterprise is installed on multiple Web servers and it shares the database, index and log files, sitemap and frontend files.

InstallationInstall Sana Webstore on Web and Database Server