标签:部署 tco one connect local 代理服务 fir .dll --
yum install libunwind libicu
yum install aspnetcore-runtime-2.1
sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
装好nginx要配置端口之类的。
cd /etc/nginx/
nginx.conf是默认的配置文件,基本不用动。
cd conf.d
vim kestrel-juxiangtou.conf
下面主要就是两个端口号的需要改一下,其他都可以不用改动。
server {
listen 8001;
location / {
proxy_pass http://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
}
}
保存退出
验证一下配置,然后重新载入
sudo nginx -t
sudo nginx -s reload
systemctl status firewalld
firewall-cmd --zone=public --add-port=8001/tcp --permanent
firewall-cmd --reload
systemctl restart firewalld.service
cd /etc/systemd/system
vim kestrel-juxiangtou.service
[Unit]
Description=JuXiangTou
[Service]
WorkingDirectory=/var/www/JuXiangTou
ExecStart=/usr/bin/dotnet /var/www/JuXiangTou/Site.WebApi.dll
Restart=always
RestartSec=10
SyslogIdentifier=JuXiangTou
User=root
Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
保存退出
systemctl restart kestrel-juxiangtou.service
重启一下服务。
标签:部署 tco one connect local 代理服务 fir .dll --
原文地址:https://www.cnblogs.com/sheldon-lou/p/9277085.html