Basic environment and related software preparation
1, CentOS7.1 64-bit system (or other CentOS version of the 64-bit system)
2, WinSCP software (mainly to facilitate the management and editing of Linux system files)
3, Xshell software (Linux terminal in Windows environment)
4,. Netcore installation Reference URL, Https://www.microsoft.com/net/core#centos
5,. Netcore,https://www.microsoft.com/net/download#core
6. Quick Start example, https://docs.asp.net/en/latest/getting-started.html
Operation Steps
1, virtual machine installed CentOS7.1 system, and debugging a good network
2. WINSCP and Xshell software install and configure the connection CentOS7.1
Everything is ready, and the show starts right away ....
1.. Net Core Download and installation
sudo yum install libunwind Libicu
Curl-ssl-o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809131
sudo mkdir-p/opt/dotnet && sudo tar zxf dotnet.tar.gz-c/opt/dotnet
sudo ln-s/opt/dotnet/dotnet/usr/local/bin
Command Simple explanation
1) Install the necessary support packages
2) Download the. Net Core installation package (a bit large and need to wait patiently ...). )
3) Unzip the installation package and copy the files to the/opt/dotnet directory
4) Create a soft link file named dotnet in the/usr/local/bin directory to point to the/opt/dotnet/dotnet file, and the soft link is understood as a shortcut
2. Create a. Net Core application
mkdir Hwapp
CD Hwapp
dotnet New
Command Simple explanation
1) Create a directory named Hwapp
2) Enter the directory
3) Execute the dotnet new command to create a. Net Core project
3. Restore dependent libraries & Run programs
dotnet Restore
Dotnet Run
Command explanation
1) Restore dependent library files according to the Project.json configuration file in the Hwapp project (in fact NuGet downloads dependent files from the remote server)
2) Run the Hwapp program (the Default Access address is: http://localhost:5000)
#以上操作步骤参考, Https://www.microsoft.com/net/core#centos
Finally put a few of their own practice map
Practice. Net Core's first Hello World in a Linux environment