海伦网站建设,济南网站建设开发,京东官方网上商城app下载,广州网站开发报价FastReport .NET是一款全功能的Windows Forms、ASP.NET和MVC报表分析解决方案#xff0c;使用FastReport .NET可以创建独立于应用程序的.NET报表#xff0c;同时FastReport .Net支持中文、英语等14种语言#xff0c;可以让你的产品保证真正的国际性。专业版和企业版包括Fast…FastReport .NET是一款全功能的Windows Forms、ASP.NET和MVC报表分析解决方案使用FastReport .NET可以创建独立于应用程序的.NET报表同时FastReport .Net支持中文、英语等14种语言可以让你的产品保证真正的国际性。专业版和企业版包括FastReport的所有源代码你可根据自己的特殊需求调整产品并完全控制所有软件代码保障报表的绝对安全。
FastReport.NET官方版下载https://www.evget.com/product/1861/download
众所周知 FastReport .NET 是一款强大的报表开发工具它支持与 Apache 2 Web 服务器集成。本次我们进行的就是 Apache 2 在 Linux 操作系统上的微调。
首先我们需要使用一些命令安装 .NET 5从 Microsoft 存储库下载必要的包
$ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
接下来我们来安装 .NET5 包
sudo apt-get update; \
sudo apt-get install -y apt-transport-https \
sudo apt-get update \
sudo apt-get install -y dotnet-sdk-5.0
注意你可以开始安装FastReport.Core.Skia包并将此项目发送给已经在Ubuntu上的你。 通过测试安装你不需要X11来使应用程序正常工作因为它已经和apache或在Ubuntu上安装了。 现在让我们用以下命令开始加载Apache2。
sudo apt install apache2
如果成功就可以继续下一步。接下来我们将管理 Apache 服务或其重启和关闭。请记住对于 Apache 中的任何更改例如更改配置或启用任何设置时您将需要运行以下命令
sudo systemctl start apache2 — Starts a previously stopped web server
sudo systemctl restart apache2— Stops and restarts the web server
Apache 配置为在服务器启动时自动启动。如果您不想这样做请使用以下命令禁用它
sudo systemctl disable apache2
要在引导期间重新加载启动服务请输入
sudo systemctl enable apache2
现在我们需要设置虚拟主机意味着如果转到 localhost:80将被自动重定向到 localhost:5000。
为了工作能正常进行有必要启用一些模块
sudo a2enmod proxy
sudo a2enmod proxy_http
接下来转到安装 Apache 时自动创建的文件夹
sudo cd /etc/apache2/sites-available/
现在用配置创建一个文件并立即编辑它
sudo nano /etc/apache2/sites-available/your_domain.conf
您需要将下行添加到文件中
VirtualHost *:80
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ErrorLog ${APACHE_LOG_DIR}helloapp-error.log
CustomLog ${APACHE_LOG_DIR}helloapp-access.log common
注意如果转到 localhost:80那么将被自动重定向到 localhost:5000
创建配置文件后激活它并禁用默认配置
sudo a2ensite your_domain.conf —Activate your config
sudo a2dissite 000-default.conf — Disable the config by default
sudo apache2ctl configtest — Check the file for syntax errors (if it is ok, then you will see the Output Syntax OK notification in the console)
sudo systemctl restart apache2 —Restart Apache for the changes to take effect 要发布项目您将需要以下命令
dotnet publish --configuration Release — Publish the application to the publish folder as a release
接下来转到发布文件夹。您将使用 ls 命令看到所有带有项目名称的 dll。
该项目使用以下命令启动
dotnet FastReport.Core.Web.Net5.dll
使用之前启动的 FastReport.Core.Web.Net5 应用程序重新启动 Apache并转到 Apache 中指定的虚拟主机。即在 localhost:80 上看到它自动重定向到 localhost:5000。
如果成功的话那么恭喜您已经为 FastReport .NET 成功配置了 Apache 2。