-
Notifications
You must be signed in to change notification settings - Fork 2
Windows Installation with IIS
Installing on Windows is a bit more difficult than on Linux, but can be done. Serving via IIS is theoretically possible, and will be tested during the creation of this document. This tool works best in Linux, and using an Ubuntu server is the preferred method. If that is not an option, perhaps WSL2 is an option, but will not be explored in this document.
Also note that certain features are NOT supported in a Windows installation, namely: accessing the PostgreSQL+PostGIS database from GIS software.
- A Windows Server (Tested on Windows Server 2019 and 2022)
- A text editor
- An internet connection
- A modern browser (Edge, Chrome, or Firefox, but NOT Internet Explorer)
-
Python 3.10+
- Download and run the latest Windows installable .exe
- Add Python 3.x to PATH
- When asked, disable 'path length limit' (expand the default character limit on PATH)
- Git
- PostgreSQL + PostGIS
- Download the latest VERSION 12 (not 14 or higher)
- Install all components
- Keep track of your password for user
postgres
- Keep the default port: 5432 (you may change this for additional security, but this document assumes this port)
- Keep track of your password for user
- Run "Stack Builder" to install PostGIS
- Select your new PostgreSQL v12 server for the target
- Expand options under 'Spatial Extensions' and check "PostGIS 3.2 Bundle"
- Accept all default options and agree to the GPL license
- Accept proposed changes to your Environment Variables
-
OSGeo4W + GDAL
- Download and run the installer
- Select 'Express Install'
- Select your mirror
- http://ftp.osuosl.org is recommended for most West Coast installations
- Select GDAL
This document assumes you will store the source code in a directory called C:/Apps/
. If you wish to install in Program Files
or another location, you will need to track your own changes throughout this document.
Downloading the source can be done using two methods:
- Git Bash (if you're comfortable with the command line)
cd /c/ mkdir Apps cd /c/Apps git clone https://github.com/Ecotrust/TEKDB.git
- Git GUI
- Select 'Clone Existing Repository'
- Source location: https://github.com/Ecotrust/TEKDB.git
- Target Directory:
C:\Apps\TEKDB
- Select 'Clone Existing Repository'
- Modify your OS Environment Variables from the command prompt
- This is scripted in the file
C:\Apps\TEKDB\scripts\Windows\set_osgeo_environment.bat
- If you installed OSGeo4W to anywhere other than C:\OSGeo4W, update the first line of that script to reflect your new location
- run
C:\Apps\TEKDB\scripts\Windows\set_osgeo_environment.bat
- This is scripted in the file
- Django + Environment
-
cd
to your application location:cd C:\Apps\TEKDB
- Create a virtual environment
py -m venv env
py -m pip install --upgrade pip
- Activate your virtual environment
env\Scripts\activate.bat
- Install requirements
pip install -r TEKDB\requirements.txt
-