操作系统:CentOS Linux release 7.7.1908 (Core)
JAVA: OpenJDK Runtime Environment (build 1.8.0_222-ea-b03)
Tomcat:Tomcat8,
Mysql:mysql5.7(开启大小写不敏感)
libreoffice
mkdir wcp
root@localhost wcp]# rpm -qa | grep java
java-1.7.0-openjdk-headless-1.7.0.221-2.6.18.1.el7.x86_64
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2019b-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
java-1.8.0-openjdk-1.8.0.222.b03-1.el7.x86_64
java-1.7.0-openjdk-1.7.0.221-2.6.18.1.el7.x86_64
java-1.8.0-openjdk-headless-1.8.0.222.b03-1.el7.x86_64
[root@localhost wcp]# # rpm -e --nodeps java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64
[root@localhost wcp]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.221-2.6.18.1.el7.x86_64
[root@localhost wcp]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.222.b03-1.el7.x86_64
[root@localhost wcp]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.221-2.6.18.1.el7.x86_64
[root@localhost wcp]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.222.b03-1.el7.x86_64
[root@localhost wcp]# rpm -qa | grep java
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2019b-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
[root@localhost wcp]# java -version
bash: java: 未找到命令...
[root@localhost wcp]# tar -xzvf jdk_1_8_0_251.tgr.gz
[root@localhost wcp]# vi /etc/profile
## 添加
export JAVA_HOME=/home/wcp/jdk1.8.0_251
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin
[root@localhost wcp]# source /etc/profile
[root@localhost lib]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
[root@localhost ~]# rpm -qa | grep mariadb
mariadb-server-5.5.64-1.el7.x86_64
mariadb-5.5.64-1.el7.x86_64
mariadb-libs-5.5.64-1.el7.x86_64
[root@localhost ~]# rpm -qa | grep mysql
qt-mysql-4.8.7-3.el7_6.x86_64
akonadi-mysql-1.9.2-4.el7.x86_64
# 卸载软件,先卸载mysql ,不然要报错(mysql 引用mariadb)
[root@localhost wcp]# rpm -e akonadi-mysql-1.9.2-4.el7.x86_64 --nodeps
[root@localhost wcp]# rpm -e qt-mysql-4.8.7-3.el7_6.x86_64 --nodeps
[root@localhost wcp]# rpm -e mariadb-server-5.5.64-1.el7.x86_64 --nodeps
[root@localhost wcp]# rpm -e mariadb-5.5.64-1.el7.x86_64 --nodeps
[root@localhost wcp]# rpm -e mariadb-libs-5.5.64-1.el7.x86_64 --nodeps
[root@localhost wcp]# rpm -qa | grep mariadb
[root@localhost wcp]# rpm -qa | grep mysql
[root@localhost wcp]# tar -xzvf mysql.tar.gz
[root@localhost wcp]# vim /etc/profile
添加
export MYSQL_HOME=/home/wcp/mysql-5.7.30-glibc2.12-64
export PATH=$PATH:$MYSQL_HOME/bin
[root@localhost wcp]# source /etc/profile
[root@localhost mysql-5.7.30-glibc2.12-64]# vi my.conf
修改:lower_case_table_names=2
[root@localhost wcp]# $MYSQL_HOME/bin/mysqld_safe --defaults-file=$MYSQL_HOME/my.conf --user=root 2>&1 > /dev/null &
[1] 9710
[root@localhost wcp]#
Tomcat下载路径:https://tomcat.apache.org/download-80.cgi
[root@localhost wcp]# tar -xzvf apache-tomcat-8.5.98.tar.gz
[root@localhost wcp]# sh apache-tomcat-8.5.98/bin/startup.sh
浏览器验证是否开启成功(如果不行检查防火墙)
[root@localhost wcp]# firewall-cmd --state
running
[root@localhost wcp]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
[root@localhost img]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
success
firewall-cmd --zone=public --add-port=3306/tcp --permanent
[root@localhost wcp]# firewall-cmd --reload
[root@localhost wcp]# tar -xzvf Apache_OpenOffice_4.1.15_Linux_x86-64_install-rpm_zh-CN.tar.gz
[root@localhost wcp]# cd zh-CN/RPMS/
[root@localhost RPMS]# rpm -ivh *.rpm
[root@localhost RPMS]# cd desktop-integration/
[root@localhost desktop-integration]# rpm -ivh openoffice4.1.15-redhat-menus-4.1.15-9813.noarch.rpm
如果报错
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
卸载,删除 /usr/share/mime/packages/kde.xml 文件中的对应节点重新执行
[root@localhost desktop-integration]# rpm -qa | grep openoffice4
openoffice4.1.15-redhat-menus-4.1.15-9813.noarch
[root@localhost desktop-integration]# rpm -e openoffice4.1.15-redhat-menus-4.1.15-9813.noarch
准备中... ################################# [100%]
正在升级/安装...
1:openoffice4.1.15-redhat-menus-4.1################################# [100%]
/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
[root@localhost desktop-integration]# cd /opt/openoffice4/program/
[root@localhost program]# soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard &
[root@localhost desktop-integration]# rpm -ivh openoffice4.1.15-redhat-menus-4.1.15-9813.noarch.rpm
[root@localhost program]# ps -ef |grep 8100
root 18152 7934 0 19:01 pts/2 00:00:00 /bin/sh /usr/bin/soffice -headless -accept=socket,host=0.0.0.0,port=8100;urp; -nofirststartwizard
root 18172 18152 2 19:01 pts/2 00:00:00 /opt/openoffice4/program/soffice.bin -headless -accept=socket,host=0.0.0.0,port=8100;urp; -nofirststartwizard
[root@localhost program]# cd /usr/share/
[root@localhost share]# mkdir chinese
[root@localhost share]# cd chinese/
从windows中导入字体(C:\Windows\Fonts)
[root@localhost chinese]# chmod 755 *.TTF
[root@localhost chinese]# chmod 755 *.ttf
[root@localhost chinese]# chmod 755 *.TTC
[root@localhost chinese]# chmod 755 *.ttc
[root@localhost chinese]# mkfontscale
[root@localhost chinese]# mkfontdir
[root@localhost chinese]# fc-cache -fv
1.创建所需目录
[root@localhost wcp]# mkdir -p data/file/doc
[root@localhost wcp]# mkdir -p data/file/import
[root@localhost wcp]# mkdir -p data/file/export
[root@localhost wcp]# mkdir -p data/file/index
ROOT/ *知识库主项目*
wda/ *附件预览功能*
wcp.v4.2.0.sql *数据库脚本*
mysql> source sql/wcp.sql
mysql> source sql/wdap.sql
mysql> source sql/wuc.sql
5. 把服务放在tocmat(操作之前先停掉Tomcat)
6. 修改jdbc配置文件(根据自己的数据库配置)
[root@localhost webapps]# vi ROOT/WEB-INF/classes/jdbc.properties
7. 修改WcpWebConfig.xml文件下的相关路径
8. 换logo
[root@localhost webapps]# vi wda/WEB-INF/classes/config.properties