A full-featured yet simple blog engine built on ASP.NET Core 6.x.
local:ctyun disk D:\developer_mini_core
github:https://github.com/iaspnetcore/MiniBlog.Core.git
domain:miniblog.iaspnetcore.com on vultr
Create a ViewComponents https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-6.0
Theme templates come from:https://getbootstrap.com/docs/5.1/examples/blog/#
Live demo: https://miniblog.iaspnetcore.com/
Username: demo
Password: demo
1.buy domain
2.buy server
-
A to server
-
install nginx
-
config nginx for your domain
6.install Let’s Encrypt client certbot
7.downloaded SSL certificates for your domain
没有账号的点我注册Vultr账号(注册就送20美元哦)https://www.vultr.com/?ref=7035322-3B
Vultr注册购买图文教程 Click here.
-
How to Deploy a New Instance on Vultr Step by Step (https://www.iaspnetcore.com/blogpost-6199ff495b26cb0202ad6ce8-how-to-deploy-a-new-instance-on-vultr-step-by-step)
-
How To Install and uninstall reinstall Nginx on Ubuntu 18.04(aliyun)(https://www.iaspnetcore.com/blogpost-5d9865cc72c1772b244afe0f-how-to-install-and-uninstall-reinstall-nginx-on-ubuntu-1804aliyun)
-
How to Install and uninstall reinstall upgrade .NET 6.x on Ubuntu 18.04*64 step by step https://www.iaspnetcore.com/blogpost-618a75d3635c733c81dc77c3-how-to-install-net-6x-on-ubuntu-180464-step-by-step
-
How to Deploying Real World ASP.NET Core 6.x on Ubuntu 18.04 step by step(vultr) https://www.iaspnetcore.com/blogpost-5f8791eb6cd85f05bcad2df1-how-to-deploying-real-world-aspnet-core-6x-on-ubuntu-1804-step-by-step
-
Follows best practices for web applications
- High performance. Gets 100/100 points on Google PageSpeed Insights
- Speed Index < 1000
- Meets highest accessibility standards
- W3C standards compliant
- Responsive web design
- Mobile friendly
- Schema.org support with HTML 5 Microdata
- OpenGraph support for Facebook, Twitter, Pinterest and more
- Seach engine optimized
- Security HTTP headers set
- Uses the Azure Image Optimizer for superb image compression
- Uses a CDN Tag Helper to make it easy to serve the images from any CDN.
On the command line
cd /
cd /var/www/MiniBlog.Core/src/Miniblog.Core
dotnet run --urls http://0.0.0.0:6002
dotnet run --urls http://localhost:6002
miniblog.iaspnetcore.com服务器配置
1.miniblog.iaspnetcore.com
命令行启动
Debug
sudo systemctl stop kestrel-miniblogiaspnetcorecom.service
cd /
cd /var/www/MiniBlog.Core/src/Miniblog.Core
dotnet run --urls http://0.0.0.0:6002
dotnet run --urls http://localhost:6002
Release
sudo systemctl stop kestrel-miniblogiaspnetcorecom.service
cd /var/www/MiniBlog.Core/src/Miniblog.Core
dotnet publish -c release
cd /var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish/
dotnet Miniblog.Core.dll --urls http://127.0.0.1:6002
2.服务配置
sudo vi /etc/systemd/system/kestrel-miniblogiaspnetcorecom.service
path:/etc/systemd/system/kestrel-miniblogiaspnetcorecom.service
kestrel-miniblogiaspnetcorecom.service
[Unit]
Description=miniblog.iaspnetcore.com App running on Ubuntu
[Service]
WorkingDirectory=/var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish
ExecStart=/usr/bin/dotnet /var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish/Miniblog.Core.dll --urls http://127.0.0.1:6002
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=miniblog.iaspnetcore.com
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
3.Install first kestrel-miniblogiaspnetcorecom.service
sudo systemctl daemon-reload
sudo systemctl enable kestrel-miniblogiaspnetcorecom.service
sudo systemctl start kestrel-miniblogiaspnetcorecom.service
sudo systemctl status kestrel-miniblogiaspnetcorecom.service
sudo systemctl restart kestrel-miniblogiaspnetcorecom.service
sudo systemctl stop kestrel-miniblogiaspnetcorecom.service
sudo systemctl status kestrel-miniblogiaspnetcorecom.service
sudo journalctl -fu kestrel-miniblogiaspnetcorecom.service
sudo systemctl restart kestrel-miniblogiaspnetcorecom.service
4.批处理
cp -r /var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web/bin/release/net5.0/publish/wwwroot/uploadimages /var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web/wwwroot/uploadimages
sudo systemctl stop kestrel-wwwiaspnetcorecom.service
cd /
cd var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web
dotnet publish -c release
sudo systemctl daemon-reload
sudo systemctl restart kestrel-wwwiaspnetcorecom.service