CentOS部署Jexus+.Net Core2.2 MVC发布笔记

1. dotnet sdk 安装

sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-2.2
dotnet --version

2. git

yum install git
cd ~
git clone https://xxxx/FirstNetCoreMvc.git
cd ~/FirstNetCoreMvc/FirstCoreMvc

3. 发布应用文件

dotnet run
ctrl+c
dotnet publish -o /var/www/firstmvc
cd /var/www/firstmvc
ls
cd ~

4. Jexus安装

yum install wget
curl https://jexus.org/release/x64/install.sh|sudo sh
cd /usr/jexus/siteconf
cp default firstmvc
vi firstmvc

修改firstmvc
port=5000
root=/ /var/www/firstmvc
hosts=* #OR your.com,*.your.com
# AspNet.Workers=1 # Set the number of asp.net worker processes.Defauit is 1.
# addr=0.0.0.0
# CheckQuery=false
NoLog=true
AppHost={cmd=dotnet /var/www/firstmvc/FirstCoreMvc.dll; root=/var/www/firstmvc/; port=0}

5. 运行

sh /usr/jexus/jws restart
curl http://localhost:5000

6. 防火墙关闭

sudo firewall-cmd  --state
sudo systemctl stop firewalld

你可能感兴趣的:(CentOS部署Jexus+.Net Core2.2 MVC发布笔记)