CentOS上安装运行XWiKi
现在XWiKi已经一行命令支持安装java -jar xwiki-enterprise-installer-generic-9.4-standard.jar
。
war安装我搞了三天都没有搞定,参考了《CentOS 7上安装XWiki 8.2.1 详解》和《开源框架XWIKI搭建介绍》。我直接怀疑XWiKi是否还支持web安装(xwiki一代),写哪些web安装的文章是否亲自安装过。
下面介绍XWiKi二代安装方式,zip安装。
XWiki 要求
Java 8 或更高版本
支持 Servlet 3.0.1 的 Servlet 容器
用于支持数据库的 JDBC 4 驱动程序
至少 2GB RAM(对于较小的 wiki 是 1GB)
你可以从阿里云等云服务商购买一个 VPS,可以使用一键部署的 Java 环境
centos7和红帽系统相似,具体查看《Linux就该这么学》
我们将在本教程中使用 CentOS 7 服务器。
1.安装前准备,安装 CentOS系统,安装yum, 安装nano 和 wget。
安装操作系统不用说了。
安装yum:
[root@localhost gitlab]# yum install -y patch
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.163.com* extras: mirrors.aliyun.com* updates: mirrors.163.com
正在解决依赖关系已安装:patch.x86_64 0:2.7.1-10.el7_5
安装 nano 和 wget:yum install nano wget
。
2.安装 Java。见《CentOS上安装openjdk》
如java都没有安装成功,那么以后都免谈了。
3.下载XWiKi,先查看最新版本
[root@localhost XWiki]# wget http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-generic-9.4-standard.jar
目前最新版本是9.4版本。
拷贝版本的链接,下载安装包。
[root@localhost jre]# cd /usr/local/XWiki
[root@localhost XWiki]# cd ..
[root@localhost local]# ls
apache-tomcat-9.0.13.zip bin etc games git got include lib lib64 libexec sbin share src xwiki XWiki xwiki_tomcat
[root@localhost local]# wget http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-generic-9.4-standard.jar
--2018-12-13 11:45:27-- http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-generic-9.4-standard.jar
正在解析主机 download.forge.ow2.org (download.forge.ow2.org)... 195.154.179.52
正在连接 download.forge.ow2.org (download.forge.ow2.org)|195.154.179.52|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:279542819 (267M) [application/java-archive]
正在保存至: “xwiki-enterprise-installer-generic-9.4-standard.jar”100%[======================================================================================================================================================>] 279,542,819 10.6MB/s 用时 31s2018-12-13 11:46:01 (8.65 MB/s) - 已保存 “xwiki-enterprise-installer-generic-9.4-standard.jar” [279542819/279542819])[root@localhost local]# ls
apache-tomcat-9.0.13.zip bin etc games git got include lib lib64 libexec sbin share src xwiki XWiki xwiki-enterprise-installer-generic-9.4-standard.jar xwiki_tomcat
4.建立xwiki文件夹mkdir xwiki
。
安装XWiKi:
java -jar xwiki-enterprise-installer-generic-9.4-standard.jar
在Select the installation path: [/usr/local/XWiki Enterprise 9.4]
输入你想安装的目录/usr/local/xwiki
并回车。遇到Press 1 to continue, 2 to quit, 3 to redisplay
都选1,回车,遇到Enter Y for Yes, N for No:
输入Y并回车。需要你选择目录时,若不想指定目录,直接回车就可以,如Select the installation script (path must be absolute)[/usr/local/xwiki/auto-install.xml]
。
[root@localhost local]# java -jar xwiki-enterprise-installer-generic-9.4-standard.jar
2018-12-13 11:48:29 信息: Logging initialized at level 'INFO'
2018-12-13 11:48:29 信息: Commandline arguments:
2018-12-13 11:48:30 信息: Detected platform: linux,version=3.10.0-514.el7.x86_64,arch=x64,symbolicName=null,javaVersion=1.8.0_191
Welcome to the installation of XWiki Enterprise 9.4!
The homepage is at: http://xwiki.org/Press 1 to continue, 2 to quit, 3 to redisplay
1
Please read the following information:XWiki Enterprise - ReadmeXWiki Enterprise Overview
XWiki Enterprise is a second generation Wiki engine, features professional features likeWiki, Blog, Comments, User Rights, LDAP Authentication, PDF Export, and a lot more.
XWiki Enterprise also includes an advanced form and scripting engine which makes it an idealdevelopment environment for constructing data-based intranet applications. It has powerfulextensibility features, supports scripting, extensions and is based on a highly modulararchitecture. The scripting engine allows to access a powerful API for accessing the XWikirepository in read and write mode.
XWiki Enterprise is used by major companies around the world and has strongSupport for a professional usage of XWiki.Pointers
Here are some pointers to get you started with XWiki once you have finished installing it:The documentation can be found on the XWiki.org web site
If you notice any issue please file a an issue in our issue tracker
If you wish to talk to XWiki users or developers please use ourMailing lists & Forum
You can also access XWiki'ssource code
If you need commercial support please visit theSupport pagePress 1 to continue, 2 to quit, 3 to redisplay
1
See the NOTICE file distributed with this work for additional information regarding copyright ownership.
This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.Press 1 to accept, 2 to reject, 3 to redisplay
1
Select the installation path: [/usr/local/XWiki Enterprise 9.4]
/usr/local/xwikiPress 1 to continue, 2 to quit, 3 to redisplay
1[x] Pack 'Core' required
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[x] Include optional pack 'Default Wiki'
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
Done!Press 1 to continue, 2 to quit, 3 to redisplay
1
[ Starting to unpack ]
[ Processing package: Core (1/2) ]
[ Processing package: Default Wiki (2/2) ]
[ Unpacking finished ]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Create shortcuts in the Start-Menu
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Create additional shortcuts on the desktop
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
create shortcut for: all users
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
2018-12-13 11:53:30 警告: Shortcut 'Go to my wiki' has URL but type ('Application') is not 'Link'
2018-12-13 11:53:30 警告: Shortcut 'Go to my wiki' has URL but type ('Application') is not 'Link'
2018-12-13 11:53:30 警告: Shortcut 'Documentation' has URL but type ('Application') is not 'Link'
2018-12-13 11:53:30 警告: Shortcut 'Documentation' has URL but type ('Application') is not 'Link'
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Generate an automatic installation script
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
Select the installation script (path must be absolute)[/usr/local/xwiki/auto-install.xml]Installation was successful
application installed on /usr/local/xwiki
[ Writing the uninstaller data ... ]
[ Console installation done ]
4.切换到xwiki目录cd /usr/local/xwiki
。运行XWiKi:bash start_xwiki.sh
或./start_xwiki.sh
。
这种启动方法使用是默认的端口号8080,请用查看8080端口号是否被其它应用占用,我们的服务器的8080端口号就是被占用了,所以启动不起来。这个默认端口8080太火热了,还是换个端口用吧!如何换xwiki默认端口见《修改xwiki启动的默认端口》。
[root@localhost xwiki]# netstat -anp |grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 64199/unicorn worke
tcp 0 0 127.0.0.1:8080 127.0.0.1:42140 TIME_WAIT -
tcp 0 0 127.0.0.1:8080 127.0.0.1:42136 TIME_WAIT -
tcp 0 0 127.0.0.1:8080 127.0.0.1:42138 TIME_WAIT -
tcp 0 0 127.0.0.1:8080 127.0.0.1:42134 TIME_WAIT -
制定端口启动xwiki:bash start_xwiki.sh -p 8180
5.当启动到这一句日志2018-12-13 14:47:32.461:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://localhost:8180/ in your browser to access your wiki.
时,可以在浏览器打开你的xwiki主页地址:http://192.168.1.156:8180/xwiki
,其中192.168.1.156是你服务器主机的ip。若你不打开主页地址它就会停在哪里了2018-12-13 14:47:32.461:INFO:oxtjl.NotifyListener:main: ----------------------------------
。
如打不开请另起一个客户端查看你的防火墙是否开通了8180端口的访问权限irewall-cmd --zone=public --list-ports
。
若没有开通该端口的访问权限请使用firewall-cmd --zone=public --add-port=8180/tcp --permanent
开通它该端口。然后重启防火墙firewall-cmd --reload
。然后再查看防火墙开放的端口。
[root@localhost ~]# firewall-cmd --zone=public --list-ports
8180/tcp 8888/tcp
若你加错端口或感觉开放的端口需要收回权限可以删除防火墙开放的端口firewall-cmd --zone=public --remove-port=8088/tcp --permanent
,然后重启防火墙firewall-cmd --reload
。
启动过程中
XWiKi主页,有向导提示框可以直接擦掉向导提示框。
[root@localhost xwiki]# bash start_xwiki.sh -p 8180
An XWiki lock file exists at /var/tmp/xwiki-8180.lck but no XWiki is executing. Removing lock file...
Starting Jetty on port 8180, please wait...
2018-12-13 14:45:41.534:INFO::main: Logging initialized @624ms
2018-12-13 14:45:41.953:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2018-12-13 14:45:41.983:INFO:oejs.AbstractNCSARequestLog:main: Opened /usr/local/xwiki/data/logs/2018_12_13.request.log
2018-12-13 14:45:41.986:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/usr/local/xwiki/jetty/contexts/] at interval 0
2018-12-13 14:45:42.352:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@47f6473{/,file:/usr/local/xwiki/webapps/root/,AVAILABLE}{/root}
2018-12-13 14:45:43.436:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
2018-12-13 14:47:23,470 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Starting embedded Solr server...
2018-12-13 14:47:23,508 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [data/solr]
2018-12-13 14:47:26,403 [coreLoadExecutor-6-thread-1] WARN o.a.s.c.SolrResourceLoader - Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly.
2018-12-13 14:47:30,364 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Started embedded Solr server.
2018-12-13 14:47:32.423:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@5383967b{/xwiki,file:/usr/local/xwiki/webapps/xwiki/,AVAILABLE}{/xwiki}
2018-12-13 14:47:32.459:INFO:oejs.ServerConnector:main: Started ServerConnector@32f45e15{HTTP/1.1}{0.0.0.0:8180}
2018-12-13 14:47:32.459:INFO:oejs.Server:main: Started @111550ms
2018-12-13 14:47:32.459:INFO:oxtjl.NotifyListener:main: ----------------------------------
2018-12-13 14:47:32.461:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://localhost:8180/ in your browser to access your wiki.
2018-12-13 14:47:32.461:INFO:oxtjl.NotifyListener:main: ----------------------------------
2018-12-13 14:59:19,738 [XWiki initialization] INFO .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled
2018-12-13 14:59:20,065 [XWiki initialization] INFO .HibernateDataMigrationManager - No data migration to apply for wiki [xwiki] currently in version [93000]
2018-12-13 14:59:20,065 [XWiki initialization] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki]
2018-12-13 14:59:28,597 [solr/indexer job group daemon thread - org.xwiki.search.solr.internal.job.IndexerJob@41e8dcdf] INFO o.x.s.s.i.j.IndexerJob - Starting job of type [solr.indexer] with identifier [[solr, indexer]]
2018-12-13 14:59:32,639 [solr/indexer job group daemon thread - org.xwiki.search.solr.internal.job.IndexerJob@41e8dcdf] INFO o.x.s.s.i.j.IndexerJob - 904 documents added, 0 deleted and 0 updated during the synchronization of the Solr index.
2018-12-13 14:59:32,639 [solr/indexer job group daemon thread - org.xwiki.search.solr.internal.job.IndexerJob@41e8dcdf] INFO o.x.s.s.i.j.IndexerJob - Finished job of type [solr.indexer] with identifier [[solr, indexer]]
客户端看到- Finished job of type [solr.indexer] with identifier [[solr, indexer]]
说明XWiKi启动完毕。注意千万别关闭客户端。若关闭客户端或客户端断连那么XWiKi服务器就关了。若想不关闭客户端就关闭XWiKi服务器,只需要按control键和c键就可以关闭XWiKi服务器。
^C2018-12-13 15:20:51.803:INFO:oxtjl.NotifyListener:Thread-1: ----------------------------------
2018-12-13 15:20:51.803:INFO:oxtjl.NotifyListener:Thread-1: Server stopping, please wait while all resources are closed...
2018-12-13 15:20:51.844:INFO:oejs.ServerConnector:Thread-1: Stopped ServerConnector@32f45e15{HTTP/1.1}{0.0.0.0:8180}
2018-12-13 15:21:22.389:INFO:oejsh.ContextHandler:Thread-1: Stopped o.e.j.w.WebAppContext@5383967b{/xwiki,file:/usr/local/xwiki/webapps/xwiki/,UNAVAILABLE}{/xwiki}
2018-12-13 15:21:22.414:INFO:oejsh.ContextHandler:Thread-1: Stopped o.e.j.w.WebAppContext@47f6473{/,file:/usr/local/xwiki/webapps/root/,UNAVAILABLE}{/root}
2018-12-13 15:21:22.417:INFO:oxtjl.NotifyListener:Thread-1: Done!
6.XWiKi的管理员账户的登录。XWiKi的默认管理员账号和密码是Admin/admin。XWiKi还有超级管理员账号和密码,默认是不启动的。
点击右上交的按钮
点击Log-in按钮
输入账号密码登录
管理员账号密码登录后看到侧边栏多了些内容。若你用超级管理员账号登录把管理员账号给宰了,我是建立了半天也没有能建立管理员账号,没办法只有重装了,管理员账号就恢复了,不过以前的数据也没有了。
想XWiKi服务器正常运行就是要在服务器上起一个客户端,运行XWiKi并且不能关闭客户端。阿里云服务器通常有连接超时限制,不知道怎么启这个始终存在的客户端,这是一个问题。若服务器是你公司的一台电脑那就很容易实现了。
XWiKi服务器的设置和使用见文章《xwiki使用指南》。
CentOS上安装运行XWiKi相关推荐
- 如何在Ubuntu/CentOS上安装Linux内核4.0
如何在Ubuntu/CentOS上安装Linux内核4.0 大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为'Hurr durr I'm a sheep'的 ...
- mysql5.7在centos上安装
2019独角兽企业重金招聘Python工程师标准>>> 原文地址:http://blog.csdn.net/you23hai45/article/details/50984328 h ...
- 安装 oracle-xe,CentOS上安装Oracle XE指南
引言: 在CentOS上安装Oracle XE主要用来解决学习和测试的用处,虽然简单,但也是涉及到了诸多的步骤和细节问题. 1. 下载Oracle XE 访问http://www.oracle.co ...
- centos上安装supervisor来管理dotnetcore等应用程序
supervisor 介绍: 这是一款用python编写的进程管理工具,可以守护他管理的所有进程,防止异常退出,以及提供一个可视化的web界面来手动管理,打开关闭重启各种应用,界面如下: 关于在cen ...
- 在Linux系统centos上安装RAR
由于最近弄了个计划,不得不使用RAR,所以要在centos上安装RAR,记录如下: wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz tar ...
- 在CentOS上安装ZooKeeper集群
一共准备3个CentOS虚拟机 172.16.9.194 172.16.9.195 172.16.9.196 上传zookeeper-3.3.6.tar.gz到服务器并解压,3台服务器的目录结构如下 ...
- 在CentOS上安装NodeJS_v14.x
在CentOS上安装NodeJS_v14.x 运行NodeJS_v14.x安装程序脚本 下载并执行脚本. sudo yum -y install curl curl -sL https://rpm.n ...
- 在Red Hat或CentOS上安装 MongoDB-4.x 社区版
在Red Hat或CentOS上安装MongoDB社区版 目录 本文概述 注意事项 安装MongoDB 运行MongoDB 卸载MongoDB 概述 使用本教程,使用软件包管理器在Red Hat En ...
- 如何在Linux,Ubuntu,CentOS上安装Java 14
Java 14 is released on March 2020. In this tutorial, we will learn how to Install Java 14 on Linux. ...
最新文章
- rtsp 分辨率信息_SDP在RTSP、国标GB28181、WebRTC中的实践
- 提高mysql千万级大数据SQL查询优化30条经验
- 我的秋招之路(开篇)
- PHP的ob输出缓冲函数作用
- 送一台自用笔记本电脑!新款
- Redis数据恢复--误删数据后一次吓尿的经历
- 看高手都是运用的灵活自如,打算从今天开始学习他!
- 1.空间中直线交点坐标问题,2.已知球面三点求球心问题以及Matlab实现
- 三菱f800变频器 频率设定_三菱plc和变频器通讯怎么设置频率
- 企业标准化产线建设_机加生产线:标准化管理.ppt
- 如何安装flash的插件?
- 浅谈加密技术在电子商务中的应用
- 一个女大学生骂她男朋友的话,厉害,没一个脏字
- 微信小程序内容接入安全检测接口
- mysql篇:如何进入mysql
- 广州可得 全面亮相第十七届SDS及2022中国国际防伪溯源展
- mootools_在jQuery中实现MooTools的Elements.addEvent
- 漫画:有趣的扔鸡蛋问题
- 计算机配置 优化有哪些,组装电脑主要配置有哪些
- 大整数的乘法(递归方程+复杂度分析)
热门文章
- 爱思服务器shsh文件类型,爱思助手SHSH怎么备份 爱思助手SHSH备份教程
- 在C++中实现foreach循环,比for_each更简洁!
- ROS学习笔记(十三):Using Stamped datatypes with tf::MessageFilter
- 【Java】实现聊天程序(完整版)
- 从入门到精通 网吧免费上网狙击战(转)
- [日本留学]高频面试问题清单
- web实现消息推送及桌面提醒
- 计算机控制原理跟自动控制原理,上海交大考研自动控制理论和自动控制原理有什么区..._在职考研_帮考网...
- 记录一次htonl和ntohl的使用方法和差别
- 树莓派+神经计算棒2部署Openvino的human_pose_estimation_demo实例