Atlassian Confluence 5 Essentials - Stefan Kohler - E-Book

Atlassian Confluence 5 Essentials E-Book

Stefan Köhler

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Every idea, concept, and project needs documentation, which is traditionally kept in a variety of documents on different devices. Confluence 5 centralizes that documentation and provides it in one single location, available from almost any device and location.

Atlassian Confluence 5 Essentials is a practical, hands-on guide explaining not only how to install and administrate Confluence, but also everything you need to create, share, and collaborate on your documentation. This book will give you everything you need to get started with Confluence.

Before you can start creating content, Confluence needs to be available. That is exactly where we start with this book; installing Confluence. Through a number of clear, practical exercises you will go from installation and administration, to creating content and involving your teammates.

This book will teach you how to quickly create compelling content. You will learn how to involve your teammates in the process, using the Confluence workbox and share features. You will learn how Confluence can be customized with regards to look and feel, extra functionality, and integration with other tools, so that there is nothing in your way when you want to introduce Confluence 5 within your organisation.

If you need to develop better collaboration on mission critical projects, then this book is for you!

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 336

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Atlassian Confluence 5 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Confluence
Understanding the architecture
High-level architecture
Supported browsers
Data storage
Confluence Installation directory
Confluence Home directory
Installation options
Standalone and WAR distributions
Operating systems
Databases
Application servers
Installing Confluence
Installing Java
Installing PostgreSQL
Creating a user and a database
Installing Confluence
Unpacking Confluence
Configuring Confluence Home
Configuring the port
Configuring e-mail JNDI resource
Configuring HTTPS
Generating a certificate
Configuring Tomcat
Redirecting traffic to HTTPS
Configuring Confluence as a service
Starting Confluence
Installation wizard
Setting up the e-mail server
Summary
2. User Management
Understanding authentication
Password authentication
Seraph
Adding users
Manually adding users
Open registration
Inviting users
Managing groups
Creating groups
Adding users to groups
Editing group membership from the user details screen
Editing group membership via the group management screen
Administrating users
Searching for users
Using the simple user search
Using the membership search
Editing user details
Resetting the password
Public signup
External user directories
The effect of directory order
Limitations when using external directories
Build-in user management
Editing directories
Connecting to an LDAP directory
Connecting to LDAP
Server settings
LDAP schema settings
LDAP permissions
Advanced settings
User schema settings
Group schema settings
Membership schema settings
Connecting to a Crowd directory
Connecting to Crowd
Server settings
Crowd permissions
Advanced settings
Connecting to JIRA for user management
Connecting to JIRA
Server settings
JIRA server permissions
Advanced settings
Summary
3. Creating Content
The basic concepts
Spaces
Pages
Blog posts
Comments
Adding global spaces
Adding pages
Adding a new page to Confluence
Creating a page from another page
Setting the location of a page
The Confluence editor
The toolbar
Formatting and autocomplete
Autoformatting
Autocomplete
Autoconverting
Drag-and-drop
Adding content
Styling
Macros
The macro browser
Editing macros
Macro keyboard shortcut
Panels
Page layouts and sections
Using page layouts
Using Section and Column macros
Tables
Editing a table
Keyboard shortcuts
Sorting the table
Attachments
Attaching files to a page
Attachment version management
Downloading attachments
Embedding attachments
Multimedia
Office files and PDF
Drag-and-drop
Images
Displaying an attached image
Displaying an attached image on a different page
Displaying an image from a remote web page
Changing the image's appearance
Aligning your image
Displaying images in a gallery
Links
Linking to Confluence pages
Using Autocomplete
Using the Insert Link dialog
Using copy and paste
Linking to web pages
Linking to an anchor
Linking to a heading
Linking to an undefined page
Drafts
Changing the draft interval
Resuming editing a draft
Viewing unsaved changes
Working with content history
Viewing the page history
Importing content
Importing a Word document
Importing a Word document as a single page
Importing a Word document into multiple pages
Exporting content
Exporting a single page
Exporting a space
Summary
4. Managing Content
Organizing your spaces
Changing the order of pages
Setting the page order to alphabetical
Orphaned pages
Archiving a space
Using Confluence labels
Content labels
Attachment labels
Using space categories
Viewing labels
Using labels to display content
The Content by Label macro
Tracking content
Watching content
Setting notification options
Watching a page or a blog post
Watching a space
Managing your watches
Favorites
Adding favorites
Viewing favorites
Searching Confluence
Quick navigation aid
Full and advanced search
"Did you mean"
Filtering results
Searching labels
The search syntax
Summary
5. Collaborating in Confluence
Collaborating with other people
Mentions
Share content
Like
Status updates
Updating your status
Managing status updates
Displaying status updates
Working with notifications
Managing your notifications
Included notifications
Configuring workbox notifications
Enabling workbox notifications
Including notifications from JIRA
Sending notifications to another Confluence server
Working with tasks
Working with personal tasks
Working with tasklists
Managing tasks on a page
Confluence on your mobile device
Viewing
User profiles
Searching
Notifications and tasks
Notes about the mobile interface
Summary
6. Securing Your Content
Accessing the content
Global permissions
Updating global permissions
Overview of the global permissions
Comparing the administration roles
Notes on global permissions
Space permissions
Overview of the permissions
Managing space permissions
Setting default space permissions
Page restrictions
Page restriction hierarchy
Inheritance
Managing page restrictions
Confluence security
Secure administrator sessions
Atlassian security advisory
Limiting access to Confluence administration
Best practices
Summary
7. Customizing Confluence
The Confluence dashboard
The Confluence home page
The welcome message
Restoring the default welcome message
Removing the Get Started text
Including content from another page
Themes
The Default Theme
Configuring the theme
The Documentation Theme
Configuring the theme
Look and feel
Confluence logo
Space logo
Color schemes
Advanced customizing
The default space content
Custom HTML
Custom stylesheets
Site layouts
Summary
8. Advanced Confluence
Templates
Using templates
Creating templates
Space templates
Global templates
Adding content to your template
Importing templates
Checking installed template bundles
Making templates available for usage
User Macros
Managing user macros
Writing user macros
Writing a user macro template
A descriptive header
Parameters
Template code
Including another macro
The Page Properties macro
Shortcut links
Creating a shortcut link
Using shortcut links
Summary
9. General Administration
Working with add-ons
The Marketplace
The Universal Plugin Manager
Online and offline modes
Information transmitted by the UPM
Switching to offline mode
Finding new add-ons
Installing add-ons
Installing directly via the Marketplace
Installing by file upload
Updating add-ons
Removing installed add-ons
User requests for add-ons
Viewing user requests
Disabling user requests
Content indexing
Rebuilding the indexes
Changing the indexing language
Application links
Adding an application link
Editing an application link
Space project links
Configuring authentication
Trusted applications authentication
OAuth authentication
Basic HTTP authentication
Using Application Navigator
Adding a new link
Managing links
Getting support
Atlassian Answers
Atlassian Support
Atlassian Support tools
Raising a support ticket
Submitting a support request via Confluence
Atlassian experts
Summary
10. Extending Confluence
The Atlassian Plugin SDK
Installing the Atlassian Plugin SDK
Prerequisites
Setting up the Atlassian SDK
Commands
Creating a new plugin
Adding a new module to your plugin
Running a plugin in an application
Running a specific version of an application
Using the Maven Command Line Interface (CLI) plugin
Running a standalone application
The help command
Maven
The pom.xml file
The plugin descriptor
Using a development environment
Installing Eclipse on Windows
Installing the Maven Eclipse plugin
Configuring the Maven plugin
Building your first plugin
Creating the plugin project
Updating the generated code
Adding plugin metadata to the POM file
Verifying your Confluence version
Cleaning up the plugin skeleton
Adding a new macro module
Implementing the macro interface
Implementing the getBodyType and getOutputType methods
Implementing the execute method
Building, installing, and running your plugin
Adding resources
Releasing your plugin
Setting distributionManagement
Releasing your plugin without revision control
Plugin module types
Generic module types
Confluence-specific module types
The plugin module types in detail
XWork
The module descriptor
The action class
Web Sections
The module descriptor
Web Items
The module descriptor
Online resources
Summary
Index

Atlassian Confluence 5 Essentials

Atlassian Confluence 5 Essentials

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2013

Production Reference: 1030613

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-84968-952-6

www.packtpub.com

Cover Image by Eugenio Dal Monte (<[email protected]>)

Credits

Author

Stefan Kohler

Reviewers

Gregory Kneller

Alek Lotoczko

Jurriaan van Reijsen

Emma Rush

Acquisition Editor

Andrew Duckworth

Lead Technical Editors

Amey Varangaonkar

Savio Jose

Technical Editors

Jalasha D'costa

Pushpak Poddar

Amit Ramadas

Project Coordinator

Leena Purkait

Proofreader

Chris Smith

Indexer

Tejal Soni

Graphics

Abhinash Sahu

Production Coordinator

Shantanu Zagade

Cover Work

Shantanu Zagade

About the Author

Stefan Kohler is senior Atlassian consultant for 42, a company that specializes in Atlassian and is known for its expertise in the field. Stefan was in a big way responsible for setting 42 on Atlassian's path and making sure the company has a solid plugin development, consultancy and support offering. Stefan is a much sought-after consultant, requiring his agenda to be planned months ahead.

Within the community, Stefan is a person of some renown, having set up the Dutch chapter of the Atlassian User Group in 2010. He has written a number of award-winning add-ons for Confluence and Stash, and has scored an Atlassian prize for the best website. On Atlassian Answers, Stefan is a highly appreciated contributor with his useful answers and suggestions.

Stefan has extensive experience with designing and deploying Atlassian solutions. He has got Atlassian solutions working for many customers, in various industries, such as Software Engineering, Healthcare, Government, and Finance.

I would like to thank my family and friends for all their support and understanding during this project. A special thanks goes to Eric Meijer and 42 for making it possible for me to take on this project. I would also like to thank all the editors and reviewers for their efforts and much appreciated feedback.

About the Reviewers

Gregory Kneller started as a software developer in 1991, focusing on developing and implementing order-, task- and content-management systems for business customers. Before 200x, the main instruments for such kind of tasks were MS Access, Turbo C, and Borland Delphi. In 2000, he changed to web development and created a couple of custom CMS and data management systems with a web interface that were used by his customers.

Gregory's main concerns are usability, value for business, and team collaboration. He started implementing DHTML and XMLHttpRequest for developing frontends in 2003. These technologies were very new at that time; however, they promised rich user interfaces and communication features for project teams.

During that time, Gregory was looking for the best tool that has a web interface, which provides good usability, enough flexibility in order to adjust it to a variety of business requirements, and which does not require deep development at its customization. He probed many web tools such as Drupal, Typo3, Mambo-Joomla!, Tikiwiki, and a few others.

In 2007, being a Front Office Support Engineer in Deutsche Bank, he got acquainted with the Atlassian tools, JIRA and Confluence, and he decided that they are exactly the instruments he was looking for.

Since 2010, Gregory works as an independent contractor and he provides services of business customization, technical change management, enterprise integration, technical project management, and advanced administration for JIRA and Confluence. Alstom, UNFCCC, and ZDF are a few names among his clients.

Alek Lotoczko is an IT professional with more than 30 years' experience. For the last decade, Alek has specialized in the field of intranet and digital workplace solutions, with an emphasis on exploiting social networking elements within the corporate firewall environment.

Alek has worked with global companies in the banking, marine transportation, manufacturing, and logistics sectors.

Jurriaan van Reijsen has an M.Sc. degree (1982), and is a learning technology consultant at The Courseware Company in the Netherlands. He has implemented Confluence in several of the top 100 Dutch companies and helped those organizations to devise their knowledge strategy. Moreover, Jurriaan is a Ph.D. researcher at Utrecht University. His research focuses on the influence of knowledge networks on organizational learning, and his papers have been published in the proceedings of several leading international conferences. Jurriaan studied Information Science at Utrecht University and graduated on the topic of Knowledge Management.

Emma Rush is an Atlassian product specialist. She began as a developer, and now works as a consultant and technology evangelist, helping organizations to use applications to manage their development life cycle and business processes.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do yout need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Instant Updates on New Packt Books

Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.

Preface

Atlassian Confluence 5 Essentials is a practical hands-on guide introducing you to Atlassian Confluence, a powerful enterprise collaboration tool for teams to create, share, and discuss their content.

This book will show you how to install and manage your own Confluence installation. You will learn how to configure and customize Confluence to adapt it to your organization and add value to your business. The chapters in this book are structured to guide you through all the key aspects of managing and using Confluence.

You will start by setting up your own Confluence installation and will be introduced to all the key features in subsequent chapters. With each chapter, you will learn important concepts such as creating engaging content, sharing information, and engaging users to collaborate with each other.

This book is an in-depth guide to all the essential aspects of Atlassian Confluence. Packed with examples and step-by-step instructions, this book will help you become a Confluence expert.

What this book covers

Chapter 1, Getting Started with Confluence, will guide you through the installation process of Confluence and will give you a local installation, which will be used throughout the book. By the end of the first chapter you should have a running Confluence installation.

Chapter 2, User Management, covers how you can invite and register new users to join you in the content collaboration process. We will also go over how to connect Confluence to an existing user directory such as LDAP.

Chapter 3, Creating Content, is maybe the most important chapter, as content is king. We will go through the concepts of spaces, pages, and blog posts to explain how to add content to Confluence. Confluence's rich text editor has many features and in this chapter we will learn to master a large part of those by creating our first pages.

Chapter 4, Managing Content, focuses on how to find relevant content and how to use watches to keep track of you content. Confluence comes with a powerful search engine, which we will know all about by the end of this chapter.

Chapter 5, Collaborating in Confluence, goes into Confluence on a day-to-day basis. We will go into how to involve people in the content creation process using mentions and shares, and how to keep track of things using tasks. If you are on the road, Confluence mobile will keep you in touch with the latest content, tasks, and notifications.

Chapter 6, Securing Your Content, covers the options available for keeping your private information private. Confluence allows permissions to be set on a global, space, and content-specific level, giving us the fine-grained security an enterprise solution needs.

Chapter 7, Customizing Confluence, will go over the different features for changing the look and feel of Confluence so that we can add some company branding to our instance or just to a space.

Chapter 8, Advanced Confluence, covers many different advanced topics such as content templating, and working with metadata and keyboard shortcuts.

Chapter 9, General Administration, goes in-depth to find and manage add-ons to Confluence. Add-ons can add extra functionality or integrations. If you have problems with your Confluence installation and need support, this chapter will guide you to getting support from Atlassian or a local expert.

Chapter 10, Extending Confluence, focuses on some basics and possibilities of add-on development. By the end of the chapter you should know where to start if you would like to build an add-on, and on which level we can extend Confluence.

What you need for this book

The Confluence installation used in this book will be the Windows standalone distribution (ZIP), which you can get directly from Atlassian at www.atlassian.com/software/confluence/download.

At the time of writing, the latest version of Confluence was 5.1.1.

You will also need several additional software libraries including Java SDK, which you can get from http://www.oracle.com/technetwork/java/javase/downloads/index.html and PostgreSQL, which you can get from http://www.postgresql.org/download/.

Who this book is for

If you have just started with Confluence, as a user or administrator, this book will give you a running start and teach you everything you need to know. Even if you have been using Confluence for a while now, this book can give you new insights and tricks on how to use Confluence even more efficiently.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Create a file called local_machines_only.conf in your Apache configuration directory."

A block of code is set as follows:

<linklinkId="config-link">/plugins/config/alpha.action</link> <icon height="16" width="16"> <link>/images/icons/config.gif</link> </icon>

Any command-line input or output is written as follows:

netstat –a | find /I "1990"

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Getting Started with Confluence

Atlassian started back in 2002 and they set out to create software that would be inexpensive, easy to use, and would take little effort to install and maintain. Thanks to these principles, the installation process of Confluence is relatively easy and straightforward; there is even a one-click installation wizard available. In this chapter, we will start with a high-level overview of Confluence, looking at the different components that make the application. We'll take a look at the different deployment options available, including distribution choices, application servers, and databases. Finally, we will install our own Confluence application from scratch.

By the end of the chapter, you will have learned about:

The overall architecture of ConfluencePlatforms and applications supported by ConfluenceInstalling Confluence and all of the required softwareConfiguring database connectionsRunning Confluence, safely

Understanding the architecture

Installing Confluence is simple and straightforward. However, it is important for us to understand the components involved in the installation process and the options that are available to us. This understanding will help you to make informed decisions and be better prepared for troubleshooting and future updates.

High-level architecture

Atlassian has a comprehensive overview of the technical components of Confluence, available at https://developer.atlassian.com/display/CONFDEV/Confluence+Architecture. However, this overview is mainly interesting for those who are developing some custom add-ons and not so much for day-to-day administration and usage of Confluence. For this reason, we have created a high-level overview that highlights the most important components in the architecture, and how our users will connect to Confluence:

Supported browsers

Confluence is a web application, so the only thing our users need for accessing it is a compatible web browser. This can be on a desktop system, laptop, or even a mobile device such as a smartphone or tablet. The more recent versions of Confluence depend heavily on some new web technologies and standards. For this reason, older versions of Internet Explorer and Firefox are no longer fully compatible.

The following table summarizes the browser requirements for Confluence 5.1:

Browsers

Compatibility

Microsoft Internet Explorer (Windows)

8, 9 (drag-and-drop not completely supported because Internet Explorer doesn't fully support the related HTML5 feature)

Mozilla Firefox (all platforms)

10+

Safari (Windows and Mac)

5, 6

Google Chrome (Windows and Mac)

17+

Mobile Safari (iOS)

iOS 5.1, 6.0 (editing is not supported on mobile devices)

Data storage

The configuration files, attachments, indexes, and add-ons are stored, by default, in the Confluence Home directory that is configured when Confluence is first installed. All other data resides in the configured database. Optionally, attachments can be configured to be stored in the database instead of the Confluence Home directory.

You can choose to store the attachments in the database for ease of backup (all data in one single location) or to cope with characters that are invalid on your file system. Be aware: storing your attachments in the database increases the size of your database drastically. In a clustered environment where data is shared between several Confluence installations, you need to store the attachments in the database.

Confluence Installation directory

The directory where you install Confluence is called the Installation directory. It contains all the executable and configuration files of the application server. Confluence does not modify or store any data in this directory. This directory is primarily used for execution. For the remainder of the book we will be referring to this directory as CONF_INSTALL.

Confluence Home directory

The Confluence Home directory is the folder where Confluence stores its configuration, search indexes, attachments, and add-ons, specific to one Confluence installation. This means that every Confluence installation must, and can, have only one Confluence Home directory, and each Confluence Home directory can serve only one Confluence installation. If you're evaluating Confluence and using the embedded HSQLDB database, the database files are also stored in this directory. For the remainder of this book we will refer to this directory as CONF_HOME.

It's recommended that CONF_HOME is created separately from the Confluence installation. This separation of data and application makes tasks such as maintenance, back ups, and future upgrades easier. Keep in mind that the Confluence Home directory can grow quite large on an intensively used site.

Within CONF_HOME there are several important files and subdirectories:

File/Directory

Description

confluence.cfg.xml

Confluence's core configuration file; includes the configuration for connecting to its database and license key.

Attachments/

All file attachments in the Confluence site are stored under this directory. This is the place Confluence keeps attachment files if those are not stored in the database.

Backups/

If Confluence is configured to produce daily backups, these are stored in this directory. Administrators should occasionally delete old backups from this directory to prevent it from growing too large.

Bundled-plugins/

Add-ons bundled with the Confluence installation are stored here. User-installed plugins are not kept in this directory.

Config/

Miscellaneous global and per-space configuration files are kept in this directory.

Index/

The full-text search index is kept in this directory. Removing or modifying files in this directory may cause search to no longer function. A re-index operation from the Administration console will rebuild the files in this folder.

Logs/

The application log file is kept here.

Plugins-osgi-cache/

Plugins installed using the Confluence interface are downloaded and kept in this directory.

Temp/

Confluence stores temporary files in this directory, especially during backups and exports. A daily job within Confluence deletes files that are no longer needed.

Thumbnails/

Stores temporary files for image thumbnails. The contents of this directory can be safely deleted, as Confluence will regenerate thumbnails as required.

Installation options

Confluence is a Java-based web application, developed using many open standards and libraries. For this reason, it is able to run on many different operating systems, databases, and application servers. We will take a closer look at the options we have, and make an informed decision on what would work best in our situation.

Standalone and WAR distributions

First, we need to decide on the distribution. Confluence comes in three distributions:

One-click installerStandalone bundled with Apache TomcatWAR/EAR distribution

With regard to the application, there is no difference between the three distributions. The installer and standalone distributions are bundled with Apache Tomcat, which means we don't have to install and configure an application server ourselves. These distributions also come with an embedded in-memory database that can be used for evaluation purposes.

The installer is a very handy wrapper around the standalone bundle, automating all the steps we normally would have to perform manually. This is great when evaluating Confluence, but it doesn't give us much insight into the steps involved in maintaining our installation. For this reason, we will use the standalone distribution later, when we're going to install Confluence ourselves.

If you already have a running J2EE application server, or are experienced in installing and tuning one, the WAR distribution could be something for you. Due to differences between application servers, you are required to build the final deployment artifact with the provided build scripts. Once the artifact is built, you can deploy Confluence just like any other Java web application.

Operating systems

Confluence officially supports Microsoft Windows and Linux (all the distributions). Mac OS is supported only as a client platform. The choice of which operating system to run Confluence on is mostly a matter of preference based on expertise, and in most cases, there is an existing IT infrastructure with specific requirements.

If you do not have any preferences and would like to keep the initial costs down, Linux would be a good choice as there are no license fees involved. If you have more then 4 GB of memory on your server, make sure to pick a 64-bit version.

Databases

Confluence stores all its data in a relational database. The embedded in-memory HSQLDB database is only available for evaluation purposes, and should never be used in production environments. To limit the risk of data corruption, it's important that we use an enterprise database for production systems.

Confluence supports most relational databases available today. There will be no noticeable differences during the installation and configuration of Confluence. Just like the operating systems, your choice of database will come down to personal preference or IT standards within your organization. If you are using Windows as your operating system, the most likely choice would be Microsoft SQL Server. If you are using Linux, then you should consider PostgreSQL, MySQL, or Oracle.

The following table summarizes the list of databases currently supported by Confluence 5.1. It's worth mentioning that both PostgreSQL and MySQL are available as open source (free) products, making them excellent options if you are looking to minimize your initial investments.

Database

Supported version

PostgreSQL

8.4, 9.0

MySQL

5.1, 5.5

Microsoft SQL Server

2005, 2008, 2008 R2

Oracle

11.1, 11.2

HSQLDB

(for evaluation purposes only)

Application servers

Confluence requires a J2EE-compatible application server. The only officially-supported application server is Apache Tomcat. Fortunately, Apache Tomcat is an open source product and available for every operating system.

Confluence 5.1 will only support Tomcat 6.0.

Installing Confluence

Now that we have a good understanding of the overall architecture of Confluence and the various installation options, we are ready to install our own Confluence instance.

In the following exercise, we will be installing and configuring a fresh Confluence instance that will be ready for production. We will be using the standalone bundle, and the installation will be based upon the Windows platform. If you are planning on using a different operating system, please refer to https://confluence.atlassian.com/display/DOC/Installing+Confluence for details on installing Confluence on that specific platform.

In this exercise we will:

Install a fresh instance of ConfluenceConfigure Confluence to use a relational databaseConfigure Confluence to send e-mail notificationsConfigure Confluence as an auto-start Windows service so that it starts automatically

We will continue to use this Confluence instance in other chapters and exercises as we prepare Confluence for usage within your own organization.

For our implementation, we will be using:

Confluence standalone distribution 5.1.0PostgreSQL 9.0Java Development Kit 7 update 9Microsoft Windows Server 2008 R2

Installing Java

Confluence requires Java to be installed on the system, so this is our first step. Confluence 5.1 requires the latest update of JDK 7. If you are installing a different version of Confluence, make sure if JDK 7 is supported. Your choice between a 32-bit or 64-bit version depends on the amount of memory you want to allocate to Confluence; if it's more then 4 GB, pick the 64-bit version as 4 GB is the upper limit for the 32-bit version.

Currently, it is only possible to install Confluence as a Windows service if it is running on a 32-bit Java version.

Perform the following steps to install Java on your system:

Download the latest version of 32-bit JDK 7 from http://www.oracle.com/technetwork/java/javase/downloads/index.html.Double-click on the downloaded installation file to start the installation wizard.Select where you would like to install Java; or you can simply accept the default values. The location where you install the JDK will be referred to as JAVA_HOME for the rest of the book.Create a new environmental variable named JAVA_HOME with the path where you just installed Java, as shown in the following screenshot:Test if installation was successful by typing the following command in the command prompt:
java –version

This should display the version of Java installed:

C:\>java –versionjava version "1.7.0_17"Java(TM) SE Runtime Environment (build 1.7.0_17-b02)Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)

Installing PostgreSQL

The next step is to prepare a database for our Confluence installation.

To install PostgreSQL, simply perform the following steps:

Download PostgreSQL from http://www.postgresql.org/download/windows/.

Note

At the time of writing, the most recent version of PostgreSQL was not supported by Confluence. We will be using PostgreSQL Version 9.0.12.

Double-click on the downloaded installation file to start the installation wizard.Select where you would like to install PostgreSQL and want to store the data. We'll be using the default settings during this exercise.Choose a password for the root user; keep in mind that this is not the password for our Confluence database. I used p0stgre$, to keep it simple and easy to remember during this exercise and confirm to the Windows 2008 password security rules.If you choose a different port number, please make sure it doesn't conflict with any other services running on your machine. Also remember the port number, as we'll need it later.Uncheck the checkbox to make sure Stack Builder isn't launched at the completion of the installation process. We don't need it.

Creating a user and a database

Now that PostgreSQL is installed on our machine, we need to create a dedicated user and database for Confluence to use. This will prevent other users of the application from accessing Confluence data.

Perform the following steps to create a new user and a database:

Start the pgAdmin III administration tool, which has just been installed by the installer. We will be using this administration tool to create the Confluence user and database.Connect to the PostgreSQL server running at localhost, by double-clicking on the server name. Enter the root password you just picked, when prompted:Create a new user, or "login role," as PostgreSQL calls it. Right-click on Login Roles in the object browser (on the left) and select New Login Role...:
Enter the username: confluence.Enter the password: confluence.Do not select any role privileges.Confirm the creation of the role.
Create a new database; right-click on Databasesand select New Database.
Enter the database name: confuencedb.Set the owner of the database to the user we just created.Select UTF-8 for encoding.Confirm the creation of the database.
That is it. We have installed PostgreSQL and created a user and database for our Confluence installation to use.

Installing Confluence

Now that we have the JDK and database prepared, we have met all the conditions required to install Confluence on our machine. In order to get Confluence installed we have to:

Unpack ConfluenceConfigure the Confluence Home directoryCheck the ports Confluence usesConfigure e-mail

Optionally, we can configure Confluence to use HTTPS and run as a Windows service.

Unpacking Confluence

Perform the following steps to unpack Confluence:

Download the latest version of Atlassian Confluence from www.atlassian.com/software/confluence/download.The Atlassian website will detect the operating system you are using and will suggest a distribution accordingly. If you intend to install Confluence on a different system than the one you are currently on, make sure you select the correct distribution.As mentioned before, there are one-click installers available for both Windows and Linux. For the purpose of this exercise we will be using the ZIP archive, as it will provide us with an insight of the steps that are normally hidden by the installation process.Extract the downloaded ZIP file to c:/confluence/. It is recommended to use a third-party unzip software, such as 7-Zip or WinZip, as there are known issues with the unzip application provided with Windows. You can choose a different installation path; just make sure that you don't use spaces in your directory path.C:\confluence\atlassian-confluence-5.1 will now be known as CONF_INSTALL. Next, we will define the Confluence Home directory.

Configuring Confluence Home

Next we have to define and configure CONF_HOME. Remember that we want to keep our data separated from our installation data.

Create c:\confluence\data; this directory will now be known as CONF_HOME.Open CONF_INSTALL and open the file confluence\WEB-INF\classes\confluence-init.properties in your favorite text editor.Locate the following line; it's usually at the end of the file.

# confluence.home=c:/confluence/data

Remove the # and the space at the beginning of this line, so that Confluence no longer regards it as a comment.If you have selected a different directory for CONF_HOME, then change the path accordingly. Please note the following:
Avoid spaces in the directory path.Use forward slashes / to define the path.

Configuring the port

By default, Confluence runs on port 8090 with no context path. This means that after starting Confluence it will be available at http://localhost:8090/. If you have another application running on your machine that is using the same ports, you may need to change the port Confluence will use. Changing the context path is useful when you are running your applications behind a proxy and want to access them with the same domain, for example, http://example.com/jira and http://example.com/confluence. For this exercise we will be changing the context Confluence is running on to /confluence.

To change the ports for Confluence, open the file conf/server.xml under your CONF_INSTALL directory. An extract from that file is shown here:

<Server port="8000" shutdown="SHUTDOWN" debug="0"> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090"…. /> <Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Line 1: This line specifies the port for the command to shut down Tomcat. By default this port is 8000. If you already have an application running on that port, you can change this to another port.

Line 2: This line specifies on which port Confluence/Tomcat will be running. By default this is port 8090. If that port is unavailable for some reason, you can change it to another available port.

Line 3: This line allows you to change the context path on which Confluence will be available. By default the path is empty, meaning Confluence will be available on http://hostname:portnumber/.

For this exercise we will change the context path to /confluence, as shown in the previous file.

Configuring e-mail JNDI resource

In order to use the share and notification features from Confluence an e-mail account has to be set up. Normally, we could do this using the Confluence interface, but there is an exception if you want to use SMTPS, with your Gmail account for example. So for this exercise we will be configuring Confluence to use your Gmail account for sending e-mail notifications to the users.

Move (don't copy) activation-1.0.2.jar and mail-1.4.1.jar from CONF_INSTALL/confluence/WEB-INF/lib to CONF_INSTALL/lib.Add the following resource to your CONF_INSTALL/conf/server.xml; make sure to add it just before the </Context> tag.
<Resource name="mail/GmailSMTPServer" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.gmail.com" mail.smtp.port="465" mail.smtp.auth="true" mail.smtp.user="[email protected]" password="yourPassword" mail.smtp.starttls.enable="true" mail.transport.protocol="smtps" mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory" />
Replace [email protected] and yourPassword with the proper values for your account.Remember or write down the resource name. When we are configuring Confluence and asked for an e-mail server the JNDI location will be:

java:comp/env/mail/GmailSMTPServer

Note that the name is case-sensitive.

Configuring HTTPS

By default, Confluence runs with a standard, non-encrypted HTTP protocol. This is acceptable if you are running Confluence in a secured environment, such as an internal network. However, if you are planning to open up access to Confluence via the Internet, you need to tighten the security. We will be doing this by configuring Confluence to run over HTTPS (HTTP over SSL), so that login information and data are encrypted during transport over the Internet.