Vous êtes sur la page 1sur 10

XWIKI 1.

0(beta) Build and Installation Guide


Build

svn checkout svn://svn.forge.objectweb.org/svnroot/xwiki/xwiki/trunk xwiki (on 1/20/07 revision 1958) make sure you modify the WEB-INF/hibernate.cfg.xml to reflect the database settings

build.bat (mvn package (or ant) , mvn is not fully working yet)

Installation
c.f. http://www.xwiki.org/xwiki/bin/view/AdminGuide/PostGres
1. 2. 3. 4. Install Postgresql 8.1/8.2 Install jdk1.5.0_09 Install tomcat 5.5.16 Copy the following jars to $TOMCAT_HOME/common/lib/ a. Postgresql.jar for 8.1/8.2 version b. Mail.jar (may need) c. Activation.jar (may need) 5. Modify the WEB-INF/hibernate.cfg.xml for Postgres. See
PostgresHibernate

6. 7. 8. 9.

From SQL prompt: create user xwiki From SQL prompt: CREATE DATABASE xwiki OWNER xwiki; Rename xwiki-0-x-yyy.war in the release directory to xwiki.war Copy xwiki.war directory and contents to the $TOMCAT_HOME/webapps directory 10. Connect to the xwiki application at: http://127.0.0.1:8080/xwiki 11. On a local install of XWiki, you should edit xwiki.cfg and add a superadmin password: 12. On a local install of XWiki, you should edit xwiki.cfg and add a superadmin password: xwiki.superadminpassword=mypass Then the user "superadmin" with the password "mypass" will have automatically superadmin access to the wiki (don't forget to restart your server). 13. Go to http://www.xwiki.org/xwiki/bin/view/Main/Download and import the xwiki-1.0-beta-2.xar. This will setup initial pages and initial users such as admin.

Admin User: Admin/admin

Customization
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins Skin customization

Creating a skin
To create a skin, you need to have notions of one or more of:

XHTML CSS (Cascading Style Sheets) Velocity Templates The XWiki API

With a skin, you can change (and therefore break) the layout of everything in XWiki. Usually you just want to change the basic layout of XWiki, and therefore you need to modify:

the main styles file: style.css the header template: header.vm the footer template: footer.vm the main logo

To do this you need to:


Create an empty page Attach any images needed in the skin to this page Select "Edit Objects" in the "More actions" menu Add the objects from the class "XWiki.XWikiSkins" Modify the style.css (overriding standard rules) Modify header.vm and footer.vm content

You will find the original content at:

XWiki 1.0 files and templates are at: http://www.xwiki.com/xwiki/skins/xwiki10b1/

To start, the best is to copy-paste the original content and make a slight modification. If you want to derive your skin from another skin, you should write the name of the skin to derive in the "baseskin" textfield at the bottom of the page.

It is possible to modify the other templates. To do so you need to edit the XWiki.XWikiSkins class (using the Class Editor) and add a TextArea field that has the name of the template (for instance if you want to modify viewheader.vm which takes care of the action bar at the top, you need to create a TextArea field named viewheader.vm) Once you have make some modifications, you can test your skin by adding the "skin=Main.MySkinPage" at the end of the URL. For example if you are creating a skin on mywiki.xwiki.com, you can test the skin on the Home Page at http://mywiki.xwiki.com/xwiki/bin/view/Main/WebHome?skin=Main.MySkinPage Finally, when you are really happy with your skin, you can apply the skin to the whole wiki or to a space by modifying the "skin" field in the XWiki or Web Preferences. You should also modify the default and alternative styles (If you haven't created alternative styles, put 'style.css' in both fields) Version 1.9 last modified by Ludovic Dubost on 07/01/2007 at 00:56
Thanks Antonio that's great! 2 small comments: 1) on the main Skin page it seems you have removed the <server> or <yourserver> text I had put in the different URL. You've probably done that unintentionnally or you've use the WYSIWYG editor and there's a bug... 2) on the CSS Files page, you've used "xWiki" instead of "XWiki" :-) If you don't beat me I'll fix those later tonight. Thanks -Vincent On Mar 22, 2007, at 11:30 AM, Antonio Goncalves wrote: > > > > > > > > > > > > > > > > > Hi, I've added a CSS Files page with the comment that Sergiu sent. I'll be adding more information later on. Antonio 2007/3/15, Antonio Goncalves <antonio.mailing@gmail.com>: I'm not the best "presentation layer" guy (god I've struggled so much with HTML and CSS) but I can do that. I will create a few pages explaining how skining works (Sergiu I might ask you more questions though). I'm leaving tonight for a long week-end at the mountain (still hoping to find some snow) and I'll start the job mid of next week. Antonio

> 2007/3/15, Vincent Massol <vincent@massol.net>: > Guys, > > > What would be real cool would be to gather this information on > xwiki.org :) Antonio, if this is something you can help with that'd > be great as I know Sergiu is busy fixing bugs and implementing > features for 1.0 Beta 6... > > > Thanks > -Vincent > > On Mar 15, 2007, at 1:57 PM, Antonio Goncalves wrote: > >> Thanks Sergiu, that really helps to clarify things. I was using >> Firebug to try to understand which css property was inherited by >> which style and sometimes you can get lost. When you say that in >> the near future the skin will be cleaned up, do you have it >> planed ? Is it going to be for the 1.0 ? >> >> BTW I just have a comment about what you said about the css files. >> I can understand why css styles are splited in different files, >> but wouldn't you want <h1> to have the same style of .heading-1 >> and therefore be in the same file ? Like <h2> for heading-1-1, <b> >> for bold and so on. For my skin I was going to do that because I >> don't want to have the same css code repeated in several files. >> >> Thanks again >> >> Antonio >> >> >> >> 2007/3/14, Sergiu Dumitriu <sergiu.dumitriu@gmail.com>: >> >> >> On 3/14/07, Antonio Goncalves <antonio.mailing@gmail.com > wrote: >> Hi everybody, >> >> I've started using xWiki a few weeks ago and now I want to make it >> look the way I want. So I'm trying to create my own skin. I read >> the Admin guide about it, plus other mails but I have to say it's >> not an easy task. I don't really know where to start because I >> don't understand all the css files. xwiki10b1 has 23 css files but >> I think only 11 are used. Am I right ( style.css; elements.css; >> classes.css; xwiki.css; wiki.css; page.css; rss.css; >> screenlayout.css; microformats.css; presentation.css; >> colorsblack.css;) ? If yes, what are the other ones used for >> (chw.css, colorsblue.css, customcoloes.css , style1.css...) ? Why >> is page.css empty, is it the one to fill ? In other words, which >> css should I change if I want another layout, another font, >> colours.... >> >> >> History: >> 1. At first, the skin was written in a few (~5) css files, where

>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>

all the css properties were put together. (early variants of the 'default' skin) 2. Then came the idea of separating the different components of the skin: basic elements, layout, colors, etc. Some of the files from 1/ were split, part of the css was moved around. This happened along with working for the new skin ('xwiki10'), so old content was reorganized and new content was added. Together with the fact that very little time was available, the whole process ended in the mess you see in the current skin. 2b. At the same time, there was the idea of making a XWiki.Skin class, containing some options for colors, margins, widths, and to generate the skin based on these variables. For example, there should have been a 'padding' property which should have been used for panels, menu, page content... It was working for a while in the 'xwiki10' skin. The skin was supposed to be customized (well, based on the same general layout) using a skin wizard. 3. When work for the current skin ('xwiki10b1') started, even more css rules were created and added. 4. In the (near) future, the skin will be cleaned up, resulting in a clear separation of file purpose, no more deprecated code, and the ability to change easily the skin. 5. In the distant future, xwiki plugins will be able to register new css files, which won't be stored in the skins directory, but either as files in the jar/xar, or as attachments to a page. Core files: - style.css = top level style file. It's purpose is to include all the other files. If there is any other css in there, it shouldn't. - elements.css = intended to provide general design rules regarding the html elements. For example, default font size and family for headings, underline for links, etc. It should not provide color properties. - classes.css = like elements.css, but formats elements having a similar semantic meaning (after all, a class should have a semantic name, and not a random id). As examples, .underline, .hidden, .sep, .wikicreatelink, or .heading-1-1. This should only contain general classes, for specific elements see presentation.css - screenlayout.css = the place where the general layout of the interface is specified. This file should contain rules regarding position, dimension and display mode for the major elements of the interface (header, side panels, menu, footer...) - presentation.css = refinement of screenlayout.css. This is where borders, margins, paddings are set, font styling for objects not in elements.css or classes.css, along with some specific elements of the layout which are not affecting the general layout (where is the profile picture displayed, how is the comment auther displayed, etc.) - colors*.css = the place where the skin gets painted. Without this file, the skin should be black and white only (except the blue links). Font color, background, border color, Special purpose files: - rss.css = a few rules to format how profile rss is displayed - microformats.css = stylesheet to format the different microformats-enabled pages (user profile, blog, calendar...)

>> - chwSkin.css = formatting for the Chart Wizard (soon to be re>> released) >> - tdwSkin.css = formatting of the Table Datasource Wizard (part of >> Chart Wizard) >> - print.css = formatting for the @media print. Currently kind of >> empty and useless, it must be written once the albatross skin is >> ready. >> >> Deprecated (soon to be removed) >> - wiki.css = it was supposed to format wiki generated syntax, >> like .wikilink and .heading-1-1 >> - xwiki.css = it was one of the few files holding css (stage 1) >> - ie.css = some old hacks to make the 'default' skin work in IE too. >> - styel1/2/3.css = variants of the 'default' skin, with green, >> pink and ~yellow colors. >> - temp.css = used for some tests; generally a buffer before >> splitting rules among the other files. >> >> Possibly usable files, if somebody makes the skin wizard. >> - customlayout.css = a dynamic version of screenlayout.css, using >> properties defined in a skin object. Should be parsed by velocity. >> - customcolors.css = same, but for colors. >> >> Hope this helps. >> Sergiu >> >> ->> http://purl.org/net/sergiu >> >> ->> You receive this message as a subscriber of the xwiki>> users@objectweb.org mailing list. >> To unsubscribe: mailto: xwiki-users-unsubscribe@objectweb.org >> For general help: mailto:sympa@objectweb.org?subject=help >> ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/wws >> >> >> >> >> ->> You receive this message as a subscriber of the xwiki>> users@objectweb.org mailing list. >> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org >> For general help: mailto:sympa@objectweb.org?subject=help >> ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/wws > > > > > -> You receive this message as a subscriber of the xwiki> users@objectweb.org mailing list. > To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org > For general help: mailto: sympa@objectweb.org?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/

> > > > > > > > > > > >

wws

-You receive this message as a subscriber of the xwikiusers@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws Download this as a file

1. Authentication via LDAP (http://old.xwiki.org/xwiki/bin/view/Dev/LDAPIntegrationAD) Can use ldapsearch to verify user setting o ldapsearch -h localhost -p 389 -D "cn=Manager,dc=cdcie,dc=jfcom,dc=mil" -w "password" -b "dc=cdcie,dc=jfcom,dc=mil" "uid=exo" o sample result is:
C:\openldap>ldapsearch -h localhost -p 389 -D "cn=Manager,dc=cdcie,dc=jfcom,dc=m il" -w "password" -b "dc=cdcie,dc=jfcom,dc=mil" "uid=exo" # extended LDIF # # LDAPv3 # base <dc=cdcie,dc=jfcom,dc=mil> with scope sub # filter: uid=exo # requesting: ALL # # exo, users, cdcie, cdcie.jfcom.mil dn: cn=exo,ou=users,ou=cdcie,dc=cdcie,dc=jfcom,dc=mil sn: exo objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson mail: exo@localhost givenName: exo uid: exo cn: exo displayName: exo exo description: Account for exo exo userPassword:: e1NTSEF9QmVRODR5WlFIa2dIdFIxUTdnMzVyaitJWWhINldoZTU= # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1

sample xwiki.cfgs LDAP portion (using openldap 2.1.7)

# Enable to allow superadmin. It is disabled by default as this could be a security breach if # it were set and you forgot about it. xwiki.superadminpassword=system

xwiki.authentication.ldap=1 xwiki.authentication.ldap.server=localhost xwiki.authentication.ldap.check_level=1 xwiki.authentication.ldap.port=389 xwiki.authentication.ldap.base_DN=dc=cdcie,dc=jfcom,dc=mil xwiki.authentication.ldap.bind_DN=cn=Manager,dc=cdcie,dc=jfcom, dc=mil xwiki.authentication.ldap.bind_pass=password xwiki.authentication.ldap.UID_attr=uid xwiki.authentication.ldap.fields_mapping=name=uid,last_name=sn,first_name=givenName,fullname=displayName,email=m ail,ldap_dn=dn xwiki.authentication.unauthorized_code=200

2. XWiki upgrade from 0.9.841 to 1.0 beta 3 (build 1670, SVN on 2/6/07) Based on discussions from the mailinglist, the only modification that is needed is a sql update. Backup the whole database from production (0.9.841) into a file Restore the file into the database specified in hibernate.cfg.xml Execute the following sql o ALTER TABLE xwikidoc ALTER COLUMN xwd_archive DROP NOT NULL
o Otherwise, you would get the following exceptions:
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3201 in 3: Exception while saving document XWiki.TagClass Wrapped Exception: Could not execute JDBC batch update com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:289)

Start Tomcat (log in as Admin/admin) You will get a screen like this. At this point, you need to fix the skins.

Go Administration -> Preferences -> Skin to change the skin to comkraft

Import the matching .xar (the same version as the code) file for the space/pages. Please make sure uncheck the blog.*** since it would overwrite the category information otherwise.

3. Tips o How to see list of Tags http://localhost:8080/xwiki/bin/view/Main/Tags http://www.xwiki.org/xwiki/bin/view/UserGuide/Tags o What is class http://www.xwiki.org/xwiki/bin/view/FAQ/WhatIsAClass o How to add image into a wiki page http://www.xwiki.org/xwiki/bin/view/FAQ/HowDoIAddAnImageT oAPresentation o Architecture http://www.xwiki.org/xwiki/bin/view/DevGuide/Architecture o Panel http://localhost:8080/xwiki/bin/view/Panels/PanelWizard o How to create an application http://old.xwiki.org/xwiki/bin/view/DevGuide/FAQs+Tutorial o Programming

Troubleshooting
Problem: Errors in building xwiki 1.1 via maven.
[ERROR] BUILD ERROR [INFO] -----------------------------------------------------------------------[INFO] Failed to resolve artifact. Missing: ---------1) gnujaxp:gnujaxp:jar:1.0.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=gnujaxp -DartifactId=gnujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: ujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.xpn.xwiki.platform:xwiki-web-gwt:jar:1.1 2) com.xpn.xwiki.platform:xwiki-core:jar:1.1 3) jfree:jfreechart:jar:1.0.0-rc1 4) gnujaxp:gnujaxp:jar:1.0.0

---------1 required artifact is missing. for artifact: com.xpn.xwiki.platform:xwiki-web-gwt:jar:1.1 from the specified remote repositories: xwiki-releases (http://maven.xwiki.org/releases), central (http://repo1.maven.org/maven2), gwt-maven (http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/), xwiki-snapshots (http://maven.xwiki.org/snapshots), xwiki-externals (http://maven.xwiki.org/externals)

Solution Modiy the pom.xml for the xwiki core module to exclude gnujaxp dependency.
<!-- Version 1.0.0-rc1 has some bad dependencies in the POM. This is fixed in 1.0.0 but unfortunately we're using an API (setDataAreaRatio()) that has disappeared in 1.0.0 so we need to fix this before we can move to 1.0.0 or beyond... See http://jira.xwiki.org/jira/browse/XWIKI-390. Note: when we move to using the central repo version we'll only need 1 dependency on jfreechart --> <dependency> <groupId>jfree</groupId> <artifactId>jfreechart</artifactId> <version>1.0.0-rc1</version> <exclusions> <exclusion> <groupId>gnujaxp</groupId> <artifactId>gnujaxp</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>jfree</groupId> <artifactId>jcommon</artifactId> <version>1.0.5</version> </dependency>

Problem: site plugin and assembly plugin missing error Solution: Modify the pom.xml to include these plugins in the <build><plugins><plugin> section We also need to use maven 2.1 snapshot (from the xwiki site) to build. d

Vous aimerez peut-être aussi