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

企语企业管理系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博客


http://www.kler.cn/a/544625.html

相关文章:

  • O1、R1和V3模型
  • 二次封装axios解决异步通信痛点
  • 本地生活案例列表案例
  • MATLAB算法实战应用案例精讲-【数模应用】灰度图像增强(附MATLAB、C++和python代码实现)
  • 【数据可视化-16】珍爱网上海注册者情况分析
  • Linux 内核架构入门:从基础概念到面试指南*
  • leetcode-495.提莫攻击
  • 蓝桥杯单片机大模板(西风)
  • 6.appender
  • Python(下)
  • sqlilabs--小实验
  • 深度学习框架探秘|TensorFlow vs PyTorch:AI 框架的巅峰对决
  • 2025年02月10日Github流行趋势
  • C语言——排序(冒泡,选择,插入)
  • 【Elasticsearch】内置分析器概述
  • Air724 DTU数据上报json到v1/gateway/telemetry
  • 2D小游戏-创新设计——《弹射挑战》
  • 伯克利 CS61A 课堂笔记 08 —— Strings and Dictionaries
  • 解析 JavaScript 面试题:`index | 0` 确保数组索引为整数
  • 数据库安全、分布式数据库、反规范化等新技术(高软19)