Setup - TwoGears/hakomo-guides GitHub Wiki

Setting up a server on win 2012 r2

INSTALLATIONS

Notes

  • Downloading: You download on your computer and then copy/paste to server through remote desktop

SQL Server

  • before you download SQL Express you need to install 2 updates:

    • first this one: KB2919422
    • then this one: KB2919355 > Download "Clear Compression Flag" and this exact update
      • Run "Clear Compression Flag" (nothing will happen visibly)
      • then run the update KB2919355
  • Download on your computer SQL Express 2017 (2019 doesn't run on win 2012)

  • Copy to server through remote desktop

  • Run > Custom.

  • On SQL Server Installation Center > "New SQL Server stand-alone installation.."

  • "Feature Selection" section > remove:

    • SQL Server Replication
    • Machine Learning
    • Full-Text
    • Add: Client Tools Connectivity
  • "Database Engine Configuration" > Check "Mixed Mode"

    • Set Password
    • Click "Add Current User"

SSMS

  • Download and install SSMS - nothing special, you may need restart

Web Installer Platform

  • Download and install - nothing special

IIS

  • Open Server Manager > Top right "Manage" > "Add Roles and Features"
  • On screen "Server Roles" make sure you check "Web Server (IIS)", the rest is default again.

Web Deploy

  • Open Web Installer Platform > Search "Recommended"
  • Select "Recommended Server Configuration for Web Hosting Providers"
  • Remove all PHP and Node if not needed

SETTINGS

Bindings

Create Application Pool:

  • Right click, then add
  • Type domain of the website, hit enter

Create a site:

  • Site Name: anything you want, usually domain.com or api.domain.com
  • Pool: Select the pool your created
  • Physical Path: C:\inetpub\YOUR_SITE_FOLDER

Bindings:

  • Any request that comes to the server goes through the bindings and they decide to which app to send the request.
  • No 2 bindings can be the same
  • If you don't have a domain, you can make a request
Situation Request Min Settings that work Explanation
basic http://180.10.20.0/ If you have a domain: http://domain.com/ IP: (empty -all) Port: 80 Host: (empty) Any request that comes through to server will be redirected her
No domain http://180.10.20.0/ IP: (empty -all) Port: 80 Host: (empty) The request needs to be done with IP to reach the server
With domain http://domain.com/ IP: (empty -all) Port: 80 Host: domain.com The request is directed by comparing the host/domain

Publishing:

Once you have the site running, we need to set visual studio to publish there.

  • Right click on your project > Publish
    • Publish Method: Web Deploy
    • Server: X.X.X.X (ip of the server)
    • Site Name: The site name you configured in the IIS settings. Should be your desirable domain
    • User/Pass: of the windows login
    • Destination URL: X.X.X.X/swagger (Which URL to load after it is deployed)