InstallationViaAPT

Version 4.1 by Guillaume Fenollar on 2012/01/19

Since XWiki 3.3, it's possible to download and install automatically XWiki and every component needed for a production instance in a one shot, with the help of our new .deb packages, into our repository.

This method must work on every debian-based linux distribution. Feel free to use the Mailing List to report an issue, or discuss about it.

First Step : APT Configuration

First, you have to configure your package manager in order to use xwiki's repository. This can done simply, using this command:

sudo echo "deb http://maven.xwiki.org/ stable/" >> /etc/apt/sources.list

Now you can update the packages database to read the data from this repository.
sudo apt-get update

I'll assume you're using APT tools. You can use Aptitude as well.

Now you can make a little search to see what this repo offers.

apt-cache search xwiki

It shows the following packages:

  • xwiki-enterprise-common - XWiki enterprise common package
  • xwiki-enterprise-tomcat-mysql - XWiki enterprise Tomcat/MySQL based package
  • xwiki-enterprise-tomcat-pgsql - XWiki enterprise Tomcat/PostgreSQL

Second Step : Complete Installation

Using MySQL

As you may now, you only have to run this command to install all the interesting components.
apt-get install xwiki-enterprise-tomcat-mysql

This virtual package depends on xwiki-enterprise-common, mysql-server, tomcat6 and libmysql-java.

During the installation, you may have some questions from dbconfig, in charge of the configuration of the database. Don't confuse it with the MySQL root password prompt, which beg you to put a password for the superuser.
DBconfig prompt is about the configuration of xwiki and mysql. If you haven't any mysql already installed and you aren't familiar with it, you should let dbconfig handle this.

DB config is then asking you for the mysql root password (you may have entered before). Then, you can choose the password of "xwiki" mysql user. This user will be used to connect from XWiki application, choose is wisely, but you don't have to pay a lot of attention to it, because after that, dbconfig is configuring automatically XWiki with these credentials.

The installation now ends, with the automatic start of tomcat daemon ("Starting Tomcat servlet engine tomcat6      [OK]").

You can now point your favorite browse to the following URL to use your wiki!
http://localhost:8080/xwiki

 Note that your wiki is absolutely empty, like a WAR installation. You have to go to the administration, and import the default XAR package (link above the upload form). Or you can import a wiki from another instance for example (XAR export/import).

Using PostgreSQL

It's as simple as the MySQL installation, you only need to choose the right virtual package
apt-get install xwiki-enterprise-tomcat-pgsql

PostgreSQL is sightly different than MySQL in the handling of databases and in the manual configuration. But everything should work on the first try.
There is a configuration problem in .deb the 3.1.1 release. Go in your /etc/xwiki/hibernate.cfg.xml, and replace "com.mysql.jdbc.Driver" with "org.postgresql.Driver" in the uncommented part).

Overview of the important files

Here a list of different tree. The point is to help you to find useful files easily. This list is showing a few files and directories, to keep it simple and clear. The '->' is used to show a link to another file/directory.

XWiki

/etc/xwiki/
├── hibernate.cfg.xml
├── xwiki.cfg
├── xwiki.properties

/usr/lib/xwiki/
├── META-INF
├── resources
├── skins
├── templates
└── WEB-INF
    ├── hibernate.cfg.xml -> /etc/xwiki/hibernate.cfg.xml
    ├── xwiki.cfg -> /etc/xwiki/xwiki.cfg
    └── xwiki.properties -> /etc/xwiki/xwiki.properties

Tomcat

/etc/tomcat6/
├── context.xml
├── logging.properties
├── server.xml
├── tomcat-users.xml
└── web.xml

/etc/default/*
└──tomcat6*

/var/lib/tomcat6/
├── common
├── conf -> /etc/tomcat6
├── logs -> ../../log/tomcat6
├── server
├── shared
└── webapps

/var/log/tomcat6/
└── catalina.out

MySQL

/etc/mysql/
├── debian.cnf
└── my.cnf

/var/lib/mysql/
├── mysql
└── xwiki

/var/log/
└── syslog
└── mysql
    └── error.log

PostgreSQL

/etc/postgresql/
└── 8.4
    └── main
        ├── postgresql.conf
        └── pg_hba.conf

/var/lib/postgresql/8.4/main/
└── base

Tags:
   

Get Connected