Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description: (Pending)

Tomcat, Apache, Fedora 4, ubuntu, load balancer

Installation steps:

This installation guide describes the detail steps and commands for set up a replication mode Fedora Cluster in the Amazon AWS. The installation procedure as follows: 1. Create and update an Ubuntu instance.  2. Install Java & maven. 3. Install Tomcat. 4. Install Apache and mod_jk. 6. Install Fedora 4 and replication mode configuration. 7. EC2 load balancer.

 

  1. Create an Ubuntu instance in EC2.

    1. Login to EC2 dashboard and select launch instance, Ubuntu server AMI, and select instance type you want. Amazon document

  2. Create Ubuntu t2.small or larger instance in EC2.

    1. Create instance: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html

    2. Open 80 or Configure the “Security Groups” to open 80 and 8080 port.

    3. update OS: Login to the instance and update software

      1. > sudo apt-get update

      2. > sudo apt-get upgrade -y

  3. Install Java & mavenMaven

    1. > sudo apt-get install default-jre -y

    2. > sudo apt-get install default-jdk -y

    3. > sudo apt-get install maven -y

  4. Install Tomcat

    1. > sudo apt-get install tomcat7 -y

    2. > sudo apt-get install tomcat7-admin -y

    3. config tomcat manager: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access 

      1. Edit $CATALINA_BASE/conf/tomcat-users.xml

  5. Install Apache and mod_jk

    1. > sudo apt-get install apache2

  6. Installing and configuring mod_jk

    1. > sudo apt-get install libapache2-mod-jk

    2. > sudo vim /etc/tomcat7/server.xml

...

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

  1. > sudo vim /etc/apache2/workers.properties
    # Define 1 real worker using ajp13

...

worker.worker1.host=localhost

worker.worker1.port=8009

  1. > sudo vim /etc/apache2/mods-available/jk.conf
    change the JkWorkersFile property to /etc/apache2/workers.properties

  2. sudo vim /etc/apache2/sites-enabled/000-default.conf
    <VirtualHost *:80>

...

JkMount /fcrepo4* worker1

</VirtualHost *:80>

  1. Install Fedora 4https

    1. > wget http://

    wiki
    1. repo1.

    duraspace
    1. maven.org/maven2/org

    /display/FF/Deploying+Fedora+4#DeployingFedora4-DeployingwithTomcat7Cluster configuration:
    1. /fcrepo/fcrepo-webapp/4.0.0-beta-03/fcrepo-webapp-4.0.0-beta-03.war

    2. > sudo mkdir /usr/local/fedora-data

    3. > sudo chown -R tomcat7:tomcat7 /usr/local/fedora-data/

    4. Edit tomcat7: Add  JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.home=/usr/local/fedora-data"

    5. Edit catalina.properties: Add fcrepo.home=/usr/local/fedora-data

    6. > sudo cp /source/fcrepo-webapp-4.0.0-beta-03.war /var/lib/tomcat7/webapps/.

    7. > sudo service tomcat7 restart

  2. Cluster configuration:

    1. Edit tomcat7:
      JAVA_OPTS="$JAVA_OPTS -Xmx1024m -XX:MaxPermSize=256m -Dfcrepo.modeshape.configuration=file:///config/clustered/repository.json"

JAVA_OPTS="$JAVA_OPTS -Dfcrepo.infinispan.cache_configuration=config/infinispan/clustered/infinispan.xml"

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.home=/tmp/wherever"

JAVA_OPTS="${JAVA_OPTS} -Djgroups.tcp.address=<private-ip-address-of-ec2-instance>"

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.numOwners=2 -Djava.net.PreferIPv4Stack=true"

 

# The jgroups-ec2.xml file is included in ispn's jars

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.jgroups.configuration=jgroups-ec2.xml"

 

# This property overwrites the S3 bucketname variable in jgroups-ec2.xml

JAVA_OPTS="${JAVA_OPTS} -Djgroups.s3.bucket=<some-bucket-that-you-have-already-created>"
Fedora document: https://wiki.duraspace.org/display/FF/Deploying+a+Fedora+Cluster#DeployingaFedoraCluster-DeployinginAWS

 

  1. Create load balance in EC2

...

  1. EC2 load balancer

    1. Login to EC2 dashboard and select “Load Balancers”.

    2. Create Load Balancer.

    3. Add instances into newly created Load Balancer.