Set up the ASP. NET Core Environment in Linux (Ubuntu) and ubuntucore
Today, let's take a look at ASP. NET Core running in Ubuntu. You do not need to install mono.
Environment
Ubuntu 14.04.4 LTS server version is a new installation system.
: Http://mirrors.neusoft.edu.cn/ubuntu-releases/14.04.4/ubuntu-14.04.4-server-amd64.iso
You can also download the desktop version for installation.
: Http://mirrors.neusoft.edu.cn/ubuntu-releases/14.04.4/
Install DNVM
First, make sure that unzip and curl are installed.
Copy codeThe Code is as follows: sudo apt-get install unzip curl
Download and install DNVM
Copy codeThe Code is as follows: curl-sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH = dev sh & source ~ /. Dnx/dnvm. sh
If you run dnvm after the installation is complete, the installation is successful.
Install DNX
Install DNX for. NET Core
1. install necessary environment for dnx
Copy codeThe Code is as follows: sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev
2. Use DNVM to install DNX for. NET Core
Copy codeThe Code is as follows: dnvm upgrade-r coreclr
Install libuv
sudo apt-get install make automake libtool curlcurl -sSL https://github.com/libuv/libuv/archive/v1.8.0.tar.gz | sudo tar zxfv - -C /usr/local/srccd /usr/local/src/libuv-1.8.0sudo sh autogen.shsudo ./configuresudo makesudo make installsudo rm -rf /usr/local/src/libuv-1.8.0 && cd ~/sudo ldconfig
Now the environment has been installed. We will deploy the project.
Upload the project to ubuntu.
Go to the project directory and run the following command.
Copy codeThe Code is as follows: dnu restorednu build -- framework dnxcore50dnx web
Run successfully:
Reference:
Https://docs.asp.net/en/latest/getting-started/installing-on-linux.html
If you think this article is helpful to you, please share it with more friends. Thank you.