xwiki | LinuxHostSupport Linux Tutorials and Guides Mon, 20 Nov 2023 16:28:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install XWiki on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/#respond Sat, 30 Dec 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1993 XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9. XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, […]

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9.

XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, API programming, and many more. XWiki stores the data into the MySQL database server, and alongside Tomcat we will install the MariaDB database server.

Installing XWiki with all of its requirements will take up to 20 minutes. Let’s get started!

Prerequisites

  • A server running AlmaLinux 9
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation of XWiki, we need to update the system packages to their latest versions available:

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

To install Java, execute the following command:

dnf install java

Once Java is installed, you can check the version with the command below:

java --version

You should get the following output:

[root@host ~]# java --version
openjdk 11.0.21 2023-10-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS, mixed mode, sharing)

Step 3. Install Tomcat

To install Tomcat, execute the following commands one by one:

groupadd tomcat

useradd -g tomcat -d /opt/tomcat tomcat

su - tomcat

wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.96/bin/apache-tomcat-8.5.96.tar.gz -O tomcat8.tar.gz

tar -xzvf tomcat8.tar.gz --strip-components=1

exit

Next, we need to create a service file for Tomcat:

touch /etc/systemd/system/tomcat8.service

Once the file is created, open it with your preferred text editor and paste the following lines of code:

[Unit]
Description=Tomcat 8
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=192m -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target

Save the file and close it. Once done, reload the SystemD daemon. start the service, and configure it to start on boot:

systemctl daemon-reload

systemctl start tomcat8

systemctl enable tomcat8

To check the status of the Tomcat service, execute the following command:

systemctl status tomcat8

You should get the following output:

[root@host ~]# systemctl status tomcat8
● tomcat8.service
     Loaded: loaded (/etc/systemd/system/tomcat8.service; disabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:25:10 CST; 2min 21s ago
    Process: 7503 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 7510 (java)
      Tasks: 28 (limit: 23116)
     Memory: 155.7M
        CPU: 8.996s
     CGroup: /system.slice/tomcat8.service
             └─7510 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager>

Nov 19 14:25:10 host.test.vps systemd[1]: Starting tomcat8.service...
Nov 19 14:25:10 host.test.vps startup.sh[7503]: Tomcat started.
Nov 19 14:25:10 host.test.vps systemd[1]: Started tomcat8.service.

Step 4. Install MariaDB database server

To install the MariaDB database server, execute the following command:

dnf install mariadb-server -y

After installation, start and enable the service:

sudo systemctl start mariadb && sudo systemctl enable mariadb

To check the status of the service execute the following command:

sudo systemctl status mariadb

You should get the following output:

[root@host ~]# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.5 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:33:59 CST; 49s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 8446 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 23116)
     Memory: 75.5M
        CPU: 670ms
     CGroup: /system.slice/mariadb.service
             └─8446 /usr/libexec/mariadbd --basedir=/usr

Step 5. Create a MariaDB database and User

Now, we need to create a database and user for our XWiki installation. To do that, login to the MariaDB console with the mysql command and execute the following queries:

MariaDB [(none)]> CREATE DATABASE xwiki default character set utf8mb4 collate utf8mb4_bin;
MariaDB [(none)]> CREATE USER 'xwiki'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
MariaDB [(none)]> GRANT all privileges on *.* to xwiki@localhost;
MariaDB [(none)]> EXIT;

Make sure to replace YourStrongPasswordHere with a unique, strong password. Remember it, because we’ll need it later.

Step 6. Download XWiki

Finally, we are at the most important step of the installation. We need to download the XWiki installation, place it into the Tomcat webapps folder, and configure the MariaDB database Java connector.

cd /opt/tomcat/webapps

wget https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/15.8/xwiki-platform-distribution-war-15.8.war -O xwiki.war

Next we need to download the MariaDB Java connector and move it into the lib folder of our XWiki application:

wget https://dlm.mariadb.com/3478935/Connectors/java/connector-java-3.3.0/mariadb-java-client-3.3.0.jar

mv mariadb-java-client-3.3.0.jar /opt/tomcat/webapps/xwiki/WEB-INF/lib/

To configure MariaDB, to be the main database server for XWiki, open the following file:

nano /opt/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml

Comment the HSQLDB configuration and uncomment the section for MariaDB configuration:

Save the file and close it.

Now, you can access your XWiki installation at http://YourServerIPAddress:8080/xwiki

Step 7. Finish XWiki Installation

On the first screen, click on the Continue button

In this step, set the administrator username, a strong password and email.

On the third screen, click on the Continue button:

Next choose the wiki to be empty and hit on the Continue button:

On the last window click on the Continue button as well:

Congratulations! You successfully installed XWiki on AlmaLinux 9 with the MariaDB java connector:

Of course, you don’t have to spend your time installing XWiki on AlmaLinux 9 if you have a managed Linux server support plan with us. If you do, you can simply ask our support team to install XWiki on AlmaLinux 9 for you. They are available 24/7 and will be able to help you with the installation of XWiki as well as any additional requirements that you may have.

PS. If you liked this post, please share it with your friends on social networks, or simply leave a reply below if this guide worked for you. Thanks.

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/feed/ 0
How to Install XWiki on CentOS 7 https://linuxhostsupport.com/blog/how-to-install-xwiki-on-centos-7/ https://linuxhostsupport.com/blog/how-to-install-xwiki-on-centos-7/#respond Thu, 24 Dec 2020 10:22:02 +0000 https://linuxhostsupport.com/blog/?p=1322 In this tutorial, we are going to show you how to XWiki on CentOS 7. XWiki is a free and open-source advanced wiki software platform written in Java. It runs on servlet containers like JBoss, Tomcat, etc. which uses a database such as MySQL or PostgreSQL to store its information. We will use a VPS […]

The post How to Install XWiki on CentOS 7 appeared first on LinuxHostSupport.

]]>
instaling xwiki on centos 7In this tutorial, we are going to show you how to XWiki on CentOS 7. XWiki is a free and open-source advanced wiki software platform written in Java. It runs on servlet containers like JBoss, Tomcat, etc. which uses a database such as MySQL or PostgreSQL to store its information.

We will use a VPS with CentOS 7 but you should be able to install XWiki following this tutorial on all Red hat based Linux distributions. Installing XWiki on CentOS 7 is a fairly easy task and it shouldn’t take more than 20 minutes to finish it.

XWiki comes with tons of useful features such as the following:

  • BLog
  • Page editing
  • Content organization
  • Forums
  • Create your own applications
  • File Manager
  • Tasks
  • Different translations of the documents
  • Meetings
  • Version control
  • Content imports
    and much more…

Log in to your CentOS 7 server

Log in to your VPS via SSH as a sudo user:

ssh userame@IP_Address

Once you are logged in, issue the following commands to make sure all installed packages are up to date:

sudo yum update

Install Java

XWiki is a Java-based application so the first step is to install Java on your server. Use the following command to install OpenJDK 8 JRE using yum:

sudo yum install java-1.8.0-openjdk

Verify the installation by running:

java -version

The command above should print something like the following:

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

2. Download Tomcat 8

XWiki works with any Servlet Container such as Tomcat, GlassFish, JBoss, and Jetty. In this guide, we will use Tomcat.

Create a system user that will run the Tomcat service:

sudo groupadd tomcat
sudo useradd  -g tomcat -d /opt/tomcat tomcat

Before downloading Tomcat source files change to the tomcat user:

su - tomcat

Download the latest stable version of Apache Tomcat 8 from the official tomcat downloads page:

wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.zip

When the download is completed unzip the archive by running the following command:

unzip apache-tomcat-8.0.53.zip

Move the apache-tomcat-8.0.53 directory to tomcat:

mv apache-tomcat-8.0.53 tomcat

Set the correct permissions to the startup scripts:

chmod +x tomcat/bin/*.sh

Once completed switch back to the sudo user:

exit

Create SystemD unit file

To create a SystemD unit file for Apache Tomcat 8 open your text editor and create the following file:

sudo nano /etc/systemd/system/tomcat.service

Copy and paste the following code:

[Unit]
Description=Apache Tomcat 8 Service
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat/tomcat
Environment=CATALINA_BASE=/opt/tomcat/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=192m -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target

Save and close the file.

Rn the following commands to reload units and to start the Apache Tomcat service:

sudo systemctl daemon-reload
sudo systemctl start tomcat

Enable the Apache Tomcat service to start on boot:

sudo systemctl enable tomcat

Create MySQL database

XWiki works with a lot of relational databases such as MySQL, PostgreSQL, Oracle, and Derby. In this guide, we will use MySQL.

If you don’t have MySQL or MariaDB installed on your server install it with the following command:

sudo yum install mariadb-server

Once installed set the storage engine to InnoDB. Open the MariaDB configuration file with”

sudo nano /etc/my.cnf.d/server.cnf

and add default-storage-engine = innodb in the [mysqld] section:

[mysqld]
default-storage-engine = innodb

Start and enable the MariaDB service:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Login to the MySQL server with:

mysql -u root

Create a new database and user for XWiki:

create database xwiki default character set utf8 collate utf8_bin;
grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki_password';

Download and Configure XWiki

Switch to the tomcat user:

su - tomcat

Download the latest stable version of XWiki from its official downloads page:

wget http://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/10.8/xwiki-platform-distribution-war-10.8.war

Once the download is completed, move the war file to the Tomcat webapps directory as XWiki.war

 mv xwiki-platform-distribution-war-10.8.war tomcat/webapps/xwiki.war

Switch back to the sudo user and restart the Tomcat service:

sudo systemctl restart tomcat

After the Tomcat service is restarted move to the XWiki’s WEB-INF/lib directory and download the MySQL JDBC Driver JAR:

su - tomcat
cd /opt/tomcat/tomcat/webapps/xwiki/WEB-INF/lib/
wget http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.9/mysql-connector-java-5.1.9.jar

Open the WEB-INF/hibernate.cfg.xml file and configure XWiki to use MySQL:

nano /opt/tomcat/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml

Comment out the default hsqldb database section and uncomment and edit the MySQL database section as shown below:

<!-- Configuration for the default database.
Comment out this section and uncomment other sections below if you want to use another database.
Note that the database tables will be created automatically if they don't already exist.

If you want the main wiki database to be different than "xwiki" (or the default schema for schema based engines)
you will also have to set the property xwiki.db in xwiki.cfg file
-->
<!--
<property name="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>

<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>

<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
-->
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
Notes:
- if you want the main wiki database to be different than "xwiki"
you will also have to set the property xwiki.db in xwiki.cfg file
-->

<property name="connection.url">jdbc:mysql://localhost/xwiki?useSSL=false</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki_password</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="dbcp.poolPreparedStatements">true</property>
<property name="dbcp.maxOpenPreparedStatements">20</property>

<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>

<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>

Switch back to the sudo user and restart the Tomcat service:
sudo systemctl restart tomcat

Access XWiki

XWiki runs on port 8080. To access your XWiki installation open your web browser and type: http://yourdomain_or_ip_address:8080/xwiki

You will be asked to create a new admin user for your XWiki and select a flavor. After the browser installation is completed, you can log in as your admin user and access your XWiki admin page.

For more information about XWiki, you can visit their official website.

 

install xwiki on centos 7If you use one of our Managed Server Support services,  you can simply ask our expert Linux admins to install XWiki on CentOS 7 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install XWiki on CentOS 7,  please share it with your friends on the social networks using the buttons below or simply leave a comment in the Comments Section below. Thanks.

The post How to Install XWiki on CentOS 7 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-centos-7/feed/ 0
How to Install XWiki on Debian 9 https://linuxhostsupport.com/blog/how-to-install-xwiki-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-xwiki-on-debian-9/#comments Wed, 03 Oct 2018 09:19:44 +0000 https://linuxhostsupport.com/blog/?p=690 XWiki is a free and open source, Java-based advanced wiki software platform. It runs on servlet containers like JBoss, Tomcat, Jetty etc. It also uses a database such as MySQL or PostgreSQL to store its information. There are several methods of installing XWiki. In this tutorial, we are going to show you how to install […]

The post How to Install XWiki on Debian 9 appeared first on LinuxHostSupport.

]]>
XWiki is a free and open source, Java-based advanced wiki software platform. It runs on servlet containers like JBoss, Tomcat, Jetty etc. It also uses a database such as MySQL or PostgreSQL to store its information. There are several methods of installing XWiki. In this tutorial, we are going to show you how to install XWiki using Debian (.DEB) packages, which is the recommended installation method for a production XWiki setup because all components needed by XWiki for a production instance will be automatically installed on your server. We will use a Debian 9 VPS but you should be able to install XWiki following this tutorial on all Debian based Linux distributions. By following this tutorial, you should have XWiki installed and running in no more than 10 minutes.

1. Connect to your server

To connect to your server via SSH as user root, use the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.

Once logged in, make sure that your server is up-to-date by running the following commands:

apt-get update
apt-get upgrade

2. Add the XWiki repository

Before we begin the installation, you will need to add the official XWiki repository. You can do this by executing the following commands:

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

Next, update the list of available packages with:

apt-get update

3. XWiki Installation

To list the available packages offered by this repository, run the following command:

apt-cache search xwiki

You will get the following output on your screen:

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

You can choose which package you would like to install depending on your needs. In this tutorial, we will install XWiki with Tomcat 8 and MySQL as a database server.

To install this package, you need to run the following command:

apt-get install xwiki-tomcat8-mysql

This will install XWiki, Tomcat 8, MySQL and all the required dependencies on your server. During the installation, you will also be prompted to enter a password for the MySQL ‘xwiki’ user. Once the installation is completed the Tomcat server will be automatically started.

4. Access XWiki

XWiki runs on port 8080. To access your XWiki installation you will need to type the following URL in your web browser: http://your-ip-address:8080/xwiki

You will be asked to create a new admin user for your XWiki and select a flavor. After the browser installation is completed, you can log in as your admin user and access your XWiki admin page:

Installing XWiki on Debian 9

Congratulations! XWiki has been successfully installed on your Debian 9 Server. For more information, make sure you to check the XWiki official documentation.


If you are using one of our premium server management services, you can simply ask our system admins to install XWiki on Debian 9 for you. They are available 24/7 and will take care of your request immediately.  If you liked this post on how to install XWiki on Debian 9, please share it with your friends on social media networks. If you have any question regarding XWiki and its installation on Debian 9, please write a comment below and we will reply asap.

Install XWiki on Debian 9

The post How to Install XWiki on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-debian-9/feed/ 1