如何在 Ubuntu 16.04 上安装 XWiki

在本教程中,我们将向您展示如何在您的 Ubuntu 16.04 服务器上安装和配置 XWiki。 对于那些不知道的人,XWiki 是一个用 Java 编写的开源企业就绪 wiki,运行在 Tomcat、Jboss 等使用关系数据库存储信息的 servlet 容器上。

本文假设您至少具备 Linux 的基本知识,知道如何使用 shell,最重要的是,您将网站托管在自己的 VPS 上。 安装非常简单,假设您在 root 帐户下运行,如果不是,您可能需要添加 ‘sudo‘ 到命令以获取 root 权限。 我将向您展示在 Ubuntu 16.04 (Xenial Xerus) 服务器上逐步安装 XWiki。

先决条件

  • 运行以下操作系统之一的服务器:Ubuntu 16.04 (Xenial Xerus)。
  • 建议您使用全新的操作系统安装来防止任何潜在问题。
  • 对服务器的 SSH 访问(或者如果您在桌面上,则只需打开终端)。
  • 一种 non-root sudo user或访问 root user. 我们建议充当 non-root sudo user,但是,如果您在充当 root 时不小心,可能会损害您的系统。

在 Ubuntu 16.04 上安装 XWiki

步骤 1. 首先,通过运行以下命令确保所有系统包都是最新的 apt-get 终端中的命令。

sudo apt-get update sudo apt-get upgrade

步骤 2. 安装 XWiki。

在终端中运行以下命令,通过 XWiki 存储库在 Ubuntu 上安装 XWiki:

wget -q "https://maven.xwiki.org/public.gpg" -O- | sudo apt-key add - wget "https://maven.xwiki.org/stable/xwiki-stable.list" -P /etc/apt/sources.list.d/

要使用以下命令检查此存储库中的所有可用包:

apt-cache search xwiki

结果:

xwiki-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-mysql-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-pgsql-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat-mysql - XWiki enterprise Tomcat/MySQL based package xwiki-enterprise-tomcat-pgsql - XWiki enterprise Tomcat/PostgreSQL xwiki-enterprise-tomcat5-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat5-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat6-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat6-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat7-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat7-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat7-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat8-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat8-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-enterprise-tomcat8-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-mysql-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-pgsql-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-solr-data - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat7-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat7-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat7-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat8-common - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat8-mysql - XWiki is a free wiki software platform written in Java with a design emphasis xwiki-tomcat8-pgsql - XWiki is a free wiki software platform written in Java with a design emphasis

您可以在列表中看到 repo 包含可以使用不同版本的 Tomcat、MySQL 和 PostgreSQL 安装 XWiki 的软件包。 我们将使用 Tomcat 8 和 PostgreSQL 数据库服务器安装 XWiki Enterprise,但根据您的需要,您可以选择其他软件包。 运行以下命令:

apt-get install xwiki-enterprise-tomcat8-pgsql

由于必须安装所有依赖项,因此安装可能需要一些时间。 在安装过程中,系统会提示您输入 PostgreSQL ‘xwiki’ 用户的密码。

步骤 3. 访问 XWiki。

默认情况下,XWiki 将在 HTTP 端口 8080 上可用。 打开您喜欢的浏览器并导航到 https://your-domain.com:8080/xwiki 或者 https://server-ip:8080/xwiki 并完成所需的步骤以完成安装。 如果您使用防火墙,请打开端口 80 以启用对控制面板的访问。

恭喜! 您已成功安装 XWiki。 感谢您使用本教程在 Ubuntu 16.04 (Xenial Xerus) 系统中安装 XWiki。 如需更多帮助或有用信息,我们建议您查看 XWiki 官方网站.

Save