Last active
April 23, 2018 18:34
-
-
Save praveenc/c1a869307a12a18626ede160a5429105 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # install dotnet core | |
| sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list' | |
| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https jq vim | |
| sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 | |
| sudo apt-get install -y dotnet-sdk-2.1.103 --allow-unauthenticated | |
| sudo apt-get install -y dotnet-sharedframework-microsoft.netcore.app-1.1.2 --allow-unauthenticated | |
| # install nginx, update config file | |
| # create self-signed cert for nginx | |
| sudo mkdir -p /etc/nginx/ssl | |
| sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/C=CA/ST=QC/L=Montreal/O=Global Security/OU=IT Department" | |
| sudo apt-get install -y nginx | |
| sudo service nginx start | |
| sudo touch /etc/nginx/sites-available/default | |
| sudo wget https://gist.githubusercontent.com/praveenc/03893da76bc7d341f9e299d4678524fb/raw/556a6473d82fde680ee313a5751a3e37c8076f39/nginx-dotnetcore-default -O /etc/nginx/sites-available/default | |
| sudo nginx -s reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment