# Installation

## Launching Installer

The first screen when you launch the application will be this:

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-02f516f4d030bf77e043aab9b767fc6055be681a%2FLaunching_Installer_Image_1bbn.png?alt=media" alt="" width="820"></div>

### Launch the installer in different Operating Systems

* Unzip the OIM installer folder to find the executable(.exe) file.
* The steps to launch the installer in different Operating Systems (OS) are given below. Follow the steps given for the OS that you are using.

| **Windows**                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | **Linux**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>\* Double click the executable <em>.exe file given in the application folder (It is advisable to run .exe file by right-clicking <strong>Run as administrator</strong> where \* is replaced with the application version).</em><br>If one instance of this release is already installed, then the user will be notified.<br>\* Click <strong>yes</strong> to continue with the installation. It will then display the uninstallation key for the current installation.</p> | <p><strong>Before Installation</strong><br>\* Extract the zip file. Make sure user who will run installer owns the files and has full access to extracted files.<br>\* Create empty directory with full access(it should not be inside installation directory) and export it's path to OPSHUB\_TEMP\_DATA variable as shown in below example:<br><strong>export OPSHUB\_TEMP\_DATA=/home/setup/temp</strong><br>\* If you are doing a silent installation, make sure you have provided the same path for OPSHUB\_TEMP\_DATA as provided during <a href="registration#silent-registration-for-linux">Silent Registration for Linux</a>.<br>\* If Linux has NFS (Network File System) based file system, please add the following line in OIM user's '.bashrc' file:<br><strong>In /home/{OIM user}/.bashrc file, add the following line at the end:</strong><br><em><strong><code>export JAVA\_OPTS="$JAVA\_OPTS -XX:+StartAttachListener"</code></strong></em><br><strong>Without the Java option, the server start up will fail. The error details are available</strong> <a href="../help-center-index/troubleshooting-index/errors-index/installer-error-solutions/could-not-self-attach-to-current-vm-using-external-process"><strong>here</strong></a><strong>.</strong><br>\* See minimal access required to install OpsHub Integration Manager <a href="#minimal-access-required-to-run-linux-installer-using-external-file">here</a>, when you do not have root access.<br><br><strong>To Run sh file</strong><br>\* Open terminal window and go to the folder containing the install.sh file.<br>\* Execute the following command: <strong>sudo -E sh install.sh</strong>.<br>\* To run the sh File, you need to have access to Linux UI. This is because the installation process requires user inputs through UI. Installation won't get completed through remote terminal connection (i.e. Putty).<br><br><strong>To Run sh File from External File (Silent Installation)</strong><br>To install OpsHub Integration Manager through terminal connection (i.e. Putty), follow the steps given below:<br>\* Complete user registration as described <a href="registration#silent-registration-for-linux">here</a>.<br>\* Download and modify OpsHubAutoInstall.xml file as per your requirement by click <a href="installation/prepare-xml-for-auto-installation-upgradation">here</a>.<br>\* Make sure, you will transfer the modified file on the instance where you want to install OpsHub Integration Manager.<br>\* Set an environment variable OPSHUB\_AUTO\_INSTALL on the installation instance, the value of variable is the path to the OpsHubAutoInstall.xml file. File name can be different.<br><strong>For example, export OPSHUB\_AUTO\_INSTALL=/home/Downloads/OpsHubAutoInstall.xml.</strong><br>\* After setting environment variable, run the installer with command <strong>sudo -E sh install.sh</strong>.<br>\* Please refer <a href="#possible-error-during-silent-installation-upgradation">Possible Error</a> section for trouble shooting error(s) occurred during Installation.</p> |

#### Recommended Installation Path for <code class="expression">space.vars.SITENAME</code> Installer for Linux

* It is recommended to install or perform migration of the <code class="expression">space.vars.SITENAME</code> in the /opt folder or /user/local folder.
  * For <code class="expression">space.vars.SITENAME</code> migration, if the <code class="expression">space.vars.SITENAME</code> is not installed at the above places, then follow the steps mentioned here.
  * Reason: SELinux prevents Linux users from running a <code class="expression">space.vars.SITENAME</code> service in the user's home directory. Hence, the user needs to avoid installing <code class="expression">space.vars.SITENAME</code> in the home directory.

#### Minimal access required to run linux installer using external file

* <code class="expression">space.vars.SITENAME</code> Installation Directory should be owned by user who run installer/migrator and has following permissions.

Here are the required permissions:

| **Permission** | **Directory**                                                                                                   |
| -------------- | --------------------------------------------------------------------------------------------------------------- |
| --x            | /usr                                                                                                            |
| --x            | /proc                                                                                                           |
| r-x            | /usr/bin                                                                                                        |
| r-x            | /usr/bin/\*                                                                                                     |
| --x            | /usr/lib64                                                                                                      |
| r-x            | /usr/lib64/\*                                                                                                   |
| --x            | /usr/share (if user edits file using nano)                                                                      |
| r-x            | /usr/share/\*                                                                                                   |
| rw-            | /etc/systemd/system (if user needs <code class="expression">space.vars.SITENAME</code> as a service for Ubuntu) |

* Note: For HSQLDB, root access is required when user needs to install/migrate <code class="expression">space.vars.SITENAME</code>.

#### Possible error during Silent Installation/Upgradation

\[ Starting automated installation ]

\[Timestamp] java.util.prefs.FileSystemPreferences$2 run

INFO: Created system preferences directory in java.home.

com.izforge.izpack.installer.InstallerException: Validating data for panel UserInputPanel.EmailIdVerificationForExistingCode was not successfull

com.izforge.izpack.installer.InstallerException: Validating data for panel UserInputPanel.EmailIdVerificationForExistingCode was not successfull

at com.izforge.izpack.installer.AutomatedInstaller.validatePanel(Unknown Source)

at com.izforge.izpack.installer.AutomatedInstaller.installPanel(Unknown Source)

at com.izforge.izpack.installer.AutomatedInstaller.doInstall(Unknown Source)

at com.izforge.izpack.installer.Installer.main(Unknown Source)

\[ Automated installation FAILED! ]

**Solution**

Make sure you have performed the following steps correctly:

* You have registered as described [Registration - Silent Registration for Linux](https://docs.opshub.com/v7.203/getting-started/registration#silent-registration-for-linux) before Installation/Upgradation.
* You have registered using the same path for which you install/upgrade <code class="expression">space.vars.SITENAME</code>.
* You have used the correct verification code.
  * Verification Code is unique for each machine and installation path. The code generated on a different machine and for different path won't work.
* You have export same value for OPSHUB\_TEMP\_DATA during Registration and Installation/Upgradation.

### License Information

On launching the installer, you will see the license agreement window that contains all license-related terms and conditions.

If you agree with the license details, then only you can move to the next step i.e. Installation.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-ab0542a64346b7e11f2de9081c87640bf041bd24%2FDefault_Installation_Image_1La.png?alt=media" alt="" width="820"></div>

License Information window has the details of the trial license and the contact information to purchase the license.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-dd679405fe925c63d6f4f567db72cc59333802d2%2FDefault_Installation_Image_2LH.png?alt=media" alt="" width="820"></div>

#### Possible exceptions

While uploading the license from license management tab, <code class="expression">space.vars.SITENAME</code> throws exceptions as below:

* **Unable to install license** `com.opshub.license.exception.LicenseException`: Failed to get license content because of If you are accessing OpsHub from different machine then change localhost to ip address of the machine where OpsHub installed.
* **The filename, directory name, or volume label syntax is incorrect**

com.opshub.license.install.OpsHubLicenseManager.getLicenseContent(OpsHubLicenseManager.java:60) at com.opshub.license.install.OpsHubLicenseOperationManager.getLicenseContent(OpsHubLicenseOperationManager.java:34) at com.opshub.license.install.LicenseInstaller.getOHLicenseContent(LicenseInstaller.java:128) at com.opshub.license.install.LicenseInstaller.installLicense(LicenseInstaller.java:57) at com.opshub.license.install.LicenseInstaller.installLicense(LicenseInstaller.java:51) at com.opshub.license.server.LicenseBO.validateAndInstallLicense(LicenseBO.java:329) at com.opshub.license.server.LicenseServer.validateAndInstallLicense(LicenseServer.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.metaparadigm.jsonrpc.JSONRPCBridge.call(JSONRPCBridge.java:1122) at com.opshub.JSON.JSONRPCServlet.service(JSONRPCServlet.java:349) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at com.opshub.JSON.CacheControlFilter.doFilter(CacheControlFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:495) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:767) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1347) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.FileNotFoundException: If you are accessing OpsHub from different machine then change localhost to ip address of the machine where OpsHub installed.

* **The filename, directory name, or volume label syntax is incorrect**

at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at de.schlichtherle.license.LicenseManager.loadLicenseKey(LicenseManager.java:741) at com.opshub.license.install.OpsHubLicenseManager.getLicenseContent(OpsHubLicenseManager.java:55)

## Installation

Here is a video on how to install <code class="expression">space.vars.SITENAME</code> on the Windows machine:

{% embed url="<https://youtu.be/Is5sDKV01P0>" %}

### Select Installation Path

* You now have to select the installation directory. Before you select a directory, make sure the directory is empty. All the log files, configuration files, and servers are placed in this directory. If the directory is not available, you can create a directory as per your own specifications.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-8d4bc26ce9e290011d60767fafa575ade3564a65%2FDefault_Installation_Image_P3.png?alt=media" alt="" width="820"></div>

### Registration

* Each installation must be registered with OpsHub. Registration can be done either in Online or Offline mode. Please refer [Registration](https://docs.opshub.com/v7.203/getting-started/installation/registration) section for more details.

### Database Selection

The user should select the Database type for installation from the dropdown list. Database connector jar is required to connect to the database. Refer [Download Database Connector jar](https://docs.opshub.com/v7.203/prerequisites#download-database-connector-jar) to get the download link of the database connector jar.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-4a2c11dd757bf61cc18af323f45589b6cad992b3%2FInstallation_DatabaseSelection.png?alt=media" alt="" width="900"></div>

Click the checkbox adjacent to **Advance configuration** option if you have one of the following requirements:

{% if "OpsHub Integration Manager" === space.vars.SITENAME %}

* Install <code class="expression">space.vars.SITENAME</code> in https
  {% endif %}

* Install multiple instances of <code class="expression">space.vars.SITENAME</code> on a single instance

* Need to create database manually

{% if "OpsHub Integration Manager" === space.vars.SITENAME %}

* Need to change encryption algorithm (by default, it is AES 256)
  {% endif %}

Now, select **one of the five types of database selection for installation** as mentioned below.

The installer progresses to next panel in accordance with the user selection.

| **Database Type**             | **Installation Details**                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Embedded HSQL**             | <p>This type of installation starts from the next panel. No more inputs from the user are required. It installs <code class="expression">space.vars.SITENAME</code> on HSQL database packaged along with <code class="expression">space.vars.SITENAME</code> installer.<br>> <strong>Note</strong>: This installation is not recommended for production.<br>Read more: Installation with embedded HSQL (Default)</p>                                                                    |
| **MySQL Server**              | <p>This type of installation further asks for MySQL Server database parameters. You need to specify connection parameters to connect to MySQL and the path of the connector jar, which is required for database transaction done by <code class="expression">space.vars.SITENAME</code>.<br>Read more: Installation with MySQL Server<br>> <strong>Note</strong>: Here for the Connector Jar, select the path of the executable Jar file named mysql-connector-java-5.1.35-bin.jar.</p> |
| **Oracle**                    | <p>This type of installation further asks for Oracle Server database parameters. You need to specify connection parameters to connect to Oracle and the path of the connector jar, which is required for database transaction done by <code class="expression">space.vars.SITENAME</code>.<br>Read more: Installation with Oracle</p>                                                                                                                                                   |
| **MS SQL / Azure SQL Server** | <p>The input form allows you to select Authentication mode.<br>Read more: Installation with MS SQL/Azure SQL Server</p>                                                                                                                                                                                                                                                                                                                                                                 |
| **PostgreSQL**                | <p>This type of installation further asks for PostgreSQL database parameters. You need to specify connection parameters to connect to PostgreSQL and the path of the connector jar, which is required for database transaction done by <code class="expression">space.vars.SITENAME</code>.<br>Read more: Installation with PostgreSQL</p>                                                                                                                                              |

Notes:

* For MS SQL/Azure SQL Server and MySQL Server, **Database User Name**

  can contain:

  * Alphabets (a-z,A-Z)
  * Numbers (0-9)
  * Special characters from the list:

    !@#$^&\*()\_+|\[];:'><,.?/\`\~-=
* For Oracle, **Database User Name** can contain:
  * Alphabets (a-z,A-Z)
  * Numbers (0-9)
  * Special characters from the list: !@#$^&\*()\_+|:'><,.?\`\~-=
* **Database User Password** can contain:
  * Alphabets (a-z,A-Z)
  * Numbers (0-9)
  * Special characters from the list:

    !@#$^&\*()\_+|\[];:'><,.?/\`\~-=

Given below are further details associated with each installation selection.

### Installation with embedded HSQL (Default)

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-64b293d93f6a8fa3aaa4d4874744d0ca46786716%2FInstallation_DatabaseSelection1.png?alt=media" alt=""></div>

### Installation with MySQL Server

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-a27b74eee7a0fc347a392ddd0939ebcb5cd9e35d%2FInstaller_Image_2b_C1.png?alt=media" alt="" width="900"></div>

Notes : For this application, the default database name will be `opshub` and `reportsdb`.

### Installation with Oracle

Select Oracle Database Type

* CDB or Container Database refers to the multitenant architecture in Oracle. CDB type was introduced with Oracle 12c version. User can use the instructions given in the following screenshot to find out whether your Oracle database type is CDB or not.
* The user must select the connection type based on the oracle configuration used to connect the above selected database type. It can be either **SID** or **Service name**.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-84bcaff7b056e38acd7780f710b0eece28fc1f48%2FInstaller_Image_4Ob.png?alt=media" alt="" width="900"></div>

Follow the instructions shown in installer for downloading connector jar.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-e031407fd8be1ece9241a3ff4e65479fffc0af7d%2FInstaller_Image_3c_OD1.png?alt=media" alt="" width="900"></div>

Notes:

* The default user name will be 'C##opshub' and 'C##reportsdb' for Oracle CDB instance with CDB$ROOT container.
* The default user name will be 'opshub' and 'reportsdb' for Oracle Non-CDB instance or CDB instance with container other than CDB$ROOT.

For the **Oracle cluster** instance, to get the instance name for <code class="expression">space.vars.SITENAME</code> installation, please check the below SQL to get the

currently logged in instance name.

* Log in to the oracle instance \[Cluster] using SQL plus with username, password and service name:**sqlplus username/password\@connect\_identifier**
* Run the below SQL:
  * If service name is configured for the oracle instance:

    `SELECT sys_context('USERENV','SERVICE_NAME') AS Instance FROM dual;`
  * If SID is configured for the oracle instance:

    `select instance_name from v$instance;`

The output value is the instance name that will be used in installation process.

> **Note**: All these operations must be allowed with ADMIN OPTION.

If you have to install the pre-requisite for Oracle with **version 11g (Release 2)/12c**, follow the instructions below:

* **Pre-requisite for Oracle with version 11g**:

For Oracle 11g version, ojdbc6.jar or ojdbc5.jar is required. The path for ojdbc6.jar or ojdbc5.jar is required while installing <code class="expression">space.vars.SITENAME</code> with Oracle database.

* **Pre-requisite for Oracle with version 12c**':

For Oracle 12c version, ojdbc7.jar or ojdbc6.jar is required. The path of the executable jar files (such as ojdbc7.jar or ojdbc6.jar)is required while installing <code class="expression">space.vars.SITENAME</code> with Oracle database.

* **Pre-requisite for Oracle with version 19c**:

For Oracle 19c version, ojdbc8.jar or ojdbc10.jar is required. The path of the executable jar files (such as ojdbc8.jar or ojdbc10.jar is required while installing <code class="expression">space.vars.SITENAME</code> with Oracle database.

**Known Limitations**

* Currently SSL\_CLIENT\_AUTHENTICATION is not supported for Oracle database.

**Default quota size setting**

* Default tablespace quota size of user for the opshub database is 2000M

  ( which is equal to 2GB) .
* If you encountered with following error "ORA-01536: space quota exceeded for tablespace 'USERS'" in <code class="expression">space.vars.SITENAME</code>, then

  it is requires to increase the default quota size for opshub database.

  * Query To change the tablespace quota for opshub database is :

    **ALTER USER \<opshub\_dbname> QUOTA \<size\_of\_tablespace> ON users;**
  * For example, to increase the quota size from to 10GB for opshub database "opshub", then execute command as **ALTER USER opshub QUOTA 10000M ON users;**

### Installation with MS SQL/Azure SQL Server

> **Note** :Azure SQL is an alias for MS SQL on cloud.

**Character Encoding Considerations**:

* If the end systems to be configured in the <code class="expression">space.vars.SITENAME</code> include characters beyond standard English or ASCII and are incompatible

with the Latin1\_General\_CS\_AS collation (default collation), consider [Advance Installation](#advance-installation) option.

* Mark the checkbox, "Check this if you will be creating databases manually" option during installation. The instructions to create databases are mentioned in the section [Manual creation of databases](#manual-creation-of-databases)

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-6a5ebda9430893788cf3d033050782a7a4f7fdf1%2FMSSQL_AuthMode_Windows.png?alt=media" alt="" width="900"></div>

* For using Named Instance of MS SQL Server, append the Instance Name to the Database Host Name, separated by %. For e.g.,

  localhost%SQLExpress. In the case of name Instance, port is optional.
* **MS SQL/Azure SQL Server Database Name Input:**
* The database name given in input 'Database Name' will be used to test the connection with the database server. The input needs\
  to be given when your database user doesn't have access to the 'master' database. If the database user has access to the\
  'master' database, then the input can be left blank.
* If the database is to be created by <code class="expression">space.vars.SITENAME</code>, then the database user must have 'master' database access.\
  In that case, the 'Database Name' input is not required and can be set to empty or 'master'.
* If the installation is to be done with an already created database, then the database user must have access on that database.\
  In that case, the 'Database Name' input needs to be set to the name of the already created database.
* For this application, the default database name will be 'opshub'.

**Prerequisites for MSSQL:**

* MSSQL with version 2012 :
  * sqljdbc\_10.2.0.0\_enu.tar.gz databse connector driver.
  * The path to sqljdbc\_10.2.0.0\_enu.tar.gz is required while installing <code class="expression">space.vars.SITENAME</code> with MSSQL database.
* MSSQL with version 2014 onwards:
  * sqljdbc\_12.2.0.0\_enu.tar.gz databse connector driver.
  * The path to sqljdbc\_12.2.0.0\_enu.tar.gz is required while installing <code class="expression">space.vars.SITENAME</code> with MSSQL database.

**a) SQL Authentication Mode**

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-dd2205eaf64283c81fd1b23fe726a762dfbd6504%2FInstaller_MYSQL_b.png?alt=media" alt=""></div>

**b) Windows Authentication Mode**

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-fe77987b72f7ab470e7f5508411f401f0b123613%2FInstaller_Image_7MSb_1_b.png?alt=media" alt="" width="900"></div>

* The option to set logon user for the OpsHub Server Service appears in either of the two cases: When you have not selected advance configuration option, or when you have selected "Install OpsHub as a service" option in the advance installation screen.

Enter the required details to set logon user for the OpsHub Server Service.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-7620aa53f8484c616d2e411f55599b05ce91fc94%2FInstaller_Image_11a.png?alt=media" alt="" width="900"></div>

If Windows credentials are not added correctly during installation, the OpsHub Server service will not be started. To avoid such an occurrence, the user will have to manually set the service log-on credentials for OpsHub Server Service in case wrong Windows credentials are added at the installation time.

* Follow the below mentioned steps to set the credentials in the OpsHub Server Services:

1. Open the services application and search for OpsHub Server Service.
2. Right-click on the service, select properties and go to the **Log On** Tab.
3. Enter Windows credentials in **This account**.

* If the user is registered with a domain, the username format will be "{username}@{domain}" or "{domain}\username}". Otherwise, the username format will be ".\username".

**Windows Username should have the following pre-requisites met:**

* If the user is being registered with a domain, the format of the username will be "{username}@{domain}" or "{domain}\username}". Otherwise, the format of the username will be ".\username".
* This user can be of two types:

1. Admin user - Having all the admin privileges.
2. Basic user with at least "read & execute", "list folder contents", "Read" and "write" permissions on the installation folder.

* This user should be present in the MS SQL Server and must have **public** & **sysadmin** Server Roles in MS SQL Server.
* Ensure that the user has **Log on as a service** privilege on the machine on which <code class="expression">space.vars.SITENAME</code> will be installed.

### Installation with PostgreSQL

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-63ed49f4580f9d79eafdabbe9f4c2143aa3e8bbe%2FInstaller_Image_5b_C1.png?alt=media" alt="" width="900"></div>

Notes : For this application, the default database name will be 'opshub' and 'reportsdb'.

## Advance Installation

* Go through this section if you want to configure Advance Installation. Else, proceed to the [Installation Progress](#installation-progress) section.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-2e13757274a9fb0a2570da2820446226cf11163d%2FAdvance_Step_Installtion_Panel.png?alt=media" alt="" width="820"></div>

Let's now learn about the steps for advance installation.

### Connection Mode Configuration

* Select the type of connection protocol you want to use for running the server. If HTTPS is selected, you need to follow one more step [SSL Certificate Configuration](#ssl-certificate-configuration) for advance installation.

### OpsHub Database Custom Configuration

* If you want to create databases manually, mark the checkbox "Check this if you will be creating databases manually". The instructions to create databases have been mentioned in the section [Manual creation of databases](#manual-creation-of-databases).
* If the checkbox "check this if you are creating databases manually" is unchecked then enter the names of the databases that you want to configure and according to the database selection in the previous stage (MySql, MS SQL/Azure SQL, PostgreSQL or Oracle) databases/schemas will get created.
* Database name can contain $, \_, #, alphabets, and numbers without any space.
* If there are more than one database, give different names for each one.

### Install OpsHub server as a service

* If the application is installed as a service, the server will automatically start on system boot. You need not to start and stop the server explicitly. In case, you want to stop the services, you can go to Services, find the service and stop it manually from there.

### Data Encryption Configuration

* Advanced Data Encryption: Enables user to generate a secret key and store it in a secured location, or select an existing secret key if available. This configuration also allows the user to select the desired encryption algorithm for ensuring security of the application.

**a) Configuration for secret key location** User can select either of two options:

* Generate a secret key: With this option, a secret key would be automatically generated, and user needs to select location, where he/she desires to store this key.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-6c1d6e6875f1266f6d283fc5d1ffd11d8a9d74dc%2FAdvance_Configuration_Image_4c.png?alt=media" alt="" width="820"></div>

* Use the existing secret key: If user already has secret key available,then user should select this option. User needs to select path where "opshub.key" file is available to use that key.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-43037d3c0e667a34dd6222be7d5cb64df8a023e9%2FAdvance_Configuration_Image_5c.png?alt=media" alt="" width="820"></div>

**b) Configuration for algorithm to encrypt data** User can select his desired algorithm from the available list to ensure security of data in application.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-43037d3c0e667a34dd6222be7d5cb64df8a023e9%2FAdvance_Configuration_Image_6c.png?alt=media" alt="" width="820"></div>

### Installation Progress

The image below shows the overall progress of installation.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-b3547f96391de91e26798f87f29399db10a770fc%2FInstaller_Image_8b.png?alt=media" alt="" width="820"></div>

* Setup Shortcuts: It will add the application to the Windows program list if the operating system is Windows and will add the application to the Linux program list if the operating system is Linux. It will also create the <code class="expression">space.vars.SITENAME</code> launcher.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-97d38bd4015ad92d01af45c22f813563cef65b73%2FInstaller_Image_9Seta.png?alt=media" alt="" width="800"></div>

### Installation Success

The image below shows a successful installation.

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-977fc98feba0d1b5413716b5d1f7433b6a1650fd%2FInstaller_Image_10aa.PNG?alt=media" alt="" width="800"></div>

Once you have installed the application, click [Get Started With the Application](https://docs.opshub.com/v7.203/getting-started/logging-in) to see how to get started.

**Appendix**

## SSL Certificate Configuration

<div align="center"><img src="https://1981840166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrKmSoU6qnWKHRKaX2cZi%2Fuploads%2Fgit-blob-cfeb68aa09dcdca1d8f99b2438e45bf9a64ed8e7%2FAdvance_Configuration_Image_3SSLCa.png?alt=media" alt="" width="820"></div>

It is advisable to enter the server-host name in the given field, it might create problem with IP address in some cases. Alias of the certificate should be unique.

* Enter the name of your Organizational unit.
* Enter the Organization name.
* Enter the current City or Locality.
* Enter the current Country Code. It should be alphabetic code. For e.g., "IN" for India, "US" for America, "AU" for Australia, etc.
* Select the number of days till when the certificate should be valid.

> **Note** : Please note with the above steps <code class="expression">space.vars.SITENAME</code> will be installed with SSL configuration. But the corresponding SSL certificate imported will be self-signed. In case you want to install certificate signed by your CA authority then follow the steps given in this section [How To Import a Certificate](https://docs.opshub.com/v7.203/getting-started/installation/how-to-import-a-certificate) in appendix.

## Manual creation of databases

For manual creation of databases, you can use the following queries:

### Queries for MySQL database

Let's name the database as `db1`:

```sql
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1 CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
```

Let's name the reports database as reportsdb:

```sql
DROP DATABASE IF EXISTS reportsdb;
CREATE DATABASE reportsdb CHARACTER SET latin1 COLLATE latin1_general_cs; 
```

### Queries for MS SQL/Azure SQL Database

**Collation Considerations**

* For Multiple Language Systems:
  * If your end systems support multiple language characters, it's essential to choose a collation that supports **UTF** characters.
  * To enable UTF character support in <code class="expression">space.vars.SITENAME</code>, install it on **Microsoft SQL Server 2019 or above**.
  * Select a collation with a `UTF` postfix, for example: `Latin1_General_100_CS_AS_SC_UTF8`
* For Single Language Systems:
  * If your end systems utilize a single language and your selected collation includes all the necessary characters and is supported in SQL Server versions below 2019, you can proceed with the installation on SQL Server version below 2019. Select an appropriate collation that suits your end systems \[which are going to be configured in <code class="expression">space.vars.SITENAME</code>].
  * Select an appropriate collation that suits your end systems (which will be configured in <code class="expression">space.vars.SITENAME</code>).
  * Here is [guide](https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16) that may help you decide the right collation for your database.

> **Note:**\
> We need **1 database** and **2 schemas** to be created manually, out of which The **database and schema name must be the same** for the OpsHub database, and another schema should be created for **reportsdb**.

```sql
drop database IF EXISTS db1
db1 database: create database db1 COLLATE Latin1_General_CS_AS;
db1 schema: create schema db1;
Reports schema: create schema reportsdb;
```

### Queries for Oracle Database

> **Note:** Replace `<<SERVER_PASSWORD>>` with the actual password.

Let's name the database as `db1`:

```sql
drop user db1 CASCADE;
CREATE USER db1 IDENTIFIED BY <<SERVER_PASSWORD>> DEFAULT TABLESPACE users QUOTA 500M ON users TEMPORARY TABLESPACE temp PROFILE DEFAULT ACCOUNT UNLOCK
```

Let's name the reports database as reportsdb:

```sql
drop user reportsdb CASCADE;
CREATE USER reportsdb IDENTIFIED BY <<SERVER_PASSWORD>> DEFAULT TABLESPACE users QUOTA 2048M ON users TEMPORARY TABLESPACE temp PROFILE DEFAULT ACCOUNT UNLOCK
```

> **Note**: Ensure both `db1` and `reportsdb` users have the required privileges. For system and object privileges, refer to [Database Prerequisites](https://docs.opshub.com/v7.203/prerequisites#database-prerequisites).

* Note, in case of manual database creation with Oracle database, OpsHub database user ("db1") and OpsHub reports database user ("reportsdb") shall be created on the same server. At the time of installation, you need to provide the username and password for the database server.
* In case of Oracle database, passwords for the database users ("db1" and "reportsdb") shall be the same as the password of the server on which they are created.
* If you want to change the tablespace quota for OpsHub database "db1", following query can be used:

```sql
ALTER USER db1 QUOTA <size_of_tablespace> ON users;
```

> **Note:** `"db1"` and `"reportsdb"` are the database/schema/database user names used in the above queries. You can name them differently as per your requirements.

### Queries for PostgreSQL Database

* In case of manual database creation for PostgreSQL Server database, database and schema should be in lowercase only.
  * We need 1 database and 2 schemas to be created manually, out of which database and schema's names must be same for opshub database. The other schema will be created for reportsdb.

Let's say the name of the database is `db1`:

```sql
drop database IF EXISTS db1
db1 database: CREATE DATABASE db1
WITH
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TEMPLATE = template0;
```

> **Note**: The above query will create database with Collate United States, UTF-8. For creating database with desired collate, update `LC_COLLATE` and `LC_CTYPE` as per the requirement.

```sql
db1 schema: create schema db1;
Reports schema: create schema <schema_name>;
```

Here \<schema\_name> will be the schema name of reportsdb.

## Collation change of MS SQL/Azure SQL Databases

If the user needs to change the collation of <code class="expression">space.vars.SITENAME</code>'s database, follow the below-mentioned steps:

**Important Note**

* When changing the collation, compare the code pages of the old and new collations to ensure that character representations are consistent and prevent data conversion issues. For example, changing Turkish\_CS\_AS collation to Latin1\_General\_CS\_AS will convert "ı"(dott-less i) to "i".
* When considering a collation change, it's important to be aware about variations in character encoding and sorting rules between the old and new collation settings. Character conversion will occur during the process of collation change as mentioned in the above example. This conversion can lead to the irreversible loss of the original data.

**Procedure:**

1. **Stop the** <code class="expression">space.vars.SITENAME</code> **Server**: Ensure the <code class="expression">space.vars.SITENAME</code> server is not running.
2. **Database Backup**: Take a backup of the database.
3. **Download Scripts**: Download the provided script by clicking [here](https://opshubtrial-my.sharepoint.com/:u:/g/personal/support_opshub_com/EeqVoEYk3gVHsQT8Y4_CrRsB_SkllsEiDWv1YrEbLEfbDw?e=VLcoFu).
4. **SQL Editor**: Open the SQL editor.
5. **Changing the columns collation**: Open the **Migration Script** file and replace `YOUR_COLLATION_NAME` with the collation name you would like to migrate to as the new collation. Execute the **Migration Script** and copy the generated SQL statements. Open a new window in SQL editor, paste those statements and execute them.
6. **Database collation change**: Open the **Database Collation Change Script** file and replace `YOUR_COLLATION_NAME` with the collation name you would like to migrate to as the new collation. Also, replace `YOUR_DATABASE_NAME` with the name of the database on which <code class="expression">space.vars.SITENAME</code> is installed. Execute the script file.
7. **Start** <code class="expression">space.vars.SITENAME</code> **Server**: Restart the <code class="expression">space.vars.SITENAME</code> server.
