Run .NET programs on Amazon Linux AMI

大憨熊 提交于 2019-12-24 07:09:28

问题


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?

I tried yum -y install mono but got No package mono available, and yum -y install mono-complete doesn't work either.

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).


回答1:


I managed to install .NET Core by following this tutorial - Deploy ASP.NET Core Application On EC2 Amazon Linux Instance.

I needed to run these commands:

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

After that I could start my application by running dotnet MyApplication.exe.



来源:https://stackoverflow.com/questions/47853821/run-net-programs-on-amazon-linux-ami

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!