Web Application localisation
WA1. Procure Windows-based Server
WA2. Set up the default openIMIS instance
To set up the default openIMIS instance, please follow the steps: If you want to start to localise openIMIS Web Application first and install the localised version afterwards, you can directly start from the localisation of the Web Application at the source code level.
WA2.1 Database installation
openIMIS has been developed and tested using SQL Server 2017. Newer or old versions might require adaptations to both these installation guide and openIMIS code. Download the desired version of SQL Server (for example, if you want to test openIMIS, you can download and install SQL Server 2017 Developer version - not for production When the installation wizard opens, select the manual configuration option in order to fine-tune the installation process. On the Features selection: In For installations with Data Warehouse, select On the Instance configuration, the default name On Database engine configuration, select Continue the setup process until the installation is complete. Open the SQL Server Configuration Manager On the left panel, select Select SQL Server Services → right-click on SQL Server instance name and select Restart To facilitate the setting up of the openIMIS database, we suggest installing SQL Server Management Studio (SSMS). The following procedure is based on SSMS, but you can use the standard SQL Server prompt to proceed with the setup. First, download the openIMIS database SQL files and migration scripts from Github repository (the source code ZIP file). If you wish to initialize the database using SSMS, follow the steps: Create a new database for the openIMIS instance (e.g. openIMIS.1.4.0, where 1.4.0 is the openIMIS database version). Open the openIMIS_ONLINE.sql file (from the Empty databases folder) and execute the script (make sure the selected database is the one created in step a.) If you prefer to initialize the database using the shell: Be careful to adapt the queries to your setup, in the command lines example those assumptions were made: The database is called IMIS_DATABASENAME The SQL server is called SQL_Server_Name Run the following commands: Create a dedicated user with full privilege on the openIMIS database only: In the Security → Logins → right-click and select “New Login…” In General page: Give a login name (e.g. ImisUser) Select SQL Server authentication and provide a password Unselect Enforce password expiration Change the default database to openIMIS In User Mapping page: Map openIMIS database to ImisUser user Give the role of db_owner There are three specific openIMIS databases to chose from: Offline (openIMIS_OFFLINE.sql): this mode is used for remote insurance offices without Internet connectivity. Note: the synchronization of data with the central server is manual. Offline HF (openIMIS_OFFLINE_HF.sql): this mode can be used in remote health facilities without Internet connectivity. Note: the synchronization of data with the central server is manual. Demo (openIMIS_demo_ONLINE.sql): this script initialize the empty database with the demo dataset. To initialize one of the specific openIMIS databases, follow the steps: Initialize the openIMIS database by following the previous section steps Run the specific database script on the already initialized openIMIS database The upgrading process should always be performed on a copy of the database to ensure the proper execution of the migration script. In case of any issue arriving from the upgrading process, you can get back to the previous version of the database. Please report using openIMIS Service Desk any issue you may face in the upgrading process. The upgrade can be done with SQL Server Management Studio (SSMS) or from the shell (be careful to adapt the querries to your setup). To update a production instance and to prevent impacting the production if the migration script failed because of customizations in your openIMIS instance: During the upgrade make sure the is not reachable from the applications (you should stop the openIMIS website in Web Application IIS). Duplicate the database using SSMS or shell (create a full backup of the database and restore it with another database name, e.g. openIMIS.1.4.0) Shell commands (e.g. duplicate 'openIMIS.1.3.0' database to 'openIMIS.1.4.0' database; please adapt to your situation): Download the openIMIS database SQL files and migration scripts from Github repository (the source code ZIP file). Execute the migration script on the copy of the database in SSMS or shell Shell command (e.g. from the current version 1.3.0 to the new version 1.4.0) Configure the openIMIS Web Application to use the newly migrated database (e.g. openIMIS.1.4.0). Configure the openIMIS Backup Windows Service or your own backup application/service to use the newly migrated database (e.g. openIMIS.1.4.0). Start your openIMIS website.Install SQL Server
).
Shared Feature
section, select SQL Client Connectivity SDK
Analysis Services
, Reporting Services
and Integration Services
(not available for the Express edition)SQLEXPRESS
can be used, unless it is already used by another instance.Mixed Mode
(SQL Server authentication and Windows authentication) in Authentication Mode.Configure SQL Server
SQL Server Network Configuration
→ Protocols for SQLEXPRESS
(or the name of your SQL Server instance) → Enable Named Pipes and TCP/IPInitialize openIMIS database
SqlCmd -E –Q "CREATE DATABASE IMIS_DATABASENAME"
SqlCmd -E -S SQL_Server_Name -d IMIS_DATABASENAME –i X:\PathToSQLFile\openIMIS_ONLINE.sql
Initialize specific openIMIS database
Upgrade the openIMIS database
SqlCmd -E -S SQL_Server_Name –Q "BACKUP DATABASE [openIMIS.1.3.0] TO DISK='X:\PathToBackupLocation\openIMIS.1.3.0.bak'"
SqlCmd -E -S SQL_Server_Name –Q "RESTORE DATABASE [openIMIS.1.4.0] FROM DISK='X:\PathToBackupLocation\openIMIS.1.3.0.bak' WITH MOVE 'openIMIS.1.3.0' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\openIMIS.1.4.0.mdf', MOVE 'openIMIS.1.3.0_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\openIMIS.1.4.0_log.ldf'"
SqlCmd -E -S SQL_Server_Name -d openIMIS.1.4.0 –i "X:\PathToMigrationScript\openIMIS migration v1.3.0 - v1.4.0.sql"
WA2.2 Web Application installation
In Windows Server, follow these steps to install IIS: In the Select Select your server from the server pool, and select your server from the list In In Select Select In In In In Click on Install and wait for the features to be installed Restart the server if required Download and unzip the release from Github web_app_vb repository into a new folder under the IIS wwwroot (e.g. C:\inetpub\wwwroot\openIMIS.1.4.0). The configuration of IIS done through Internet Information Service (IIS) Manager. Add a site In Internet Information Service (IIS) Manager: Select your server name → Remove the Default Web Site (if new installation) Right-click on Enter a site name for your openIMIS instance (e.g. openIMIS.1.4.0) Enter or select the physical pathname (e.g. C:\inetpub\wwwroot\openIMIS.1.4.0) If you have an SSL certificate, select binding type to HTTPS (port 443) and select your certificate If you don't have an SSL certificate, select binding type to HTTP (port 80) If you have selected the binding type to HTTPS (port 443), then you will have to add also the binding type for HTTP Right-click on the new added website Select Edit Bindings Select binding type HTTP (port 80) and click ok If you have a DNS address (e.g. demo.openimis.org) that is mapped to your server IP address, you can add it in the site binding configuration as the hostname. This will allow having multiple Sites deserving same ports (80 and 443) and can be used to have, for example, openIMIS development (e.g. dev.openimis.org) and production (e.g. demo.openimis.org) sites on the same server. Globalisation Depending on the server’s initial configuration, the date format may differ from the expected The web.config provides the configuration for openIMIS Web Application, including database connection string and necessary folders. To configure the database connection string, go in openIMIS root folder (e.g. C:\inetpub\wwwroot\openIMIS.1.4.0), locate the web.config file and edit Other configuration settings can be found within the In openIMIS root folder (e.g. C:\inetpub\wwwroot\openIMIS.1.6.0), IIS_IUSRS need to be given full control of the following folders: Repeat the following steps for each folder listed above: Right-click on the folder and select properties Ensure that the folder is not read-only Select the Click on Select Then apply and click OK. This can also be done automatically for all the above mentioned folders by running the provided Click on the Windows Start menu of run In the Registry Editor, select Right-click on the Now repeat the same steps for Additional resources: Open your Internet browser and type the following URL in the browser address bar: http://localhost/ You can connect with the following credentials: If you have initiated the openIMIS Blank Database: Login name: Password: If you have initiated the openIMIS Demo Database: Login name: Password: Install IIS
Server Manager
→ Dashboard
→ Add Roles and Features
Role-based or feature-based
installationServer Roles
→ select Web Server (IIS)
→ Add Features
Features
.NET Framework 3.5
.NET Framework 4.6
and ASP.NET 4.6
(or later)Web Server Role (IIS)
→ Role Services
Web Server
, ensure that Common HTTP Features
→ Static Content
is tickedApplication Development
, select .NET Extensibility
, ASP
, ASP.NET
, ISAPI Extensions
, ISAPI Filters
and Websocket Protocol
Management tools
, tick all boxesDownload openIMIS Web Application
Configure IIS
Sites
Sites
→ Add Website
DD/mm/YYYY
format. To force the date format, go to the openIMIS site, then select Culture
→ .NET Globalisation
, and select English (United Kingdom) (en-GB)
as a culture.Configure openIMIS Web Application
Edit the web.config
IMISConnectionString
entry so that the connection string points to the database created in openIMIS database section with the right credentials. For example:<connectionStrings>
<add name="IMISConnectionString" connectionString="Data Source=WIN-H4E4ARREBFH\SQLEXPRESS;Initial Catalog=openIMIS.1.4.0;User ID=ImisUser;Password=password1234" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
tag and should be modified with caution.Assign permission to source folders
Archive
, Extracts
, FromPhone
, Images
, Workspace
.Security
tabEdit
IIS_IUSRS
and allow full control (in the below section).set_folders_rights.ps1
script from a PowerShell console with Administrator rights (right click on PowerShell shortcut and select Run as administrator
.Edit permissions to Windows event logs
Regedit
via the search box:HKEY_LOCAL_MACHINE
→ System
→ CurrentControlSet
→ Services
→ Eventlog
.EventLog
node, select Permission
. Give full permissions to IIS_IUSRS
, as described in the above paragraph (Assign permission to source folders). If the IIS_IUSRS user is not present in the list, then click Add
button to add it manually. Eventlog
→ Security
and Eventlog
→ State
node, as it can be required depending on the server’s environment.Open the application
Admin
Admin
Admin
admin123