在Amazon Linux AMI上运行.NET程序 [英] Run .NET programs on Amazon Linux AMI
问题描述
如何通过安装Mono或.NET Core在Amazon Linux AMI上运行.NET程序?还是已经安装了运行时?
How can I run a .NET program on an Amazon Linux AMI, either by installing Mono or .NET Core? Or is the runtime already installed?
我尝试了 yum -y install mono
但得到了没有可用的软件包mono
,并且 yum -y install mono-complete
也不起作用。
I tried yum -y install mono
but got No package mono available
, and yum -y install mono-complete
doesn't work either.
我也找不到安装.NET Core的任何方法-运行 yum search dotnet
(或 yum search mono
)。
I couldn't find any way to install .NET core either - there are no packages listed when I run yum search dotnet
(or yum search mono
for that matter).
推荐答案
我设法按照以下步骤安装.NET Core教程-部署ASP EC2 Amazon Linux实例上的.NET Core应用程序。
I managed to install .NET Core by following this tutorial - Deploy ASP.NET Core Application On EC2 Amazon Linux Instance.
我需要运行以下命令:
sudo su -
yum install -y libunwind libicu
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835019
mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
ln -s /opt/dotnet/dotnet /usr/local/bin/dotnet
之后,我可以通过运行 dotnet MyApplication.exe
来启动我的应用程序。
After that I could start my application by running dotnet MyApplication.exe
.
这篇关于在Amazon Linux AMI上运行.NET程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!