当前位置: 首页 > news >正文

企语企业管理系iFair(F23.2_a0)在Debian操作系统中的安装

起因:在安装了F24.8版本后,发现生产用环境和测试、开发用环境还是分开的好。 旧版的用来实验、测试,新版的一步一步小心的配置、使用是比较稳妥的操作。因此,决定在KVM虚拟机上搭建一个F23.2版本的企语系统。

一、 存在的问题

而在安装过程中,发现原来的方法用在Debian12系统中无法成功了。主要原因在于数据库的限制。 特别是 导入最后一个 proc.sql 数据库文件的时候,提醒 无法找到 mysql.proc 。这个东西只有Mysql-5.X系列支持,从8.0版本开始已经不再存在了。

尝试了从源码编译安装mysql到debian12系统中,但总有各种小问题无法顺利运行。 最终方案: Debian9 + Mysql5.6.51(*.deb安装) 。

具体过程参考: 服务社-企语系统-F_air21.8的Debian11安装方法,也叫协同管理系统_企语ifair-CSDN博客

注意,要使用 服务社官方给的 jdk1.7,  如果用jdk1.8 会造成部分项目无法显示等问题

二、Debian9 的安装

需要替换源。 该版本已经没有官方的支持了。

cat /etc/apt/sources.list

## 下面是内容

deb http://archive.debian.org/debian/ stretch main contrib non-free 
deb-src http://archive.debian.org/debian/ stretch main contrib non-free 
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free 
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free

三、 Mysql-5.6.51 安装后的配置

注意: 在安装Mysql过程中设置的 root 密码 是 A123456!  ,后面两个脚本中的该部分文字,请根据你的设定,加以修改!!!

配置文件1: /etc/mysql/mysql.cnf

cat /etc/mysql/my.cnf

###  主要配置内容如下:

# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4
no-auto-rehsah
[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysqldump]
quick
max_allowed_packet = 16M

[mchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M


[mysqlhotcopy]
interactive-timeout

[client]
#password   = your_password
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

配置文件2:/etc/mysql/mysql.conf.d/mysqld.cnf

cat /etc/mysql/mysql.conf.d/mysqld.cnf


### 主要配置内容如下:

# The MySQL  Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysqld]
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
datadir		= /var/lib/mysql
log-error	= /var/log/mysql/error.log
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
myisam_sort_buffer_size = 8M
read_rnd_buffer_size = 512K
read_buffer_size = 256K
net_buffer_length = 8K
sort_buffer_size = 512K
max_allowed_packet = 1M
key_buffer = 16M

四、数据库文件的导入

这一点非顺利,没有波折.  将下列代码保存为 input-mysql.sh 加x权限,运行即可.

#!/bin/bash
mysql -uroot -pA123456! </usr/local/fuwushe/db/stfoa.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_ccb.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_dc.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so_sale.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so_stocktake.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so_sum.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_fcb.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_frm.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/amb.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_scb.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so_orderproduct.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/biz_dl_so_sale_task.sql
mysql -uroot -pA123456! </usr/local/fuwushe/db/hrm.sql
mysql -uroot -pA123456! mysql </usr/local/fuwushe/db/proc.sql

五、 Tomcat app的配置文件的信息修改

将下列代码保存为 Change-yomcat.sh 加x权限,运行即可

#!/bin/bash
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/cc/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/cc/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/oa/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/oa/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/hr/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/hr/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/tc/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/tc/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa#' /usr/local/fuwushe/tomcat/webapps/pb/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/pb/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/fm/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/fm/WEB-INF/classes/hibernate.properties

	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/crm/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/crm/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/dlm/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dlm/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/dls/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dls/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/dlmpda/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dlmpda/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/dlspda/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dlspda/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/ccb/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/ccb/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/scb/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/scb/WEB-INF/classes/hibernate.properties
 
	sed -i 's#hibernate.connection.url=jdbc:mysql://localhost:13306/stfoa#hibernate.connection.url=jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/frm/WEB-INF/classes/hibernate.properties
	sed -i 's#hibernate.connection.password=3.1415926#hibernate.connection.password=A123456!\n#' /usr/local/fuwushe/tomcat/webapps/frm/WEB-INF/classes/hibernate.properties
 
	sed -i 's#sum.url = jdbc:mysql://localhost:13306/biz_dl_so_sum#sum.url = jdbc:mysql://localhost:3306/biz_dl_so_sum\n#' /usr/local/fuwushe/tomcat/webapps/dls/WEB-INF/classes/conf/sum.properties
	sed -i 's#sum.password = 3.1415926#sum.password = A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dls/WEB-INF/classes/conf/sum.properties
 
	sed -i 's#slave.url = jdbc:mysql://localhost:13306/stfoa#slave.url = jdbc:mysql://localhost:3306/stfoa\n#' /usr/local/fuwushe/tomcat/webapps/dlm/WEB-INF/classes/conf/slave.properties
	sed -i 's#slave.password = 3.1415926#slave.password = A123456!\n#' /usr/local/fuwushe/tomcat/webapps/dlm/WEB-INF/classes/conf/slave.properties

六、 启动Tomcat 中的app

cd /usr/local/fuwushe/tomcat/bin
chmod + ./*.sh
./startup.sh

默认使用的是 8080 端口。 可用frp 映射到公网ip 的vps上,用域名访问。

相关教程: Nginx与frp结合实现局域网和公网的双重https服务_nginx frp-CSDN博客

相关文章:

  • 在Mac M1上面安装Miniconda
  • 【AI】在Ubuntu中使用docker对DeepSeek的部署与使用
  • 【Android开发】安卓手机APP拍照并使用机器学习进行OCR文字识别(完整工程资料源码)
  • Python 识别图片和扫描PDF中的文字
  • Elasticsearch+Logstash+Kibana可视化集群部署
  • 将Mac上Python程序的虚拟环境搬到Windows
  • 简述mysql 主从复制原理及其工作过程,配置一主两从并验证
  • 学习threejs,使用HemisphereLight半球光
  • 【DuodooBMS】给PDF附件加“受控”水印的完整Python实现
  • Java内存模型,内存屏障是干嘛的?
  • 2024年认证杯SPSSPRO杯数学建模A题(第二阶段)保暖纤维的保暖能力全过程文档及程序
  • 在nodejs中使用RabbitMQ(三)Routing、Topics、Headers
  • RocketMQ、RabbitMQ、Kafka 的底层实现、功能异同、应用场景及技术选型分析
  • Ubuntu 如何安装Snipaste截图软件
  • vue渲染函数用法示例
  • 【docker知识】快速找出服务器中占用内存较高的容器
  • 机试题——移动01字符串
  • Ubuntu20.04上搭建nginx正向代理提供上网服务
  • 【Elasticsearch】keyword分析器
  • 用vue3写一个好看的wiki前端页面
  • 中美经贸高层会谈将在午餐后继续
  • “80后”赵亮出任上海普陀区委副书记
  • 云南一餐馆收购长江野生鱼加工为菜品,被查处罚款
  • 全国人大常委会启动食品安全法执法检查
  • 欧盟公布关税反制清单,瞄准美国飞机、汽车等产品
  • 马上评|让“贾宝玉是长子长孙”争议回归理性讨论