Last active
December 30, 2015 17:15
-
-
Save AdamLJohnson/14bf032d617382bfe618 to your computer and use it in GitHub Desktop.
Script to setup ASP.Net vNext on Ubuntu
This file contains 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/sh | |
##https://docs.asp.net/en/latest/getting-started/installing-on-linux.html#installing-on-debian-ubuntu-and-derivatives | |
## Install the .NET Version Manager (DNVM) | |
sudo apt-get --assume-yes install unzip curl | |
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh | |
# Install the .NET Execution Environment (DNX) | |
## Install the DNX prerequisites: | |
sudo apt-get update | |
sudo apt-get --assume-yes install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev | |
## Use DNVM to install DNX for .NET Core: | |
dnvm upgrade -r coreclr | |
## Install libuv | |
sudo apt-get --assume-yes install make automake libtool curl | |
curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -C /usr/local/src | |
cd /usr/local/src/libuv-1.4.2 | |
sudo sh autogen.sh | |
sudo ./configure | |
sudo make | |
sudo make install | |
sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/ | |
sudo ldconfig | |
##Start test site | |
cd ~ | |
mkdir HelloWeb | |
cd HelloWeb | |
curl https://raw.githubusercontent.com/aspnet/Home/dev/samples/latest/HelloWeb/Startup.cs > Startup.cs | |
curl https://raw.githubusercontent.com/aspnet/Home/dev/samples/latest/HelloWeb/project.json > project.json | |
# Allow site to be visable by other computers | |
sed -i -e 's/localhost:5004/*:5004/g' project.json | |
# Restore packages: | |
dnu restore | |
# Run the app: | |
dnx web | |
##Open a browser and go to: http://<HostName>:5004 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment