- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
添加镜像订阅
rpm --import https://www.landui.com/keys/microsoft.asc sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl= https://www.landui.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://www.landui.com/keys/microsoft.asc" > /etc/yum.repos.d/dotnetdev.repo'
安装SDK
sudo yum install libunwind libicusudo yum install dotnet-sdk-2.1.3
查看安装
dotnet --version
psftp [主机地址]put D:\website.7z
解压文件,使用的是 p7zip
7za x website.7z
创建服务
vi /etc/systemd/system/website.service
[Unit]Description=Web API Application running on CentOS[Service]WorkingDirectory=/home/websiteExecStart=/usr/bin/dotnet /home/website/website.dllRestart=alwaysRestartSec=10 # Restart service after 10 seconds if dotnet service crashesSyslogIdentifier=websiteUser=rootEnvironment=ASPNETCORE_ENVIRONMENT=ProductionEnvironment=DOTNET_PRINT_TELEMETRY_MESSAGE=false[Install]WantedBy=multi-user.target
启动服务
systemctl start website systemctl enable website
测试站点
curl localhost:8010
yum install -y nginx
启动,测试
systemctl start nginx nginx -v
修改配置文件
cd /etc/nginx vi /etc/nginx/conf.d/vhost_website.conf
server { server_name [test.xxx.com]; root /home/website; location / { proxy_pass http://www.landui.com:8010; } }
重新加载
systemctl restart nginx
浏览器打开
http://[test.xxx.com]
1.Unable to bind to http://www.landui.com:5000 on the IPv6 loopback interface: ‘Error -99 EADDRNOTAVAIL address not available’.
添加hosting.json
{ "server.urls": "http://*:8010"}
修改Program
public static void Main(string[] args) { var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("hosting.json", optional: true) .Build(); WebHost.CreateDefaultBuilder(args) .UseConfiguration(config) .UseStartup<Startup>() .Build() .Run(); }
售前咨询
售后咨询
备案咨询
二维码
TOP