日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > windows >内容正文

windows

CentOS 7从零部署WCP免费开源知识管理系统(未完结,部署wcp配置修改没完成,有大佬救我一波嘛???)

發(fā)布時(shí)間:2023/12/9 windows 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CentOS 7从零部署WCP免费开源知识管理系统(未完结,部署wcp配置修改没完成,有大佬救我一波嘛???) 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

CentOS 7從零部署WCP免費(fèi)開(kāi)源知識(shí)管理系統(tǒng)

  • 一、環(huán)境配置
    • 1.部署Apache
    • 2.部署Tomcat
    • 3.部署mariadb數(shù)據(jù)庫(kù)
    • 4.部署openoffice
    • 5.相關(guān)截圖
    • 6.入雷排雷方案
  • 二、部署WCP
    • 1.從官網(wǎng)獲取WCP-免費(fèi)版-v4.3.0
    • 2.配置參數(shù)調(diào)整
      • (1) 配置wcp4數(shù)據(jù)庫(kù)
        • ① 創(chuàng)建wcp數(shù)據(jù)庫(kù)
        • ② 修改wcp和wda
  • 三、參考

一、環(huán)境配置

1.部署Apache

鏈接:服務(wù)器最小化安裝CentOS 7.8后,安裝不了httpd、使用不了ifconfig甚至ping不通百度”的解決方案

2.部署Tomcat

#安裝java的jdk環(huán)境 yum install java java -version #安裝wget,并通過(guò)wget獲取網(wǎng)絡(luò)資源 yum install wget -y wget https://mirrors.bfsu.edu.cn/apache/tomcat/tomcat-8/v8.5.64/bin/apache-tomcat-8.5.64.tar.gz #移動(dòng)安裝包到/usr/local目錄下并解壓縮,刪除原安裝包,重命名目錄 mv apache-tomcat-8.5.64.tar.gz /usr/local cd /usr/local tar zxvf apache-tomcat-8.5.64.tar.gz rm -rf apache-tomcat-8.5.64.tar.gz mv apache-tomcat-8.5.64/ apache-tomcat8 #設(shè)置tomcat環(huán)境變量 ##在/etc/profile文件末尾追加CATALINA_HOME配置 echo export CATALINA_HOME=/usr/local/apache-tomcat8/ >>/etc/profile ##重新加載環(huán)境變量 source /etc/profile #設(shè)置自動(dòng)啟動(dòng) ##添加自動(dòng)啟動(dòng) cp apache-tomcat8/bin/catalina.sh /etc/init.d/tomcat vi /etc/init.d/tomcat ####################################################### 從第二行開(kāi)始添加,如果第一行沒(méi)有#!/bin/bash,則還需先加上去 CATALINA_HOME=/usr/local/apache-tomcat8/ #chkconfig:2345 10 90 #description:Tomcat Service ####################################################### ##設(shè)置自動(dòng)啟動(dòng) chkconfig tomcat on service tomcat start #查看Tomcat進(jìn)程 ps -ef|grep tomcat #配置防火墻firewalld,將8080端口加入白名單 firewall-cmd --permanent --zone=public --add-port=8080/tcp --permanent firewall-cmd --reload firewall-cmd --list-port #測(cè)試tomcat服務(wù)運(yùn)行 curl http://127.0.0.1:8080

3.部署mariadb數(shù)據(jù)庫(kù)

yum install mysql-devel mysql -y yum install mariadb mariadb-server -y #設(shè)置開(kāi)啟自啟 chkconfig mariadb on #使用systemctl enable mariadb.service也可 vi /etc/my.cnf ############################################################## [mysqld] ##開(kāi)啟表名大小寫(xiě)不敏感,it‘s important! lower_case_table_names #default-character-set=utf8 #default-collation=utf8_general_ci [client] #default-chharacter-set=utf8 ############################################################## ##使用“status”參數(shù)查看mariadb服務(wù)是否啟動(dòng),若沒(méi)有使用“start”參數(shù)啟動(dòng) service mariadb status service mariadb start

4.部署openoffice

參考鏈接1:openoffice 安裝與報(bào)錯(cuò)解決
參考鏈接2:openoffice安裝及使用
上面的參考鏈接是WCP官網(wǎng)上找到的參考鏈接和我自己實(shí)際使用參考的鏈接,但是我在實(shí)際部署中發(fā)現(xiàn)其中某些資源已經(jīng)失效了,所以為了突出內(nèi)容的重要性,就沒(méi)有放到第5小節(jié)“入雷排雷方案”中,仍然放在本節(jié)內(nèi)容當(dāng)中。
官網(wǎng)鏈接:http://www.openoffice.org/zh-cn/download/

我是直接在官網(wǎng)上下載,每次下載到超過(guò)一半后之后就突然完成下載,但是原來(lái)150M的文件變成只有266K大小,然后傳到centos系統(tǒng),使用tar -zxvf還解壓不了且會(huì)報(bào)錯(cuò),之后使用file查看屬性,發(fā)現(xiàn)它其實(shí)是一個(gè)html文件。

[root@localhost local]# tar -xvf Apache_OpenOffice_4.1.9_Linux_x86-64_install-rpm_zh-CN.tar.gz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

網(wǎng)上提供辦法大體上有三種:①將命令tar的-zxvf改成-xvf;②將后綴.tar.gz重命名為.tar,再使用tar -zxvf解壓縮;③這個(gè)壓縮包實(shí)際是一個(gè)html,然后在這個(gè)頁(yè)面上有真正的下載鏈接,想辦法提取到真正的下載鏈接;④白嫖大佬們已經(jīng)弄好的包,共享資源;⑤掛個(gè)VPN,可能內(nèi)容是被墻了
前兩種方法我試過(guò)了,失敗了,第③種方法我個(gè)人覺(jué)得思路是正確的,但是怎么提取到這個(gè)鏈接呢?這是一個(gè)不僅關(guān)鍵而且致命的問(wèn)題。后來(lái)在QQ群里到處問(wèn),一位大佬叫我去搭個(gè)梯子試試,我一掛梯子,果然速度剛剛的,很快就下成功了。果然學(xué)啥還是要找個(gè)大佬帶著,背靠大樹(shù)好乘涼。所以現(xiàn)在臨時(shí)補(bǔ)充了第⑤點(diǎn)的內(nèi)容。
下圖是我之前用wget獲取資源的結(jié)果,已經(jīng)3個(gè)小時(shí)才只下了這么點(diǎn)。

后面的步驟照著前面的參考鏈接做就可以了。

#運(yùn)行 cd /opt/openoffice4/program #(安裝路徑) nohup soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard & #設(shè)置自啟動(dòng) vi /etc/rc.local ######################################################################################## soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard & ########################################################################################

5.相關(guān)截圖

安裝的Java版本信息:x64,1.8.0_282

通過(guò)wget的獲取的文件將會(huì)下載到當(dāng)前目錄中,要是找不到網(wǎng)絡(luò)鏈接的內(nèi)容的話,可以通過(guò)windows環(huán)境下的迅雷“復(fù)制鏈接”子功能間接獲取。
如果不想要使用wget的話,也可以通過(guò)xftp工具或ssh、ftp、scp等命令,直接上傳到CentOS 7的服務(wù)器當(dāng)中。

給/etc/profile追加配置信息,設(shè)置開(kāi)機(jī)自啟:

如果不放心使用echo追加配置,可以使用cat /etc/profile查看確認(rèn)一下
值得注意的是CATALINA_HOME=/usr/local/apache-tomcat8這個(gè)后面的目錄一定是bin,也就是說(shuō)apache-tomcat8是bin的父目錄

使用ps -ef|grep tomcat查看tomcat進(jìn)程:

使用curl測(cè)試http://127.0.0.1:8080,結(jié)果顯示正常的html代碼,說(shuō)明it’s ok的。

6.入雷排雷方案

前面在CentOS 7里面可以直接通過(guò)yum安裝mysql-devel和mysql包,而找不到mysql-server包。看了一位大佬的blog,上面說(shuō)說(shuō):centOS7的源中暫時(shí)沒(méi)有mysql-server,但是相同版本的centOS在阿里云中可以直接使用yum install mysql-server來(lái)直接安裝mysql,所以在這里先要找mysql的源包,然后安裝它就可以了,前提是你已經(jīng)確定你就是要完全使用mysql服務(wù)。

wget http://wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-server -y

查看mysqld服務(wù)是否啟動(dòng),未啟動(dòng)則將其啟動(dòng):

service mysqld status service mysqld start


發(fā)現(xiàn)mysql-server沒(méi)有啟動(dòng)成功,超時(shí)了:

照著上面的命令輸完之后確實(shí)可以安裝mysql-server,但是我沒(méi)有能夠啟動(dòng)mysql服務(wù),原因是啥,我個(gè)人水平有限也沒(méi)有完全弄懂。可能是因?yàn)閙ysql被Oracle公司收購(gòu)后有閉源的潛在風(fēng)險(xiǎn),社區(qū)采用分支的方式來(lái)避開(kāi)這個(gè)風(fēng)險(xiǎn)。所以即使通過(guò)更新源安裝上了mysql-server,centos7還是很嫌棄mysql,通過(guò)cat /var/log/mysql.log查看它的日志,上面也全是各種shutdown。
因此,技術(shù)水平有限,所以我決定還是替換回mariadb,mariadb是為了完全兼容mysql應(yīng)運(yùn)而生的產(chǎn)物。其目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。在存儲(chǔ)引擎方面,10.0.9版起使用XtraDB(名稱代號(hào)為Aria)來(lái)代替MySQL的InnoDB。

yum install mariadb-server mariadb -y

可能是mysql-libs與mariadb沖突了,然后就出現(xiàn)了如下情況:

看有位博主使用的是:yum remove mysql-libs -y,然后就可以安裝mariadb可以安裝的包,事情并沒(méi)有想象中的那么簡(jiǎn)單,之后執(zhí)行命令出現(xiàn)新的麻煩:

之后再想嘗試安裝yum install mysql-server -y,連mysql-server也找不到了,就挺突然的。
解決方案:

rpm -qa|grep -i mysql rpm -ev 上條命令得到的軟件包名 yum install mariadb-server mariadb-devel mariadb -y

內(nèi)容如下:

使用service mariadb status和service mariadb start查看啟動(dòng)mariadb發(fā)現(xiàn)失敗,使用systemctl status -l mariadb.service和grep 'ERROR' /var/log/mariadb/mariadb.log查看具體細(xì)節(jié),得到如下反饋:

[root@localhost ~]# systemctl status mariadb.service -l ● mariadb.service - MariaDB database serverLoaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)Active: failed (Result: exit-code) since 三 2021-04-07 09:57:51 CST; 2min 29s agoProcess: 3886 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)Process: 3885 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)Process: 3851 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)Main PID: 3885 (code=exited, status=0/SUCCESS)4月 07 09:57:50 localhost.localdomain systemd[1]: Starting MariaDB database server... 4月 07 09:57:50 localhost.localdomain mariadb-prepare-db-dir[3851]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done. 4月 07 09:57:50 localhost.localdomain mariadb-prepare-db-dir[3851]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir. 4月 07 09:57:51 localhost.localdomain mysqld_safe[3885]: 210407 09:57:51 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. 4月 07 09:57:51 localhost.localdomain mysqld_safe[3885]: 210407 09:57:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 4月 07 09:57:51 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1 4月 07 09:57:51 localhost.localdomain systemd[1]: Failed to start MariaDB database server. 4月 07 09:57:51 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. 4月 07 09:57:51 localhost.localdomain systemd[1]: mariadb.service failed. [root@localhost ~]# grep 'ERROR' /var/log/mariadb/mariadb.log 210407 9:57:51 [ERROR] Plugin 'InnoDB' init function returned error. 210407 9:57:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 210407 9:57:51 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 210407 9:57:51 [ERROR] /usr/libexec/mysqld: unknown variable 'default-character-set=utf8' 210407 9:57:51 [ERROR] Aborting

因?yàn)閷?shí)在搞不定,只能把mysql和mariadb全都remove掉,然后重新安裝mariadb,然后還是啟動(dòng)不了,這一回終于看到了關(guān)鍵的內(nèi)容,紅色標(biāo)記內(nèi)容要求在啟動(dòng)服務(wù)之前確保/var/lib/mysql是為空目錄。

使用cd /var/lib/mysql切換目錄,再使用rm -rf *清空mysql目錄,再嘗試使用啟動(dòng)服務(wù),這一回終于ok,真的是心累啊,這個(gè)mariadb花了3個(gè)小時(shí)的時(shí)間才可以把服務(wù)起起來(lái)。

[root@localhost local]# service mariadb status Redirecting to /bin/systemctl status mariadb.service ● mariadb.service - MariaDB database serverLoaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)Active: active (running) since 三 2021-04-07 10:52:08 CST; 4min 33s agoMain PID: 6965 (mysqld_safe)CGroup: /system.slice/mariadb.service├─6965 /bin/sh /usr/bin/mysqld_safe --basedir=/usr└─7180 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-fil...4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: '/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password' 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: Alternatively you can run: 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: '/usr/bin/mysql_secure_installation' 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: which will also give you the option of removing the test 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: databases and anonymous user created by default. This is 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: strongly recommended for production servers. 4月 07 10:52:05 localhost.localdomain mariadb-prepare-db-dir[6879]: See the MariaDB Knowledgebase at http://mariadb.com/kb or the 4月 07 10:52:05 localhost.localdomain mysqld_safe[6965]: 210407 10:52:05 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. 4月 07 10:52:05 localhost.localdomain mysqld_safe[6965]: 210407 10:52:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 4月 07 10:52:08 localhost.localdomain systemd[1]: Started MariaDB database server. [root@localhost local]#

二、部署WCP

1.從官網(wǎng)獲取WCP-免費(fèi)版-v4.3.0

官網(wǎng)下載鏈接:WCP-免費(fèi)版-v4.3.0

2.配置參數(shù)調(diào)整

(1) 配置wcp4數(shù)據(jù)庫(kù)

wcp的數(shù)據(jù)庫(kù)配置文件地址為,部署路徑:\webapps\ROOT\WEB-INF\classes\jdbc.properties
數(shù)據(jù)庫(kù)sql腳本地址:WCP.free.4.3.0.base.Setup\sql\wcp.free.v4.3.0.all.sql中

① 創(chuàng)建wcp數(shù)據(jù)庫(kù)

mysql -u root> create database wcp4 character set utf8; > grant all privileges on wcp4.* to uwcp4@localhost identified by 'wcp123456';

② 修改wcp和wda

cd /usr/local/apache-tomcat8/webapps/wcp/WEB-INF/classes vi jdbc.properties ## jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc\:mysql\://127.0.0.1\:3306/wcp?useUnicode=true&characterEncoding=utf-8 jdbc.username=uwcp4 jdbc.password=wcp123456 ##

三、參考

[1].鏈接1
[2].鏈接2
[3].鏈接3
[4].鏈接4
[5].鏈接5

總結(jié)

以上是生活随笔為你收集整理的CentOS 7从零部署WCP免费开源知识管理系统(未完结,部署wcp配置修改没完成,有大佬救我一波嘛???)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。