Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

These instructions apply to:

Icon
  • Confluence distributed as an archive file. The distribution includes Apache Tomcat as the application server. 
  • Linux or Solaris systems. If you are installing Confluence on a different system, please refer to Installing Confluence.

Also, please check the version of Confluence which you are installing. Refer to the documentation home page to verify the latest Confluence version and to find documentation for older versions.

Hint: If you are evaluating Confluence on Solaris or you are unsure which version to install, this is the one to use.

Icon
 

On this page:

1. Before you Start

Please check the following points:

  1. Ensure that your system meets the minimum requirements to run Confluence. For more information, please read the detailed System Requirements.
  2. Have your Confluence license key ready. You can obtain a trial, free or commercial license now, or retrieve your existing license key.
  3. You must be able to use a command prompt and install Java to continue. If not, please contact your system administrator to assist you or consider the Confluence Hosted evaluation option.
  4. Make sure that you use a Gnu version of zip application - Solaris and AIX are known to have problems with zip, because they use their own (old) versions instead of the Gnu version.

2. Install Java

Please refer to the Supported Platforms for the required version of Java. (OpenJDK is currently not supported. A JIRA issue to request support for this JDK has been created.)

  1. If you are not sure whether you have Java installed correctly, please confirm by doing the following:
    1. Open a shell console.
    2. Type echo $JAVA_HOME in the shell console and then press Enter
    3. View the result:
      • If a line is displayed such as /opt/jdk1.6.0_12 or /usr/lib/jvm/java-6-sun, then Java is installed and properly configured.
      • If nothing is displayed, then you either need to install Java or set the $JAVA_HOME environment variable. You can set this environment variable in your user account's 'profile' file. Alternatively, you can set this after installing Confluence (in step 4 below) by defining this path in your Confluence installation's setenv.sh file, usually located in the Confluence bin directory.
      • If you have installed an unsupported JDK and you want to use SSL then you need to install the Sun JSSE package.
  2. If you need to install Java, follow these instructions:
    • Go to the Java download page.
    • Download the latest JRE or JDK that is listed on the Confluence Supported Platforms page. (Confluence works with either the JDK or the JRE.)
    • When the download has finished, run the Java installer. Detailed installation instructions are provided on Oracle's website.
      Note: you will be asked to choose an installation directory. Make a note of this directory for use later.

3. Download and Extract the Confluence Installation File

  1. If you have not downloaded Confluence already, download the TAR.GZ file.

Use your unzip program to unzip the installation file to a directory such as /home/jsmith/confluence-2.7.0-std/.

Most Linux/Solaris users can use any unzip program (such as GNU Tar) to extract the Confluence installer. However, Solaris users should not use the Solaris Tar program due to a known issue associated with its use in extracting Confluence. Use another application such as GNU Tar instead.

For example, change directory to your home directory in Linux and enter the following commands in the shell console:

    • gunzip confluence-<version>-std.tar.gz
    • tar -xf confluence-<version>-std.tar
      (where <version> refers to the Confluence version you downloaded.)

(info) As usual on Linux/Solaris-based operating systems, avoid using spaces in your directory path. The directory into which you unzipped the Confluence installation is called the Confluence Installation directory. Next you will define the Confluence Home directory.

4. Define your Confluence Home Directory

Now you need to define the Confluence Home directory. This is where Confluence will store its configuration information, indexes and attachments.
(tick) Tip: Another term for 'Home directory' would be 'data directory'.

We suggest using different paths for your installation and home directories. This will facilitate upgrades. Examples of Installation and Home Directories:

  • Installation directory: /usr/local/confluence/

    If you wish to install or maintain multiple versions of Confluence, you can add a version number to the Confluence installation directory name like /usr/local/confluence-3.1-std/ and optionally, create the symbolic link /usr/local/confluence/ that points to /usr/local/confluence-3.1-std/
  • Home directory: /usr/local/confluence-data/
  1. Open your Confluence Installation directory (created when you unzipped Confluence — see above).
  2. Under the Installation directory, find this file: confluence/WEB-INF/classes/confluence-init.properties
  3. Open the confluence-init.properties file in a text editor.
  4. Scroll to the bottom and find this line:

  5. Remove the '#' and the space at the beginning of this line, so that Confluence no longer regards the line as a comment. The line should now begin with confluence.home
  6. If you decide to change the Confluence Home directory from the default, use an absolute path rather than a symbolic link to specify the path and file name. For example:

5. Check the Ports

If you have another application running on your machine which is using the same ports that Confluence uses by default, you may need to change the port which Confluence will use. For example, if you have a installation of JIRA running on this machine, JIRA might be already using the port which Confluence requests by default.

By default, Confluence listens on port '8090'. If this port is already in use in your installation, follow these instructions to change the ports:

  • To change the ports for Confluence, open the file conf/server.xml under your Confluence Installation directory. The first four lines of the file look like this:
    Default conf/server.xml

    You need to modify both the server port (default is 8000) and the connector port (default is 8090) to ports that are free on your machine. The server port is required by Tomcat but is not user facing in any way. The connector port is what your users will use to access Confluence, eg in the snippet above, the URL would be http://example.com:8090.


    (tick) Hint: You can use netstat to identify free ports on your machine. See more information on using netstat on
    Windows or on Linux.

    For example, here are the first four lines of a modified server.xml file, using ports '8020' and '8099':

    Modified conf/server.xml using ports 8020 and 8099

    To access Confluence in this configuration, point your web browser to http://localhost:8099/.

    Icon

    You should also ensure at this point that if you are using a firewall, it is configured to allow http/https traffic over the port you have chosen.

    Once this is working, if this is the URL your users will use, remember to update your Base URL to point to the new URL.

You will find more information on this page.

6. Select an External Database

This step is optional for users evaluating Confluence. However, if you are installing Confluence for production purposes, this step is mandatory. Please refer to the database requirements listed on our System Requirements topic for help in choosing an external database.

(info) External databases are those listed on our Supported Platforms topic, excluding HSQLDB, which is bundled with Confluence and should not be used in production.

When you have chosen your external database, follow the appropriate database setup guide to set up your database to work with Confluence.

You can learn more about migration from an existing installation or use of the evaluation database here. You will continue to use the Database Setup Guide during the Confluence Setup Wizard. (See step 8 below.)

7. Start Confluence

  1. Go to your Confluence Installation directory (created when you unzipped Confluence — see above).
  2. Under your Confluence Installation directory, open the bin directory and run the startup script: start-confluence.sh.
  3. Once Confluence is running, open a web browser and visit http://localhost:8090/.
    (tick) Hint: If you changed the port earlier, use the port you specified in step 6 above.

8. Confluence Setup Wizard

The Confluence Setup Wizard should appear in your web browser, prompting you to enter your license key. Follow the instructions on the screens, and read more guidelines on the Confluence Setup Wizard.

Related Topics

Change listen port for Confluence
Running Confluence Over SSL or HTTPS
Confluence Setup Guide
Configuring Confluence
Documentation Home

19 Comments

  1. One security tip is to have a designated Linux user (that does not have sudo privileges) to manage and run confluence.

    For example, confluenceadmin.

    We then add the following to startup.sh and shutdown.sh

  2. In Confluence 4.0, I notice some new files, start-confluence.sh and stop-confluence.sh

    Should we be using these files instead?

    If so, I notice in the script the use of user.sh to determine what user should be used to start the system, similar to my post on setting aside the confluenceadmin.

    Can we add instructions to modifying $user.sh? Is this correct, assuming I set aside confluenceadmin to manage and start Confluence I would making the following edit to user.sh,

    1. Hi Tin,

      We do mention that those files should be used for starting and stopping confluence. Those files indeed use the user.sh to determine the user that should own the confluence process. user.sh file gets populated if you use the automatic installer. As you mentioned, for security reason we want to have a dedicated user to run confluence and we create such user if you install a new version of confluence using *.bin installer.

      1. Thanks Anatoli,

        Then the reference to statup.sh on this particular page is a typo that should be corrected when you have a chance.

          1. Hi Anatoli,

            Maybe also add the instructions on modifying the user.sh as I described in the first post on this same thread.

  3. Anonymous

    It would be helpful for a discussion to occur related to 'root', 'sudo', 'user', 'confluence user',  'confluence admin', and 'database admin'. This article leaves the implication that the user should just install the Confluence instance when, in fact, there are a lot of things to be considered when setting up the owners and priviledges for these various moving parts.

    Thanks for considering this suggestion.

    1. Hi,

      we try to simplify/address some of those concerns in the automatic installer ( *.bin file) where upon a new installation a new dedicated user will be created and used to run the confluence process. This is done for security reason.

      1. Anonymous

        Hi,

         

        at the risk of stepping in late: would it be asked too much to want a few lines at the UNIX-related docs start stating users and permissions needed, and if there is anything special about prospective integrations of products.  As a new user/admin I apologize if I missed something I should have seen, but I still get this info from discussion and not the documentation.

        BTW: logging in as indicated on this page does not work for me, ends in a 20-20 with password and captcha - is my system too exotic (x86_64, openindiana, postgresql-9.1.3...) ?

        Regards

        dieter_lange@online.de

        1. Hi,

          We have documentation that describes the necessary permissions for JIRA. The same approach is applicable to Confluence.

      2. Anonymous

        Would it be possible to provide the password that is associated to the dedicated user that is created with the automatic installer

        1. Hi,

          Currently it is not possible to provide the password for the dedicated user that gets created by the installer. Installer does not set the password for that user at all. However you can change the password once the installation is complete using standard passw command.

  4. Today I noticed a java error in /opt/confluence/logs/catalina.out,

    Fontconfig error: Cannot load default config file

    I've just recently dealt with this one for another Java application and resolved it by installing fontconfig. In Ubuntu it's just,

    sudo apt-get install fontconfig

    However, this installs a lot of packages. I'm going to see if I can narrow this down to just the base minimal.

    If any Confluence developers happen upon this; given Confluence is a web app, are fonts actually being used?

    1. Yes, fonts are being used for things like exporting to pdf and showing powerpoint slides. Are you using openJDK, I wouldn't expect this error if you use Oracle's jre.

      1. Thank Anatoli for the quick response,

        I am using Oracle's JDK version 1.6.0_31-b04 32-bit with the "minimal virtual machine" install of Ubuntu 10.04.

        Initially from Oracle's Font Configuration article it seems that fonts are loaded right from what is packaged with the JDK from the JavaHome folder.

        I did a double-check and I do have the right java paths in Confluence's setenv.sh,

        Going further though, at the end of that same article under Properties for Solaris and Unix there appears to be a requirement for valid X11 font directories.

        I had a chance to install the fontconfig packages tonight and verified that it resolved the error message "fontconfig error" in /opt/confluence/logs/catalina.out.

        As for trying to slim down the fontconfig package, I decided against that option when I re-read the package description, "It is designed to locate fonts within the system and select them according to requirements specified by applications." and found the package size to be only 4 megs.

        Further, I verified that fonconfig is not in a standard Ubuntu Server installation in 10.04.

        I suggest adding a note to the Confluence installation instructions to verify that the fontconfig package is installed.

  5. If you run the "start-confluence.sh" from a path wich contains a space, you got an error on row 31 and 34 in "bin/setenv.sh"

    You should change (in bin/setenv.sh)

    31: cd $LOGBASE
    34: cd $PUSHED_DIR

    with

    31: cd "$LOGBASE"
    34: cd "$PUSHED_DIR"

  6. View the result:

    • If a line is displayed such as /opt/jdk1.6.0_12 or /usr/lib/jvm/java-6-sun, then Java is installed and properly configured.

    Confluence 5.0 Upgrade Notes#EndofsupportforJava6

    This documentation needs some updates.

  7. Confluence Home Directory lists contents of the home directory. Other than creating the home directory dir and updating the config to use it, should we be adding content to the home directory per that doc? If so, where do we get that content?

    1. Hi Julia,

      If you are installing a new instance of confluence then you don't need to add any content there. Confluence uses home directory to store some of the data it needs for working.