Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »


Prerequisites:

  1. Install SQL Server: Follow the installation instructions for SQL Server.

  2. Configure SQL Server:

    • Launch the SQL Server Configuration Manager.

    • Navigate to SQL Server Network Configuration → Protocols for SQLEXPRESS (or your SQL Server instance name) → Enable Named Pipes and TCP/IP.

    • Under SQL Server Services, right-click on your SQL Server instance name and select Restart.

  3. Install Python:

    • Ensure compatibility with openIMIS, preferably Python Version 3.10 or 3.11, downloadable from Python's official website.

    • Add Environment Variables:

      • <YourUsername>\\AppData\\Local\\Programs\\Python\\Python<version>

      • <YourUsername>\\AppData\\Local\\Programs\\Python\\Python<version>\\Scripts

    • Confirm Python installation by running "python --version"; you should see the Python version displayed.

  4. Virtual Environment Setup:

    • Install virtualenv by running

      pip install virtualenv

Installation Steps:

  1. Database Setup:

    • Clone openIMIS Database Project:

      git clone https://github.com/openimis/openimis-db_dkr.git
    • In SQL Server, create a new Database, e.g., "open-imis-db".

    • Create a database user with read, write, and adminddl access only to our database.

    • Log in to the database as the newly added user.

    • Navigate to the cloned folder 'database_ms_sqlserver' within the openIMIS Database Project.

    • Open a Linux shell and execute the script file "concatenate_files.sh" located in the aforementioned folder.

    • Run the generated sql script in the output folder, e.g., "fullDemoDatabase.sql".

  2. Backend Setup:

    • Clone openIMIS Backend Project:

      git clone https://github.com/openimis/openimis-be_py.git
    • Create your .env file based on the provided example.env file.

    • Ensure that you have the correct settings within your .env file

      MSSQL_DB_USER= <your database user name>
      MSSQL_DB_PASSWORD = <your database user password>
      MSSQL_DB_NAME = <your database name>
      
      #Ensure that SCHEDULER_AUTOSTART=True is uncommented
      #SCHEDULER_AUTOSTART=True 
      
      DB_DEFAULT=mssql
    • Install openIMIS (external) dependencies:

      • Open the command prompt.

      • Navigate to the cloned repository "..\openimis-be_py".

      • virtual environment:

        #Create your virtual environment:
        python -m virtualenv venv
        
        #Activate your virtual environment
        venv\Scripts\activate
      • install requirements

        pip install -r requirements.txt
        python script\modules-requirements.py openimis.json > modules-requirements.txt
        pip install -r modules-requirements.txt
        pip install -U 'Twisted[tls,http2]'
    • Migrate the Database with the Backend:

      • Open the command prompt and navigate to "openimis-be_py/openIMIS".

      • Run

        python manage.py migrate
      • Start the server by running:

        • run server on port 8000

          python manage.py runserver
        • or run server with specified port

          python manage.py runserver <your port> 
  3. Frontend Setup (on work):
    will ba shared soon

  • No labels