Difference between revisions of "Install on windows"
(Created page with "Install ITR on a windows server or 10 This installation assumes installing the ITR for development or other test purposes. It can be used as a starting point for installing a...") |
|||
Line 85: | Line 85: | ||
* l. Add the SPF record to the DNS : @, TTL 5 min, TXT, v=spf1 ip4:<IP address of server> a:THEMAILDOMAIN ~all | * l. Add the SPF record to the DNS : @, TTL 5 min, TXT, v=spf1 ip4:<IP address of server> a:THEMAILDOMAIN ~all | ||
11. Start IIS go to the application pool the ITR site is running on and change the settings as follows : | 11. Start IIS go to the application pool the ITR site is running on and change the settings as follows : | ||
− | + | [[File:InstallWin10AppPool.png|400px] | |
Instead of administrator you would probably want to use another account with less permissions. For development servers Administrator is fine. | Instead of administrator you would probably want to use another account with less permissions. For development servers Administrator is fine. |
Revision as of 12:26, 29 March 2019
Install ITR on a windows server or 10
This installation assumes installing the ITR for development or other test purposes. It can be used as a starting point for installing a production server.
1. First install all latest windows updates so you windows system is as up to date as possible 2. Install postgresql 10.5 to d: disk
- a. Start the installation as default as possible
- b. At some stage enter the password ITR2018! For the superuser
- c. Port 5432 is fine
- d. Default locale
- e. And go !
3. Start server manager
- a. Add roles and features.
- i. Add roles Web Server IIS – Next until IIS web server role settings.
- ii. Performance - dynamic and static compression
- iii. Application Development extensions – CGI & ISAPI (both options)
- iv. .Net extensibility (latest version & .net 3). On windows server 2019 installing .Net 3 is a seperate manual step you need to perform before Step 3.
- v. Click Next
- b. Next - Install now
4. Download and install python 3.6 from www.python.org Windows x86-64 executable installer. Python 3.7 will probably also work, but is not tested at this point in time.
- a. Add python to Path
- b. Install for all users
- c. Click Customize and select everything
- d. Advanced options – install for all users, precompile. Do NOT download debugging
- e. Install location c:\Python\Python36
- f. Disable path lenght limit
5. If you wish to use Python 3.7 then first download and install Build tools for visual studio from https://visualstudio.microsoft.com/downloads/
- a. Select: Workloads → Visual C++ build tools.
- b. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10)
6. Start CMD.exe in administrator mode
- a. pip install --upgrade pip
- b. pip install wfastcgi
7. Start IIS
- a. Click on your server name
- b. Click on FastCGI settings
- c. Click on add application
- Set max instances to 50 or 25 for a small server
- d. Click on Environment variables collection
- e. Click Add
- f.
- g. Result
- h.
- i. Add the site with the name you want and add a certificate
- j. Add the files to the folder you want ( for example c:\inetpub\itr_site)
- k. In IIS click on the API folder in the site
- l. Rightclick – Convert to application. Set the right
- m. Click Handler mappings
- n. Click Add module mapping
- o.
- p. The text is c:\Python\Python36\python.exe|c:\Python\Python36\Lib\site-packages\wfastcgi.py (with a PIPE sign in between)
- q. Add request restrictions
- r. Unckeck Invoke handler at tab Mapping
- s. Check all verbs at tab Verbs
- t. Check Script at tab Access
- u. If the handler already exists check the values and update them
- v. Request a certificate for this site and install it
- w. Add the website after copying it to c:\inetpub\itr_site
- x. Link the site up to the imported certificate and disable http in the bindings
- y. Add a dummy site on the http binding in c:\inetpub\itr_http which will redirect to the https site automatically. For example with the following html :
- <!DOCTYPE html>
- * * * *
8. Install required PIP packages
- a. Open cmd.exe in admin mode
- b. Go to c:\inetpub\itr_site\API
- c. pip install -U setuptools
- d. Type PIPInstall and press enter
9. Install hmailserver on windows.
- a. First make sure the .net framework 3.5 is properly installed ! On windows 2019 servers this version of .net is NOT installed by default.
- b. Install SQL Server Developer edition 2017 (Basic install). Install SSMS only if you want that.
- c. Use defaults.
- d. Set Password to ITR2018!
- e. Run admin after setup
- f. Check Automatically connect on startup
- g. Click connect and enter password set above. You are now in the server.
- h. Create the mail domain name in the mail software (for example testdimensions.eu)
- i. First now we will need to generate a DKIM certificate as described on https://www.hmailserver.com/forum/viewtopic.php?t=29402. Follow these instructions. Save the generated keys on the desktop with the name mail_keys.txt
- j. Test setup by opening powershell and enter send-mailmessage -to "Bart <YOURMAIL>" -from "NoReply <noreply@THEMAILDOMAIN>" -subject "Test mail" -body "Hallo !" -SmtpServer 127.0.0.1
- k. Add the TXT record to the DNS with TTL of 5 minutes for the domain. Example : dkim._domainkey, TTL 5 min, TXT, v=DKIM1; k=rsa; p=MIGfMA0dfgddfgdfg...sdfsdfsdfdsfsdfAQAB
- l. Add the SPF record to the DNS : @, TTL 5 min, TXT, v=spf1 ip4:<IP address of server> a:THEMAILDOMAIN ~all
11. Start IIS go to the application pool the ITR site is running on and change the settings as follows :
[[File:InstallWin10AppPool.png|400px]
Instead of administrator you would probably want to use another account with less permissions. For development servers Administrator is fine.