06.Linux系统WCP知识共享平台安装部署(旗舰版)
WCP知識(shí)共享平臺(tái)部署
一、環(huán)境準(zhǔn)備
操作系統(tǒng):CentOS Linux release 7.5.1804 (Core)
Java:jdk-7u79-linux-x64.tar.gz
中間件:apache-tomcat-7.0.92.tar.gz
數(shù)據(jù)庫(kù):mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
WCP知識(shí)共享平臺(tái)安裝步驟 :
二、軟件安裝:
1.安裝JDK程序
1.1.卸載系統(tǒng)自帶的OpenJDK以及相關(guān)的java文件
1.1.1.檢查Java版本信息
# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
1.1.2.查看系統(tǒng)自帶Java相關(guān)文件
# rpm -qa | grep java
javamail-1.4.6-8.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
tzdata-java-2018c-1.el7.noarch
java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64
javassist-3.16.1-10.el7.noarch
java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64
java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64
java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64
javapackages-tools-3.4.1-11.el7.noarch
1.1.3卸載系統(tǒng)自帶的Openjdk版本(其他不用卸載)
# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64
# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64
# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64
# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64
1.1.4.檢查是否已經(jīng)刪除成功
# java -version
bash:java:未找到命令...
1.2.解壓jdk-7u79-linux-x64
# tar -xzf jdk-7u79-linux-x64.tar.gz -C /usr/local/data/java/
# cd /usr/local/data/java/jdk1.7.0_79/
1.2.1.配置JDK環(huán)境變量
# vim /etc/profile
文本最后添加
#java environment
export JAVA_HOME=/usr/local/data/java/jdk1.7.0_79
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin
1.2.2.環(huán)境變量生效并檢查是否安裝成功
# source /etc/profile
# java -version
2.安裝Tomcat中間件
2.1.解壓縮apache-tomcat-7.0.92
# tar -xzf apache-tomcat-7.0.92.tar.gz -C /usr/local/data/
# cd /usr/local/data
# mv apache-tomcat-7.0.92 tomcat7
2.1.1.啟動(dòng)Tomcat7
# cd /usr/local/data/tomcat7/bin
# ./startup.sh
2.1.2.關(guān)閉Tomcat7
# cd /usr/local/data/tomcat7/bin
# ./ shutdown.sh
3.安裝MySQL數(shù)據(jù)庫(kù)
3.1.卸載系統(tǒng)自帶的MySQL和Mariadb數(shù)據(jù)庫(kù)
3.1.1.卸載系統(tǒng)自帶的MySQL數(shù)據(jù)庫(kù)
# rpm -qa | grep mysql
akonadi-mysql-1.9.2-4.el7.x86_64
qt-mysql-4.8.7-2.el7.x86_64
# rpm -e akonadi-mysql-1.9.2-4.el7.x86_64 --nodeps
# rpm -e qt-mysql-4.8.7-2.el7.x86_64 –nodeps
3.1.2.卸載系統(tǒng)自帶的Mariadb數(shù)據(jù)庫(kù)
# rpm -qa | grep mariadb
mariadb-server-5.5.56-2.el7.x86_64
mariadb-5.5.56-2.el7.x86_64
mariadb-libs-5.5.56-2.el7.x86_64
# rpm -e mariadb-server-5.5.56-2.el7.x86_64 --nodeps
# rpm -e mariadb-5.5.56-2.el7.x86_64 --nodeps
# rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps
3.2.解壓縮MySQL-5.7.24-linux-glibc2.12-x86_64
tar -xzf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz -C /usr/local/data
# cd /usr/local/data
# mv mysql-5.7.24-linux-glibc2.12-x86_64/ mysql
3.2.1.創(chuàng)建用戶和組
# groupadd mysql
# useradd -r -g mysql mysql
3.2.2.修改MySQL目錄權(quán)限
# cd /usr/local/data/mysql/
# chown -R mysql:mysql ./
3.2.3.添加MySQL服務(wù)
cp /usr/local/data/mysql/support-files/mysql.server /etc/init.d/mysql
vim /etc/init.d/mysql
basedir=/usr/local/data/mysql/
datadir=/usr/local/data/mysql/data
3.2.4.添加MySQL配置文件
vim /etc/my.cnf
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
port = 3306
default-character-set=utf8
[mysqld]
# 一般配置選項(xiàng)
basedir = /usr/local/data/mysql
datadir = /usr/local/data/mysql/data
port = 3306
character-set-server=utf8
default_storage_engine=InnoDB
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
lower_case_table_names=1
3.3.初始化MySQL數(shù)據(jù)庫(kù)
3.3.1.編譯安裝并初始MySQL數(shù)據(jù)庫(kù)
cd /usr/local/mysql/bin/
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
3.3.2.自動(dòng)生成默認(rèn)密碼在執(zhí)行記錄中,請(qǐng)復(fù)制保存
root@localhost: vL:hjwZq(7=p
3.3.3.啟動(dòng)MySQL-5.7.24-linux-glibc2.12-x86_64數(shù)據(jù)庫(kù)
service mysql start
3.3.4.登錄及遠(yuǎn)程配置MySQL-5.7.24-linux-glibc2.12-x86_64數(shù)據(jù)庫(kù)
cd /usr/local/mysql/bin
./mysql -uroot –p
Enter password: vL:hjwZq(7=p (輸入默認(rèn)的臨時(shí)密碼)
3.3.5.修改MySQL-5.7.24-linux-glibc2.12-x86_64數(shù)據(jù)庫(kù)登錄密碼(自定義密碼)
mysql> set password=password('12345678');
3.3.6.設(shè)置MySQL-5.7.24-linux-glibc2.12-x86_64數(shù)據(jù)庫(kù)遠(yuǎn)程訪問(wèn)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Agree123';
mysql> flush privileges;
mysql> exit;
3.3.7.設(shè)置開機(jī)啟動(dòng)
chkconfig --list
chkconfig --add mysql
chkconfig mysql on
3.3.8.配置環(huán)境變量
vi /etc/profile
# Mysql environment
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin
source /etc/profile
4.安裝Apache_OpenOffice辦公套件
4.1.解壓縮Apache_OpenOffice_4.1.6
tar -xzf Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz -C /usr/local/data/
cd /usr/local/data/zh-CN/RPMS/
4.1.1.安裝RPM文件
rpm -ivh *.rpm
cd desktop-integration
rpm -ivh openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm
4.1.2.啟動(dòng)OpenOffice進(jìn)程
臨時(shí)啟動(dòng):
/opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
后臺(tái)啟動(dòng):
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
4.1.3.停止OpenOffice進(jìn)程
ps -ef | grep soffice | grep -v grep | awk '{print $2}' | xargs kill -9
5.安裝WCP知識(shí)共享庫(kù)
5.1.創(chuàng)建相應(yīng)目錄
# mkdir -p /data/file/doc
# mkdir -p/data/file/import
# mkdir -p/data/file/export
# mkdir -p/data/file/index
5.2.程序文件上傳Tomcat下的webapps目錄
[root@localhost webapps]# cd /usr/local/data/tomcat7/webapps/
ROOT/ *知識(shí)庫(kù)主項(xiàng)目*
wda/ *附件預(yù)覽功能*
wcp.v4.2.0.sql *數(shù)據(jù)庫(kù)腳本*
5.3.登錄MySQL數(shù)據(jù)庫(kù)
[root@localhost webapps]# mysql -uroot -p
mysql> create database wcp4;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ekca |
| mysql |
| performance_schema |
| sys |
| wcp4 |
+--------------------+
6 rows in set (0.05 sec)
mysql> use wcp4
mysql> source /usr/local/data/tomcat7/webapps/wcp.v4.2.0.sql;
mysql> exit
5.4.修改ROOT主項(xiàng)目系統(tǒng)配置參數(shù)
5.4.1.修改jdbc.properties文件下的用戶密碼和庫(kù)名稱
[root@localhost ~]# vim /ROOT/WEB-INF/classes/jdbc.properties
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc\:mysql\://127.0.0.1\:3306/wcp4?useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=********
5.4.2.修改WcpWebConfig.xml文件下的相關(guān)路徑
[root@localhost ~]# vim /ROOT/WEB-INF/classes/WcpWebConfig.xml
<!-- 界面展示 -->
<group describe="文字標(biāo)記/通用配置" name="webshow">
<parameter name="config.sys.title">
<val>**知識(shí)分享平臺(tái)</val>
<describe>系統(tǒng)標(biāo)題</describe>
</parameter>
<parameter name="config.sys.foot">
<val>**知識(shí)分享平臺(tái)</val>
<describe>系統(tǒng)頁(yè)面最下方顯示</describe>
</parameter>
<!--文件上傳 -->
<group describe="文件" name="document.properties">
<parameter name="config.doc.dir">
<val>/data/file/doc</val>
<describe>附件文件夾地址,
1. 使用相對(duì)路徑[WEBROOT]表示部署路徑的根目錄比如:
(WEBROOT/files=E:\server\wcp-tomcat-6.0.16\webapps\wcp\files)
2.或者使用絕對(duì)路徑如:[D:\wcp3server\resource\file]
</describe>
</parameter>
<parameter name="config.doc.file.import">
<val>/data/file/import</val>
<describe>本地知識(shí)導(dǎo)入目錄</describe>
</parameter>
<parameter name="config.doc.file.export">
<val>/data/file/export</val>
<describe>本地知識(shí)導(dǎo)出目錄</describe>
</parameter>
<!-- 索引文件,全文檢索 -->
<group describe="全文檢索" name="indexConfig.properties">
<parameter name="config.file.luncene_index_dir">
<val>/data/file/index</val>
<describe>索引文件夾地址,
1.使用相對(duì)路徑[WEBROOT]表示部署路徑的根目錄比如:
(WEBROOT/indexfiles=E:\server\wcp-tomcat-6.0.16\webapps\wcp\indexfiles)
2.或者使用絕對(duì)路徑如:[D:\wcp3server\resource\index]
</describe>
</parameter>
5.5.修改wda附件預(yù)覽系統(tǒng)配置參數(shù)
5.5.1.修改config.properties文件
[root@localhost webapps]# vim wda/WEB-INF/classes/config.properties
修改WDA的openoffice進(jìn)程結(jié)束路徑
config.server.openoffice.kill.cmd=ps -ef | grep soffice | grep -v grep | awk '{print $2}' | xargs kill -9
修改WDA的openoffice啟動(dòng)路徑
config.server.openoffice.start.cmd=nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
5.6.用戶同步和logo修改
5.6.1.LDAP同步配置
[root@localhost webapps]# vim /ROOT/WEB-INF/classes/WcpInterConfig.xml
<!-- LDAP用戶同步接口 -->
<group describe="LDAP用戶同步接口" name="ldap">
<parameter name="config.wcp.ldap.state">
<val>true</val>
<describe>是否啟用LDAP接口</describe>
</parameter>
<parameter name="config.wcp.ldap.url">
<val>ldap://192.168.*.*:389/</val>
<describe>ldap的服務(wù)地址,
如:ldap://123.113.98.18:539/</describe>
</parameter>
<parameter name="config.wcp.ldap.admin.name">
<val>cn=****,dc=****,dc=****</val>
<describe>查詢用戶名(CN)</describe>
</parameter>
<parameter name="config.wcp.ldap.admin.password">
<val>******</val>
<describe>查詢用戶密碼</describe>
</parameter>
<parameter name="config.wcp.ldap.orgdn">
<val>ou=****,dc=****,dc=****</val>
<describe>組織機(jī)構(gòu)的目錄DN,只加載該節(jié)點(diǎn)的子節(jié)點(diǎn)</describe>
</parameter>
5.6.2.logo更換
[root@localhost webapps]# cd /ROOT/text/img/
*確保在黑色和白色背景下顯示正常*
*尺寸要求“60*60”“140*90”
login-third-party.png
logo.png
5.7.使用瀏覽器驗(yàn)證
Web界面登錄
URL http://192.168.*.*:8080
Web服務(wù)界面
URL http://192.168.*.*:8080/wda
5.8.管理用戶
username:sysadmin
password:********
總結(jié)
以上是生活随笔為你收集整理的06.Linux系统WCP知识共享平台安装部署(旗舰版)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 腾讯视频热播剧《星汉灿烂》上微博热搜:豆
- 下一篇: Android 画指南针