栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Debian11安装帆软Finereport11服务器保姆版

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Debian11安装帆软Finereport11服务器保姆版

1、最小化安装debian11,一定要选中文语言,设置apt源

nano /etc/ssh/sshd_config
	PermitRootLogin yes
systemctl restart sshd

nano /etc/apt/sources.list
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

2、ssh登录,更新系统,安装常用软件

apt-get -y update
apt-get -y full-upgrade
apt-get install -y iftop net-tools

3、研究安装方法
https://help.fanruan.com/finereport/doc-view-4228.html
4、下载安装包
懒人首选服务器部署包方式,只需下载解压服务器部署包,无需下载安装 Tomcat、JDK,无需下载安装 FineReport 设计器,该部署包内置有 JDK 和 Finereport 工程,用户部署完即可使用。
uname -m确认系统架构x64:

下载finereport地址:https://www.finereport.com/product/download
选择对应的版本,迅雷下载下来,tomcat-linux.tar.gz(773MB),用xshell sftp上传到debian11

5、解压缩安装包

cd /root  #进入上传部署包所在目录
tar -zxvf tomcat-linux.tar.gz  # 解压 tomcat 安装包
mv ./tomcat-linux /var/finereport  # 重命名文件夹
echo "" > /var/finereport/logs/signal.log

6、启动软件

cd /var/finereport/bin  # 进入bin目录
./startup.sh  # 启动 Tomcat
Using CATALINA_base:   /var/finereport
Using CATALINA_HOME:   /var/finereport
Using CATALINA_TMPDIR: /var/finereport/temp
Using JRE_HOME:        /var/finereport/jdk/jre
Using CLASSPATH:       /var/finereport/bin/bootstrap.jar:/var/finereport/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -Djava.awt.headless=true
Tomcat started.

需要等待一会儿让程序部署完成,也可以实时查看部署进度:

cd /var/finereport/logs
tail -f catalina.out


7、打开Chrome浏览器访问服务器
http://(换成你的debian服务器ip):8080/webroot/decision

en,能连上了,问题不大,关掉做一些设置
8、关闭程序

ps -ef|grep finereport


Kill掉红色的进程号,蓝色的是上面的查询命令进程,不用管

kill -9 1041
kill -9 730
root@node3:/var/finereport/logs# ps -ef|grep finereport
root        1262     717  0 13:32 pts/0    00:00:00 grep finereport

9、安装mysql8,不用他自带的finedb,提高性能

apt-get -y install gnupg
cd /root
wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
dpkg -i mysql-apt-config_0.8.22-1_all.deb
apt-get -y update
apt-get install -y mysql-server

会提示以下包会一并安装上:

libaio1 libmecab2 libnuma1 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core psmisc

设置mysql密码,选择非cluster,安装连接工具,不开启预览功能,密码选择强加密模式:


安装完成后查看服务是否启动:

systemctl status mysql


使用刚才设置的密码登录:

mysql -uroot –p

(输入安装时设置的密码):

use mysql;
update user set host = '%' where user = 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
CREATE DATAbase `finedb` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
exit;

用navicat连上去看看,o(∩_∩)o

删掉finereport自带的mysql5驱动,换成mysql8 的驱动,修改mysql配置禁用dns解析加快连接速度:

cd /var/finereport/ webapps/webroot/WEB-INF/lib
rm mysql-connector-java-5.1.49-bin.jar
wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar


nano /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
skip-name-resolve

systemctl restart mysql

10、修改配置,使得通过IP可以直接访问数据决策系统
(注意,使用80端口需要有root权限运行)

nano /var/finereport/conf/server.xml

修改connector port:

nano /var/finereport/webapps/webroot/a.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

  
    FineReport报表
    
    
  
  
    
  


mv /var/finereport/webapps/webroot/ /var/finereport/webroot
nano /var/finereport/conf/server.xml

Host之间添加以下内容

nano /var/finereport/webroot/WEB-INF/web.xml

粘贴以下内容:


 
  Template WebApp
  
    
  msi
  application/x-msi
  
  
    
    index.html  
    index.htm  
    a.jsp  
    index.jsp  
    


ps -ef|grep finereport
kill -9 [你的pid]

/var/finereport/bin/startup.sh
tail -f /var/finereport/logs/catalina.out

看到重启完成浏览器连接:
http://(换成你的debian服务器ip)


手动修改配置
驱动改为:com.mysql.cj.jdbc.Driver
用户名密码:(自己的)
数据库连接URL(其中IP:端口号/数据库名称需要自行调整):

jdbc:mysql://IP:端口号/finedb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL&allowPublicKeyRetrieval=true






11、调整参数
内存:这块儿根据自己硬件设置,我64G内存

nano /var/finereport/bin/catalina.sh
JAVA_OPTS="$JAVA_OPTS -Xms32768M -Xmx32768M -Xss1024K -XX:MaxDirectMemorySize=2g -Dfineio.read_mem_limit=2 -Dfineio.write_mem_limit=1 -XX:NewRatio=2"

最大打开文件数:
1)nofile
该值是指单进程的最大打开文件数,debian11默认值为1024。
2)nr_open
该值是指单个进程可分配的最大文件数,debian11默认值为1024*1024=1048576。
3)file-max
该值是系统内核一共可以打开的最大值。
一般情况下,nofile 的值不允许超过 nr_open 和 file-max 的值。

# ulimit -n
1024
# cat /proc/sys/fs/nr_open
1048576
# cat /proc/sys/fs/file-max
9223372036854775807

编辑文件增加内容:

nano /etc/security/limits.conf

# /etc/security/limits.conf
root soft nofile 128000
root hard nofile 128000
# End of file

nano /var/finereport/conf/context.xml
     

12、设置开机自启动

nano  /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/var/finereport/bin/startup.sh
exit 0

chmod +x /etc/rc.local
systemctl enable rc-local
systemctl start rc-local.service

检查状态

systemctl status rc-local.service

返回Active: active (running)信息,则成功。

13、使用「字体管理插件」在平台安装缺失字体,解决缺少字体乱码、被替换字体的问题


把网上下的漂亮字体和本机C:WindowsFonts下的字体文件拷出来,一股脑儿全上传上去o(∩_∩)o
14、安装H5展现插件

15、注册

请使用正版软件。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/740564.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号