Install & Configure Fisheye on EC2 Amazon Linux

Installation

  1. Login as ec2-user
  2. Download the Linux JIRA installation
    cd
    wget http://www.atlassian.com/software/fisheye/downloads/binary/fisheye-2.3.6.zip
    

    Check out the latest stable version

  3. Extract the file to ec2-user home directory
    unzip fisheye-2.3.6.zip
    
  4. Install FishEye
    sudo mv fecru-2.3.6 /opt/fecru-2.3.6
    
  5. Change FishEye listening port
    % vi /opt/fecru-2.3.6/config.xml
    

    Change the port 8059 to 8101

    Change the port 8060 to 8100

  6. Create FishEye home (FishEye data directory)
    sudo mkdir /data/fisheye
    sudo chown ec2-user.ec2-user /data/fisheye
    
  7. Set the JAVA_HOME
    cd /opt/fecru-2.3.6/bin
    vi fisheyectl.sh
    
    #!/bin/sh
    
    export JAVA_HOME=/usr/lib/jvm/java
    export FISHEYE_INST=/data/fisheye
    
  8. Copy the configuration file to the data directory
    cp /opt/fecru-2.3.6/config.xml /data/fisheye
    

Configure Virtual Host

  1. Edit the virtual host file
    sudo vi /etc/httpd/conf.d/vhosts.conf
    
  2. Add the virtual host configuration
    <VirtualHost *:80>
            ServerName fish.yourdomain.com
            ServerAlias fish.yourdomain.com
            ProxyRequests Off
            ProxyPass / http://127.0.0.1:8100/
            ProxyPassReverse / http://127.0.0.1:8100/
            ProxyTimeout 60
    </VirtualHost>
    
  3. Restart Apache
    sudo service httpd restart
    

Start

% cd /opt/fecru-2.3.6/bin
% ./run.sh start

Stop

% cd /opt/fecru-2.3.6/bin
% ./run.sh stop

Change to MySQL DB

  1. Go to http://fish.yourdomain.com/admin
  2. Select 'Database Configuration'

Access

Browser Access

http://fish.yourdomain.com/

Admin

http://fish.yourdomain.com/admin

Auto Start FishEye

  1. sudo vi /etc/init.d/fisheye
    #!/bin/bash
    # Crucible/Fisheye startup script
    # chkconfig: 345 90 90
    # description: Atlassian Crucible
    
    CRUCIBLE_USER=ec2-user
    CRUCIBLE_HOME=/opt/fecru-2.3.6/bin
    
    RETVAL=0
    prog=crucibled
    pidfile=/var/lock/subsys/crucibled
    
    start() {
    echo -n $"Starting $prog: "
    if [ "x$USER" != "x$CRUCIBLE_USER" ]; then
    su - $CRUCIBLE_USER -c "$CRUCIBLE_HOME/fisheyectl.sh start"
    else
    $CRUCIBLE_HOME/fisheyectl.sh start
    fi
    
    echo
    [ $RETVAL = 0 ] && touch $pidfile
    sleep 3
    
    return $RETVAL
    }
    stop() {
    echo -n $"Shutting down $prog: "
    if [ "x$USER" != "x$CRUCIBLE_USER" ]; then
    su - $CRUCIBLE_USER -c "$CRUCIBLE_HOME/fisheyectl.sh stop"
    else
    $CRUCIBLE_HOME/fisheyectl.sh stop
    fi
    
    echo
    rm -f $pidfile
    return $RETVAL
    }
    
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    sleep 10
    start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    esac
    
    exit 0
    
    Add as a service
    sudo chmod +x /etc/init.d/fisheye
    sudo chkconfig --add fisheye
    sudo chkconfig fisheye on
    

Start/stop Fisheye

sudo service fisheye start
sudo service fisheye stop