Crucible Latest (3.2) : Installing Crucible on Linux and Mac

Hey! We're going to install Crucible on a Linux box, or a Mac. There are a few steps involved, but we think you'll find it easy to follow along. If you already have FishEye installed, you should read Upgrading from FishEye to Crucible instead.

1. Check supported platforms

Better check the Supported platforms page first; it lists the application servers, databases, operating systems, web browsers and JDKs that we have tested Crucible with, and that we recommend.

Atlassian only officially supports Crucible running on x86 hardware and 64-bit derivatives of x86 hardware.

2. Check your version of Java

In a terminal, run this:

java -version

The version of Java should be 1.6.0 or later (1.7.0 or later for OpenJDK).

If you don't see a supported version of Java, then get Java...

Download and install the Oracle Java Platform JDK, or OpenJDK.

Now try running 'java -version' again to check the installation. The version of Java should be 1.6.0 or later (1.7.0 or later for OpenJDK).

3. Check that the system can find Java

In a terminal, run this:

echo $JAVA_HOME

You should see a path something like:

OSX/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/
Linux/usr/lib/jvm/default-java
If you don't see a path to the Java location, then set JAVA_HOME...
LinuxMac

Do either of the following:

  • If JAVA_HOME is not set, log in with 'root' level permissions and run:
echo JAVA_HOME="path/to/JAVA_HOME" >> /etc/environment

where path/to/JAVA_HOME may be like: /usr/lib/jvm/default-java

  • If JAVA_HOME  needs to be changed, open the  /etc/environment  file in a text editor and modify the value for  JAVA_HOME to:

    JAVA_HOME="path/to/JAVA_HOME"

    It should look like:

    JAVA_HOME=/usr/lib/jvm/default-java


Insert the following in your ~/.profile file:

JAVA_HOME="path/to/JAVA_HOME"
export JAVA_HOME
 

where path/to/JAVA_HOME may be like: 

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/

Refresh your ~/.profile in the terminal and confirm that JAVA_HOME is set:

source ~/.profile
$JAVA_HOME/bin/java -version

You should see a version of Java that is 1.6.0 or higher, like this:

java version "1.6.0_24"

4. Create a dedicated Crucible user (recommended)

For production installations, we recommend that you create a new dedicated user that will run Crucible on your system. This user:

  • Should not have admin privileges.
  • Should be a non-privileged user with read, write and execute access on the Crucible home (install) directory and instance (data) directory. These directories are described below.
  • Should only have read access to your repositories. 

If you created a dedicated Crucible user, ensure you are logged in as this user to complete the remaining instructions.

5. Now it's time to get Crucible

Download Crucible from the Atlassian download site.

Extract the downloaded file to an install location:

  • Folder names in the path to your Crucible executable should not have spaces in them. The path to the extracted directory is referred to as the <Crucible home directory> in these instructions. If you use FishEye and Crucible together, they run as one instance, and use the same home directory – see Crucible and FishEye.
  • If you expect to have a large number of users for this Crucible installation, and Crucible will be connected to an external database, consider installing Crucible on a different server from the one running the external database, for improved performance.

6. Tell Crucible where to store your data  

The Crucible instance directory is where your Crucible data is stored.

  1. Create your Crucible instance directory.
  2. Tell Crucible where you created it by adding a FISHEYE_INST environment variable as follows:

    LinuxMac

    Open the  /etc/environment  file in a text editor and insert :

    FISHEYE_INST="path/to/<Crucible instance directory>"

    Open the ~/.profile file for the current user in a text editor and insert:

    FISHEYE_INST="path/to/<Crucible instance directory>"
    export FISHEYE_INST
  3. Now copy the newly extracted <Crucible home directory>\config.xml file to the root of your new Crucible instance directory.

 

(warning) You should not locate your Crucible instance directory inside the <Crucible home directory> — they should be entirely separate locations. If you do put the  instance directory in the <Crucible home directory> it will be overwritten, and lost, when Crucible gets upgraded. And by the way, you'll need separate Crucible instance directories if you want to run multiple copies of Crucible.

If you have a large number of repositories, we recommend you increase the default number of files that FishEye is allowed to open. See the following knowledge base article for more info: Subversion Indexer Paused with "Too many open files" Error.

7. Start Crucible!

In a terminal, change directory to <Crucible home directory> and run this:

bin/start.sh

After a few moments, in a web browser on the same machine, go to http://localhost:8060/ (or, from another machine, type http://hostname:8060/ , where hostname is the name of the machine where you extracted Crucible).

Enter your license, then an admin password, to finish the setup.

You can postpone setting up JIRA integration until later if you wish; see Configuring JIRA integration in the Setup Wizard.

8. Connect to an external database (recommended)

If you intend to use this Crucible installation in a production environment, it is highly recommended that you use one of the supported external databases. See Migrating to an external database.

If you are evaluating Crucible, or don't wish to do this now, Crucible will happily use its embedded database, and you can easily migrate later.  

9. Set up your mail server

Configure the Crucible email server so that users can get notifications from Crucible. See Configuring SMTP.

10. Add users and repositories

Now is the time to set up your users in Crucible, and to tell Crucible about any existing repositories you have. Please read Starting to use Crucible for the details.

Crucible will perform an initial index of your repositories, during which it accesses, indexes and organizes a view of your repositories (including all historical items) back to the earliest commits. If you are evaluating Crucible, we suggest that you index a single project, so you can use Crucible as soon as possible. If you choose to index your entire repository, be aware that this can take a long time (possibly days) for massive or complex repositories and can be more complex to set up (especially for Subversion). The basic process is slightly different for each SCM type.

11. Stop Crucible (optional)

In a terminal, change directory to <Crucible home directory> and run this:

bin/stop.sh

Comments:

Hi!

Can't be run on Linux bin/start.sh

Java version on server.

$ java -version
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

Running bin/start.sh and I get an error message:
$ ./start.sh
Error: JAVA_HOME is not defined correctly.
We cannot execute /opt/java/jdk1.6.0_33/bin/java

I don't have the java version 1.6.0_33 in /opt/java/ but I have a version 1.7.0_15  in /opt/java/.
Java path has been described in user file .bashrc

What is wrong, and why not start bin/start.sh?

 



 

Posted by at Feb 21, 2013 12:38

What does echo $JAVA_HOME result from the command-line? You must set this environment variable prior to running the startup script. If you need further assistance please open a support ticket at https://support.atlassian.com.

Posted by drohan at Feb 22, 2013 00:53

Hi!

Thanks for your response.
My results:
$ echo $JAVA_HOME
/opt/java/jdk1.6.0_33
$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jdk1.7.0_15/bin:/home/quasimodo/bin:/opt/java/jdk1.6.0_33/bin

$ which java
/opt/java/jdk1.7.0_15/bin/java

best regards


 

Posted by at Feb 22, 2013 07:48

Sorry, I found an error in my configuration.
Java settings were not the same in user .bash_profile and .bashrc (smile)


Posted by at Feb 22, 2013 12:17

bin/startup.sh on red hat linux 5 gives:

Exception in thread "main" java.lang.ClassFormatError: com.cenqua.fisheye.boot.OptsSetter (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
nohup: appending output to `nohup.out'

Posted by amit.sharma2 at Mar 29, 2013 16:04

What, no installer?  JIra and Confluence have them....please make for this too.

Posted by at May 17, 2013 17:40

Agree that there should be an installer. These instructions are unclear. JIRA clearly differentiates these as the install dir and the data dir. Crucible Home is the install directory!!! Crucible Instance is the data directory with I can live with. Directory permissions are not clear - I assume Crucible Home be owned by root and Crucible Instance by the crucible user. Start up initially failed until I started the server  as root. Stopped it. Changed all the Instance file ownerships and then I could start it as the crucible user. The need to cd to the bin directory is annoying and there is no service script to ensure it is started when the server is started. All this before I've begun the evaluation!

Posted by noel.jones1 at Jun 20, 2013 12:56

Hello Noel,

Find the current feature request for an installer here:

https://jira.atlassian.com/browse/FE-4281

Please vote on the issue and add yourself as a Watcher to be notified of its progress. For reference, this is our policy on how new features are implemented.

A guide to developing your own startup script can be found here:

How to start FishEye and Crucible at boot time on Linux

Posted by drohan at Jun 20, 2013 16:22

I definitely think in step 6 item #3 should say "move" instead of "copy". Copying the config file and not removing it or renaming it caused some issues for my installation that were not obvious to resolve. Once I renamed the config file in the <Crucible home directory> and restarted Crucible all of my issues were resolved.

Posted by christopher.flynn at Jul 16, 2013 15:02

Hello Chris,

Thanks for the feedback. The config.xml that is loaded is dictated by the existence of the FISHEYE_INST environment variable so if that variable is defined, the file in that location is used and the original is not taken into consideration at all. I would argue your point however, that moving the file instead of copying it is better, as this removes any ambiguity as to the location of the data directory for any user that is logged in (and any user that is not familiar with the environment variable). I'll look into making the change in the documentation. If you'd like to discuss the specifics of your particular experience further, please open a support request at https://support.atlassian.com.

Thank you,
Daniel

Posted by drohan at Jul 16, 2013 16:51

Hi,

This page uses a different terminology compared to other Atlassian products like Jira:

In JIRA

JIRA Installation Directory is where the application zip is extracted (where "binaries" are stored)

JIRA Home Directory is where "the key data that help define how JIRA works"

In Crucible

Crucible instance directory is where your Crucible data is stored (what is called "home" for Jira)

Crucible home is where the zip is extracted (what is called "Installation Directory" for Jira)

It would be great if the terms would be the same for every Atlassian product.

 

Thanks

Posted by thierry2 at Aug 27, 2013 23:08

Thanks Thierry, we're aware of this anomaly. As you can imagine, changing this is not something to consider lightly. In the meantime, just to be as clear as possible, FISHEYE_INST refers to where both Crucible and FishEye keep their data, not to the install location.

Posted by pwatson at Aug 27, 2013 23:54

Do you have any instructions on moving Crucible installation to a different server?

I would like to minimize amount of work required and simply move all the config data and all users to a new server (different domain).

Posted by slaven.veljovic at Nov 22, 2013 21:44

Slaven, this comment may be of help: https://answers.atlassian.com/questions/205649/crucible-migration-between-servers-avoiding-long-reindex-times

Posted by pwatson at Nov 24, 2013 22:50