Confluence Wiki install script

Atlassian Confluence

Quite often lately we have been asked to set up a Java based wiki, or customers have asked specifically for Confluence® (made by Atlassian® ) by name.

Confluence is a powerful and sometimes complex piece of software, so to make the setup for that easier I created an install script. In a very short time it is now easy to get up and running with minimal fuss.

If you are just looking to check Confluence over before taking the time to do an actual setup, you may want to review the Atlassian Evaluators Page. However if you are ready to dive in...

The script is available in our repository for general use now. It can also be directly downloaded. I've tested it on all the install options we offer so that should work, but if you see any bugs please do let us know.

Some of the customization options the script can provide are visible in the output below...

root@test:~# wget -q http://proj.ri.mu/installconfluence.sh
root@test:~# bash installconfluence.sh --help
 
installconfluence.sh
Copyright RimuHosting.com
Pre-installs and secures the confluence wiki packages provided by Atlasian
 
 Usage: installconfluence.sh [--help] | [--user ] [--appname ]
    [--installtarget ] [--datadir ] [--portprefix ] [--runonstartup]
    [--nojava] [--nomysql|[--dbname ] [--dbuser ] ]
    [--noprompt] [--debug] 
 
Option:         Description:
--dbname        optional name of confluence mysql database (default is )
--dbuser        optional name of confluence mysql user (default is )
--dbpass        optional password for confluence database (default is randomised)
--datadir       absolute folder location for data files (default is /usr/local/confluence-data)
--debug         enables debugging output to /root/cms_install.log
--installtarget top level location to install files (default is /usr/local/confluence)
--noprompt      run script without user interaction (not yet implemented)
--nojava        dont install java
--nomysql       dont install/setup mysql
--portprefix    initial three digit network port (default is 99 eg for http on 9980)
--runonstartup  set confluence to run on server boot (not enabled by default)
--user          user (and group) service will run as (default is confluence)

By default (ie just running the script with no paramaters) the install script will insure a recent version of Java and MySQL are both setup ready for use with the software. That will also come complete with an init script that can be used to manage the service, and have the application set to start on boot!

Once the install script completes there are still a few things you need to do to get Confluence ready for play. You should see something like the following (note the database credentials is unique for each install)...

* Confluence is now installed and should be visible on http://:9980
  You will need to complete the web based setup wizard there.
  Select 'Production Installation' and pass in the below details if you want Confluence to use a
  direct connection to the MySQL database. Or see the URL to learn how to configure a datasource
  ref http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat
  mysql database name = confdb, user = confadmin, password = FnX2EGKh

Go to the URL shown. You should see something similar as shown in Step 2 on the confluence documentation.

Confluence install wizard

Confluence web-based install wizard

You will need to grab an appropriate license key from Atlassian using the link on your setup page. Add that in. For most users you will also want to have a MySQL database running the back-end, so then select the "Production Site" option. And when you get to the database selection screen choose MySQL and click "External Database". You can then use the information given at the end of your install run to complete the "Standard Database Connection" option.

 

Follow your nose from there, or you can refer to the excellent documentation linked above. Which has a complete rundown on Confluence options and setup. Confluence has a lot of options, so its easy to spend a lot of time tweaking things to get it just right, although that is generally well worth it.

You may prefer to have your confluence site running on a normal URL, without the port number showing. Thats easy enough to do using mod_proxy and Apache, or you can pop in a ticket for us to set that up for you. Meanwhile, time to get started adding some content!

Confluence and the Confluence logos are trademarks of Atlassian (http://www.atlassian.com/about/privacy.jsp#trademark)

About Glenn Enright

Linux Systems Administrator at RimuHosting.com. I focus mainly on dedicated server provisioning with a sprinkling of network administration.
This entry was posted in Rimuhosting and tagged , , , , , . Bookmark the permalink.

10 Responses to Confluence Wiki install script

  1. Pingback: Jira Issue Tracker install script « RimuHosting Blog

  2. Pingback: The Pocket Site » Confluence and Jira install scripts

  3. Simon Bouchard says:

    I did try your script on Debian Squeeze and it fail at the end while trying to init confluence. I don't have any log of the failure. I can give you root access if you would like to take a look by yourself.

    BTW, thanks for this time saver.

    Simon

  4. Glenn Enright says:

    Thanks for trying it out Simon, glad it worked (mostly) for you. I tried to replicate the issue on squeeze but that seemed to work fine for me. If you already have java services installed there may have been a conflict with the port used for that.

    The script accepts the --debug option if you were willing to rerun that. Which will spit out a log file by default to /root/cms_install.log

    Any other details, you can pop in an email to support at rimuhosting dot com. Add (attn Glenn) in the subject and I'll try to address that.

  5. Simon Bouchard says:

    I did install Java from aptitude the first time - that was causing the failure. I did a OS reload and tried your time saver script on a fresh install of Debian Squeeze and it's working great.

    Thanks for the support!

  6. Glenn Enright says:

    FWIW I fixed up the init script used here so that we dont set JAVA_HOME as forcefully. That way distro or custom settings should still work.

  7. Bethany says:

    Thanks for the code, it helps to see it all typed out.

  8. António José Maia says:

    I did try your script on Ubuntu 11.04 and it fail at the end while trying to init confluence.

    # cat /root/cms_install.log
    ! Error from command: unrecognised paramter 'sudosu'.

    Thanks

    • Liz Quilty says:

      Heya, thanks for that, looks like it maybe a bug in our script, we will see if one of the guys can fix that

  9. Glenn Enright says:

    Quick update, the confluence version has been bumped to the latest 4.2.2