Arm instances have better cost-performance then Intel ones. But installing software on it is quite challeging. Of course, about deploying a .Net Core program on arm64 based OS, docker is a better choice. But sometimes, we need install .Net Core SDK globally on OS directly. Let’s do it today.
Task
Install .Net Core 3.1
on Amazon Linux 2 AMI (HVM), SSD Volume Type 64-bit(Arm)
instance.
Check .Net Core’s download url of arm64
From Download page: https://dotnet.microsoft.com/download/dotnet/3.1.
We could find .Net Core arm64 one: https://download.visualstudio.microsoft.com/download/pr/8aca4221-54b6-421d-9be0-f25e4b799463/b70cca6f2acddc5361f97dc7f77a8ddf/dotnet-sdk-3.1.408-linux-arm64.tar.gz
Install .Net Core 3.1
sudo mkdir -p /usr/share/dotnet
cd /usr/share/dotnet
sudo wget https://download.visualstudio.microsoft.com/download/pr/8aca4221-54b6-421d-9be0-f25e4b799463/b70cca6f2acddc5361f97dc7f77a8ddf/dotnet-sdk-3.1.408-linux-arm64.tar.gz -O dotnet3.tar.gz
sudo tar -zxvf dotnet3.tar.gz
sudo rm -rf dotnet3.tar.gz
sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
Install necessary packages
sudo yum install -y libicu60
Finish
And now we can check the dotnet’s version by following command. Have fun~
dotnet -v