XIKEW.COM - 公读宝典 - Linux 安装 .NET Core - 公读宝典, - 记录一下Linux 部署的过程 NetCore

Linux 安装 .NET Core
NETCORE 5/6/2020 7:30:11 PM 阅读:12

记录一下Linux 部署的过程 NetCore

选择系统

其他系统可以进到页面左侧自行选择这里以Centos为例

添加 Microsoft 存储库密钥和源

每台计算机只需要执行一次此操作。

sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

安装 .NET Core SDK

更新可供安装的产品,然后安装 .NET Core SDK。 在终端中,运行以下命令。

sudo yum install dotnet-sdk-3.1

Linux 下 HttpClient SSL 异常

The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend

# 下载
wget https://curl.haxx.se/download/curl-7.64.0.tar.gz

# 解压编译安装
yum install openssl-devel gcc
tar -zxf curl-7.64.0.tar.gz
cd curl-7.64.0
./configure --prefix=/usr/local/curl/ --without-nss --with-ssl=/usr/local/ssl/
make && make install

# 替换系统curl,备份curl
mv /usr/bin/curl /usr/bin/curl.bak

# 创建link
ln -s /usr/local/curl/bin/curl /usr/bin/curl

# 编辑ld.so.conf
vi /etc/ld.so.conf 
include ld.so.conf.d/*.conf
/usr/local/curl/lib

# 刷新load配置
ldconfig

curl -V

补充

如果遇到其他问题,请查阅官方网站!