FastReport .Net是一款全功用的Windows Forms、ASP.NET和MVC报表阐发处理计划,利用FastReport .NET能够创建独立于应用法式的.NET报表,同时FastReport .Net撑持中文、英语等14种语言,能够让你的产物包管实正的国际性。

FastReport .Net官方最新版免费下载试用,汗青版本下载,在线文档和帮忙文件下载-慧都网

寡所周知,报表开发东西 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 serversudo systemctl restart apache2— Stops and restarts the web server

Apache 设置装备摆设为在办事器启动时主动启动。若是您不想如许做,请利用以下号令禁用它:

sudo systemctl disable apache2

要在引导期间从头加载启动办事,请输入:

sudo systemctl enable apache2

如今我们需要设置虚拟主机,意味着若是转到 localhost:80,将被主动重定向到 localhost:5000。

为了工做能一般停止,有需要启用一些模块:

sudo a2enmod proxysudo a2enmod proxy_http

接下来,转到安拆 Apache 时主动创建的文件夹:

sudo cd /etc/apache2/sites-available/

如今用设置装备摆设创建一个文件并立即编纂它:

sudo nano /etc/apache2/sites-available/YOUr_domain.conf

您需要将下行添加到文件中:

<VirtualHost *:80>ProxyPreserveHost OnProxyPass / http://127.0.0.1:5000/ProxyPassReverse / http://127.0.0.1:5000/ErrorLog ${APACHE_LOG_DIR}helloapp-error.logCustomLog ${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 defaultsudo 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最新版试用下载,请点击下方蓝字

FastReport .Net官方最新版免费下载试用,汗青版本下载,在线文档和帮忙文件下载-慧都网