環境: Ubuntu 16.04 dotnet-dev-1.0.0-preview2-003121 Visual Studio 2015 update 3 Ubuntu 安裝.net core 參考:https://www.microsoft.com/net/core#ubuntu 1.添加源 2. ...
環境:
- Ubuntu 16.04
- dotnet-dev-1.0.0-preview2-003121
- Visual Studio 2015 update 3
Ubuntu 安裝.net core 參考:https://www.microsoft.com/net/core#ubuntu
1.添加源
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 sudo apt-get update
2.安裝
sudo apt-get install dotnet-dev-1.0.0-preview2-003121
3.把程式上傳到 /home/zulin/dotnet 目錄
發佈
運行 還原 並運行
dotnet coredemo.dll
4.配置nginx 代理
#安裝 sudo apt-get install nginx
#配置 sudo nano /etc/nginx/sites-available/default #添加到後尾 server { # Port and domain listen 8080; server_name aspnet.local; # Path to the wwwroot folder root /home/zulin/dotnet/wwwroot; # Pass requests to Kestrel location / { proxy_pass http://127.0.0.1:5000; proxy_set_header Connection ""; proxy_http_version 1.1; } }
#重啟服務 sudo service nginx restart
現在可以在瀏覽器上查看了
http://xxx.xxx.xxx.xxx:8080