El archivo portal-ext.properties de Liferay

Uno de los archivos que más información nos proporciona de las capacidades de Liferay es el archivo portal.properties que está incluido en el portal-impl.jar de Liferay. A partir de ese archivo podemos crear uno personalizado en la $HOME de Liferay y configurar cosas como el pool de conexiones con la base de datos, los indices de lucene, las cachés, el jackrabbit, el ldap, el cas, ntml....

Se puede extraer de esta manera:

 

cd $LIFERAY_HOME
jar -xvf ./tomcat-6.0.18/webapps/ROOT/WEB-INF/lib/portal-impl.jar portal.properties
mv portal.properties portal-ext.properties

Os dejo un pequeño extracto:

 

##
## JDBC
##

    #
    # Set the JNDI name to lookup the JDBC data source. If none is set,
    # then the portal will attempt to create the JDBC data source based on the
    # properties prefixed with "jdbc.default.".
    #
    #jdbc.default.jndi.name=jdbc/LiferayPool

    #
    # Set the properties used to create the JDBC data source. These properties
    # will only be read if the property "jdbc.default.jndi.name" is not set.
    #
    # The default settings are configured for an in-memory database called
    # Hypersonic that is not recommended for production use. Please change the
    # properties to use another database.
    #
    # Add dynamic-data-source-spring.xml to the property "spring.configs" to
    # configure the portal to use one database cluster for read calls and
    # another database cluster for write calls. The convention is to create a
    # set of properties prefixed with "jdbc.read." to handle read calls and
    # another set of properties prefixed with "jdbc.write." to handle write
    # calls. These data sources can also be created via JNDI by setting the
    # properties "jdbc.read.jndi.name" and "jdbc.write.jndi.name".
    #

    #
    # DB2
    #
    #jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
    #jdbc.default.url=jdbc:db2:lportal
    #jdbc.default.username=db2admin
    #jdbc.default.password=lportal

    #
    # Derby
    #
    #jdbc.default.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
    #jdbc.default.url=jdbc:derby:lportal
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # Hypersonic
    #
    jdbc.default.driverClassName=org.hsqldb.jdbcDriver
    jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
    jdbc.default.username=sa
    jdbc.default.password=

    #
    # Ingres
    #
    #jdbc.default.driverClassName=com.ingres.jdbc.IngresDriver
    #jdbc.default.url=jdbc:ingres://localhost:II7/lportal
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # MySQL
    #
    #jdbc.default.driverClassName=com.mysql.jdbc.Driver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # Oracle
    #
    #jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
    #jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
    #jdbc.default.username=lportal
    #jdbc.default.password=lportal

    #
    # P6Spy
    #
    #jdbc.default.driverClassName=com.p6spy.engine.spy.P6SpyDriver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

    #
    # PostgreSQL
    #
    #jdbc.default.driverClassName=org.postgresql.Driver
    #jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

    #
    # SQL Server
    #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

    #
    # Sybase
    #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sybase://localhost:5000/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

    #
    # Liferay uses C3PO by default for connection pooling. The data source
    # factory can be configured to use JNDI or another pooling implementation by
    # modifying infrastructure-spring.xml. See
    # http://www.mchange.com/projects/c3p0/index.html#configuration for a list
    # of additional fields used by C3PO for configuring the database connection.
    #
    jdbc.default.acquireIncrement=5
    jdbc.default.maxPoolSize=100
    jdbc.default.minPoolSize=10
    jdbc.default.numHelperThreads=10

##
## Ehcache
##

    #
    # Set the classpath to the location of the Ehcache config file for internal
    # caches. Edit the file specified in the property
    # "ehcache.multi-vm.config.location" to enable clustered cache.
    #
    ehcache.single.vm.config.location=/ehcache/liferay-single-vm.xml
    ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm.xml

    #
    # Uncomment the following in a clustered environment.
    #
    #ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml

##
## LDAP
##

    #
    # Set the values used to connect to a LDAP store.
    #
    ldap.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    ldap.base.provider.url=ldap://localhost:10389
    ldap.base.dn=dc=example,dc=com
    ldap.security.principal=uid=admin,ou=system
    ldap.security.credentials=secret
    ldap.referral=follow

    #
    # Settings for com.liferay.portal.security.auth.LDAPAuth can be configured
    # from the Admin portlet. It provides out of the box support for Apache
    # Directory Server, Microsoft Active Directory Server, Novell eDirectory,
    # and OpenLDAP. The default settings are for Apache Directory Server.
    #
    # The LDAPAuth class must be specified in the property "auth.pipeline.pre"
    # to be executed.
    #
    # Encryption is implemented by com.liferay.util.Encryptor.provider.class in
    # system.properties.
    #
    ldap.auth.enabled=false
    ldap.auth.required=false

    #
    # Set either bind or password-compare for the LDAP authentication method.
    # Bind is preferred by most vendors so that you don't have to worry about
    # encryption strategies.
    #
    ldap.auth.method=bind
    #ldap.auth.method=password-compare

    #
    # Set the password encryption to used to compare passwords if the property
    # "ldap.auth.method" is set to password-compare.
    #
    ldap.auth.password.encryption.algorithm=
    ldap.auth.password.encryption.algorithm.types=MD5,SHA

    #
    # Active Directory stores information about the user account as a series of
    # bit fields in the UserAccountControl attribute.
    #
    # If you want to prevent disabled accounts from logging into the portal you
    # need to use a search filter similiar to the following:
    # (&(objectclass=person)(userprincipalname=@email_address@)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))
    #
    # See the following links:
    #     http://support.microsoft.com/kb/305144/
    #     http://support.microsoft.com/?kbid=269181
    #
    ldap.auth.search.filter=(mail=@email_address@)

    #
    # You can write your own class that extends
    # com.liferay.portal.security.ldap.AttributesTransformer to transform the
    # LDAP attributes before a user or group is imported to the LDAP store.
    #
    ldap.attrs.transformer.impl=com.liferay.portal.security.ldap.AttributesTransformer

    #
    # You can write your own class that extends
    # com.liferay.portal.security.ldap.LDAPUser to customize the behavior for
    # exporting portal users to the LDAP store.
    #
    ldap.user.impl=com.liferay.portal.security.ldap.LDAPUser

    #
    # When a user is exported to LDAP and the user does not exist, the user will
    # be created with the following default object classes.
    #
    ldap.user.default.object.classes=top,person,inetOrgPerson,organizationalPerson

    #
    # When importing and exporting users, the portal will use this mapping to
    # connect LDAP user attributes and portal user variables
    #
    ldap.user.mappings=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\ngroup=groupMembership

    #
    # When importing groups, the portal will use this mapping to connect LDAP
    # group attributes and portal user group variables.
    #
    ldap.group.mappings=groupName=cn\ndescription=description\nuser=uniqueMember

    #
    # Settings for importing users and groups from LDAP to the portal.
    #
    ldap.import.enabled=false
    ldap.import.on.startup=false
    ldap.import.interval=10
    ldap.import.user.search.filter=(objectClass=inetOrgPerson)
    ldap.import.group.search.filter=(objectClass=groupOfUniqueNames)

    #
    # Set either user or group for import method. If set to user, portal will
    # import all users and the groups associated with those users. If set to
    # group, the portal import all groups and the users associated those groups.
    # This value should be set based on how your LDAP server stores group
    # membership information.
    #
    ldap.import.method=user
    #ldap.import.method=group

    #
    # Settings for exporting users from the portal to LDAP. This allows a user
    # to modify his first name, last name, etc. in the portal and have that
    # change get pushed to the LDAP server. This will only be active if the
    # property "ldap.auth.enabled" is also set to true. New users and groups
    # will be created at the specified DN.
    #
    ldap.export.enabled=true
    ldap.users.dn=ou=users,dc=example,dc=com
    ldap.groups.dn=ou=groups,dc=example,dc=com

    #
    # Set this to true to use the LDAP's password policy instead of the portal
    # password policy.
    #
    ldap.password.policy.enabled=false

    #
    # Set these values to be a portion of the error message returned by the
    # appropriate directory server to allow the portal to recognize messages
    # from the LDAP server. The default values will work for Fedora DS.
    #
    ldap.error.password.age=age
    ldap.error.password.expired=expired
    ldap.error.password.history=history
    ldap.error.password.not.changeable=not allowed to change
    ldap.error.password.syntax=syntax
    ldap.error.password.trivial=trivial
    ldap.error.user.lockout=retry limit

##
## CAS
##

    #
    # Set this to true to enable CAS single sign on. NTLM will work only if
    # LDAP authentication is also enabled and the authentication is made by
    # screen name. If set to true, then the property "auto.login.hooks" must
    # contain a reference to the class
    # com.liferay.portal.security.auth.CASAutoLogin and the filter
    # com.liferay.portal.servlet.filters.sso.cas.CASFilter must be referenced
    # in web.xml.
    #
    cas.auth.enabled=false

    #
    # A user may be authenticated from CAS and not yet exist in the portal. Set
    # this to true to automatically import users from LDAP if they do not exist
    # in the portal.
    #
    cas.import.from.ldap=false

    #
    # Set the default values for the required CAS URLs. Set either
    # "cas.server.name" or "cas.service.url". Setting "cas.server.name" allows
    # deep linking. See LEP-4423.
    #
    cas.login.url=https://localhost:8443/cas-web/login
    cas.logout.url=https://localhost:8443/cas-web/logout
    cas.server.name=localhost:8080
    cas.service.url=
    #cas.service.url=http://localhost:8080/c/portal/login
    cas.validate.url=https://localhost:8443/cas-web/proxyValidate

##
## NTLM
##

    #
    # Set this to true to enable NTLM single sign on. NTLM will work only if
    # LDAP authentication is also enabled and the authentication is made by
    # screen name. If set to true, then the property "auto.login.hooks" must
    # contain a reference to the class
    # com.liferay.portal.security.auth.NtlmAutoLogin and the filter
    # com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter must be referenced
    # in web.xml.
    #
    ntlm.auth.enabled=false
    ntlm.auth.domain.controller=127.0.0.1
    ntlm.auth.domain=EXAMPLE

##
## Lucene Search
##

    #
    # Set this to true if you want to avoid any writes to the index. This is
    # useful in some clustering environments where there is a shared index and
    # only one node of the cluster updates it.
    #
    index.read.only=false

    #
    # Set this to true if you want to index your entire library of files on
    # startup. This property is available so that automated test environments
    # index on startup. Do not set this to true on production systems or else
    # your index will be indexed on every startup.
    #
    index.on.startup=false

    #
    # Set this to true to add a delay before indexing on startup. A delay may be
    # necessary if a lot of plugins need to be loaded and reindexed. This
    # property is only valid if "index.on.startup" is set to true.
    #
    index.on.startup.delay=60

    #
    # Set this to true if you want the indexing on startup to be executed on a
    # separate thread to speed up execution.
    #
    index.with.thread=true

    #
    # Designate whether Lucene stores indexes in a database via JDBC, file
    # system, or in RAM.
    #
    #lucene.store.type=jdbc
    lucene.store.type=file
    #lucene.store.type=ram

    #
    # Lucene's storage of indexes via JDBC has a bug where temp files are not
    # removed. This can eat up disk space over time. Set this to true to
    # automatically clean up the temporary files once a day. See LEP-2180.
    #
    #lucene.store.jdbc.auto.clean.up=true

    #
    # Set the JDBC dialect that Lucene uses to store indexes in the database.
    # This is only referenced if Lucene stores indexes in the database. Liferay
    # will attempt to load the proper dialect based on the URL of the JDBC
    # connection. For example, the property "lucene.store.jdbc.dialect.mysql" is
    # read for the JDBC connection URL "jdbc:mysql://localhost/lportal".
    #
    lucene.store.jdbc.dialect.db2=org.apache.lucene.store.jdbc.dialect.DB2Dialect
    lucene.store.jdbc.dialect.derby=org.apache.lucene.store.jdbc.dialect.DerbyDialect
    lucene.store.jdbc.dialect.hsqldb=org.apache.lucene.store.jdbc.dialect.HSQLDialect
    lucene.store.jdbc.dialect.jtds=org.apache.lucene.store.jdbc.dialect.SQLServerDialect
    lucene.store.jdbc.dialect.microsoft=org.apache.lucene.store.jdbc.dialect.SQLServerDialect
    lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect.MySQLDialect
    #lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect.MySQLInnoDBDialect
    #lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect.MySQLMyISAMDialect
    lucene.store.jdbc.dialect.oracle=org.apache.lucene.store.jdbc.dialect.OracleDialect
    lucene.store.jdbc.dialect.postgresql=org.apache.lucene.store.jdbc.dialect.PostgreSQLDialect

    #
    # Set the directory where Lucene indexes are stored. This is only referenced
    # if Lucene stores indexes in the file system.
    #
    lucene.dir=${liferay.home}/data/lucene/

    #
    # Input a class name that extends
    # com.liferay.portal.search.lucene.LuceneFileExtractor. This class is called
    # by Lucene to extract text from complex files so that they can be properly
    # indexed.
    #
    lucene.file.extractor=com.liferay.portal.search.lucene.LuceneFileExtractor

    #
    # The file extractor can sometimes return text that is not valid for Lucene.
    # This property expects a regular expression. Any character that does not
    # matche the regular expression will be replaced with a blank space. Set an
    # empty regular expression to disable this feature.
    #
    lucene.file.extractor.regexp.strip=
    #lucene.file.extractor.regexp.strip=[\\d\\w]

    #
    # Set the default analyzer used for indexing and retrieval.
    #
    #lucene.analyzer=org.apache.lucene.analysis.br.BrazilianAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.cn.ChineseAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.cz.CzechAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.nl.DutchAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.fr.FrenchAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.de.GermanAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.KeywordAnalyzer
    #lucene.analyzer=org.apache.lucene.index.memory.PatternAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.PerFieldAnalyzerWrapper
    #lucene.analyzer=org.apache.lucene.analysis.ru.RussianAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.SimpleAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.snowball.SnowballAnalyzer
    lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.StopAnalyzer
    #lucene.analyzer=org.apache.lucene.analysis.WhitespaceAnalyzer

    #
    # Set Lucene's merge factor. Higher numbers mean indexing goes faster but
    # uses more memory. The default value from Lucene is 10. This should never
    # be set to a number lower than 2.
    #
    lucene.merge.factor=10

    #
    # Set how often to run Lucene's optimize method. Optimization speeds up
    # searching but slows down writing. Set this property to 0 to always
    # optimize. Set this property to an integer greater than 0 to optimize every
    # X writes.
    #
    lucene.optimize.interval=100

##
## JCR
##

    jcr.initialize.on.startup=false

    jcr.workspace.name=liferay
    jcr.node.documentlibrary=documentlibrary

    jcr.jackrabbit.repository.root=${liferay.home}/data/jackrabbit
    jcr.jackrabbit.config.file.path=${jcr.jackrabbit.repository.root}/repository.xml
    jcr.jackrabbit.repository.home=${jcr.jackrabbit.repository.root}/home
    jcr.jackrabbit.credentials.username=none
    jcr.jackrabbit.credentials.password=none
00

Más entradas de blog

Añadir comentarios