- Es jerárquica, lo que permite organizar su contenido en una estructura que se ajusta a tus necesidades y donde la información relacionada se almacena a menudo cerca y por tanto facilita la nevagación
- Es flexible, permite que el contenido se adaptar y evolucionae, utilizando un sistema de tipo de nodo que puede ser completamente «esquema agnóstico»
- Emplea una API estándar de Java (por ejemplo, javax.jcr)
- Adminte muchas implementaciones JCR, el contenido se puede almancenar en una variedad de bases de datos relacionales y otros tipos de almacenaje, algunos pueden exponer almacenajes no-JCR a través de la API JCR, y algunos pueden federar varios almacenes en un único repositorio virtual.
- Admite consultas e indexación fulltext
- Admite eventos, versioneado, locking y otras funcionalidads
Prerequisitos:
- Jdk de java
- Servidor tomcat
- Bibliotecas java para aws
- Cuenta en amazon AWS
Instalación en centos:
Java
Comprobamos versión de java: $ java -version>>java version "1.7.0_65"OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode) Si no lo tienes instalado, comprueba las versiones que tienes disponible en tu repositorio: # yum search java | grep 'java-'>>libreadline-java-javadoc.x86_64 : Javadoc for libreadline-javalibvirt-java-devel.noarch : Compressed Java source files for libvirt-javalibvirt-java-javadoc.noarch : Java documentation for libvirt-javalpg-java-compat.noarch : Compatibility Java runtime library for LPG 1.xpki-java-tools.noarch : Certificate System - PKI Java-Based Toolspki-java-tools-javadoc.noarch : Certificate System - PKI Java-Based Toolsppl-java-javadoc.x86_64 : Javadocs for ppl-javajava-1.5.0-gcj.x86_64 : JPackage runtime compatibility layer for GCJjava-1.5.0-gcj-devel.x86_64 : JPackage development compatibility layer for GCJjava-1.5.0-gcj-javadoc.x86_64 : API documentation for libgcjjava-1.5.0-gcj-src.x86_64 : Source files for libgcjjava-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environmentjava-1.6.0-openjdk-demo.x86_64 : OpenJDK Demosjava-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environmentjava-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentationjava-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundlejava-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environmentjava-1.7.0-openjdk-demo.x86_64 : OpenJDK Demosjava-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environmentjava-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentationjava-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle y lo instalas: # yum install java-1.7.0-openjdk.x86_64Tomcat
Descarga: $ cd /tmp$ wget http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.54/bin/apache-tomcat-7.0.54.tar.gz Y extrea el tomcat: $ tar xzf apache-tomcat-7.0.54.tar.gz# mv apache-tomcat-7.0.54 /usr/local/tomcat7 Otorga permisos a tu usuario sobre el directorio del tomcat: por ejemplo: # chmod -R miusuario:apache /usr/local/tomcat7 Arranca el tomcat: $ cd /usr/local/tomcat7$ ./bin/startup.sh>>Using CATALINA_BASE: /usr/local/tomcat7Using CATALINA_HOME: /usr/local/tomcat7Using CATALINA_TMPDIR: /usr/local/tomcat7/tempUsing JRE_HOME: /opt/jdk1.8.0_05/jreUsing CLASSPATH: /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jarTomcat started. Ahora deberías poder acceder al tomcat por el navegador:
1 |
http://localhost:8080 |
Opcionalmente, puedes configurar las cuentas de administrador del tomcat, editando el fichero /usr/local/tomcat7/config/tomcat-users.xmlDetén el tomcat: $ ./bin/shutdown.sh Script para auto arranque al iniciar la máquina, y para parar o arrancar el servicio. Crea el fichero /etc/init.d/tomcat7 con el siguiente contenido:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/local/tomcat7 case $1 in start) /bin/su tomcat $CATALINA_HOME/bin/startup.sh ;; stop) /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh ;; restart) /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh /bin/su tomcat $CATALINA_HOME/bin/startup.sh ;; esac exit 0 |
Jackrabbit
Descarga el siguiente archivo, extrae jcr-2.0.jar (lo encontrarás dentro del zip, en /lib si no recuerdo mal) y cópialo en /usr/local/tomcat7/lib/ Descarga la última versión estable del war de jackrabbit-webapp, cambia el nombre del fichero a jackrabbit.war y colócalo en /usr/local/tomcat7/webapp Arranca el servidor tomcat y, una vez descomprimido el war, vuelve a detenerlo. service tomcat start y service tomcat stop Ahora copia el fichero de muestra de bootstrap.properties a la ubicación del repositorio (para este tutorial, utilizaremos este directorio: /home/marcos/repositories): cp usr/local/tomcat7/webapp/jackrabbit/templates/bootstrap.properties /home/marcos/repositories/ A continuación modifica el fichero /usr/local/tomcat7/webapp/jackrabbit/WEB-INF/web.xml para definir la ubicación de bootstrap.properties:
1 2 3 4 5 6 7 8 9 10 11 |
... <init-param> <param-name>bootstrap-config</param-name> <param-value>/home/marcos/repositories/bootstrap.properties</param-value> <description> Property file that hold the same initialization properties than the init-params below. If a parameter is specified in both places the one in the bootstrap-config wins. </description> </init-param> ... |
1 2 3 4 5 6 7 8 9 10 11 |
#bootstrap properties for the repository startup servlet. #Thu Jul 17 22:53:12 CEST 2014 java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory repository.home=/home/marcos/repositories/jackrabbit rmi.enabled=true repository.config=/home/marcos/repositories/jackrabbit/repository.xml repository.name=jackrabbit.repository rmi.host=localhost java.naming.provider.url=http\://www.apache.org/jackrabbit jndi.enabled=true rmi.port=8089 |
1 2 3 4 5 6 7 8 9 10 11 12 |
<DataStore class="org.apache.jackrabbit.aws.ext.ds.S3DataStore"> <param name="config" value="${rep.home}/aws.properties"/> <param name="secret" value="123456789"/> <param name="minRecordLength " value="16384"/> <param name="cacheSize" value="68719476736"/> <param name="cachePurgeTrigFactor" value="0.95d"/> <param name="cachePurgeResizeFactor" value="0.85d"/> <param name="continueOnAsyncUploadFailure" value="false"/> <param name="concurrentUploadsThreads" value="10"/> <param name="asyncUploadLimit" value="100"/> <param name="uploadRetries" value="3"/> </DataStore> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # AWS account ID accessKey=CLAVEACCESO # AWS secret key secretKey=SUPERSECREATA # AWS bucket name s3Bucket=NOMBREDELBUCKET # AWS bucket region # Mapping of S3 regions to their constants # US Standard us-standard # US West us-west-2 # US West (Northern California) us-west-1 # EU (Ireland) EU # Asia Pacific (Singapore) ap-southeast-1 # Asia Pacific (Sydney) ap-southeast-2 # Asia Pacific (Tokyo) ap-northeast-1 # South America (Sao Paulo) sa-east-1 s3Region=us-standard # S3 endpoint to be used. This parameter is optional # and has a higher precedence over endpoint derived # via S3 region. s3EndPoint= connectionTimeout=120000 socketTimeout=120000 maxConnections=20 maxErrorRetry=10 # maximum concurrent threads to write to S3. writeThreads=10 |