background
A certain project needs to realize the localization of all the basic software, in which the operating system is designated As Galaxy Kirin, the database uses Dameng V8, and the SCOPE of CPU platform includes X64, Longson, Feiteng, Kunpeng, etc.
Considering these basic products right. NETCore support, and ultimately version 3.1. The main reason is that loongson developed its own CPU architecture, so the number of users is not large enough. The.net official has no special support for loongson, while the loongson team only adapted. Netcore3.1 (currently in the adaptation test of. Net6), and other domestic cpus are Arm64 and x64, which are supported by.net official.
Since only x64 supports package manager installation and manual installation is required for other CPU architectures, the package manager installation described in this article is only suitable for x64 platforms. See another article for manual installation: galaxy kirin installation. netcore3.1- manual installation.
The environment
- Virtualization platform: Hyper-V 10.0
- Operating system: Galaxy Kirin V4
- CPU platform: x86-64
Installation steps
Galaxy kirin v4 is based on Ubuntu16.04, so please refer to Microsoft’s official documentation for installation.
Docs.microsoft.com/zh-cn/dotne…
1. Update the software list
Add the domestic mirror address of the software package source:
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverseCopy the code
There is a line of the original file: deb file:///media/kylin/Kylin-4.0.2 juniper main
This is the address of the source of the CD. If not, block it and prefix it with #
Then execute: sudo apt-get update to get the latest list of packages.
2. Add Microsoft package signing keys to trusted package signing keys list
Run the following commands in sequence:
Wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb - O packages - Microsoft - prod. Deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.debCopy the code
3. Install. Netcore 3.1 SDK
Run the following command and wait until the command is executed.
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
Copy the code
4. Check the installation result
Run the dotnet –info command
The following information is displayed:
.NET Core SDK (reflecting any global.json):
Version: 3.1416.
Commit: 8d3765c609
Runtime Environment:
OS Name: kylin
OS Version: 4.02.
OS Platform: Linux
RID: linux-x64
Base Path: The/usr/share/dotnet/SDK / 3.1.416 /
Copy the code
test
Execute the following commands in sequence: create a directory, dotnetsample, then create a Web project, and finally run the project.
cd ~
mkdir dotnetsample
cd ./dotnetsample
dotnet new web
dotnet run --urls=http://*:5000
Copy the code
The following information is displayed:
If you get to this point, congratulations, the installation is successful!
For more architecture knowledge, please pay attention to the wechat public account Firefly architecture. Original content, reproduced please indicate the source.