尝试在CentOS和Ubuntu二个Linux的版本下安装Nginx并部署Net Core程序,整理安装过程作为给团队的部署人员参考。
0. 查看Linux系统版本
$lsb_release -a #Ubuntu下执行
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
$cat /etc/redhat-release #CentOS下执行
CentOS Linux release 7.3.1611 (Core)
1. 下载安装Net Core
详细的安装步骤参考微软Net Core网址,不同的Linux选择不同的版本。
CentOS下第一次安装先得执行这二句注册一下,然后安装sdk。
$sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
$sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl= https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/