Setup Liferay’s document management with an Amazon S3 as a repository

Issue

  • How to set up Liferay to use Amazon S3 storage instead of local storage and provide access information to S3.

Environment

  • Liferay DXP 7.2

Resolution

  • Steps to follow :
    • Amazon S3 requires a 'SAXParser' from the application server to operate. Apache Tomcat meets this requirement, therefore, the below property only needs to be added in a 'system-ext.properties' file
      • org.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
    • Place system-ext.properties file in a folder that resides in Liferay DXP installation’s classpath (e.g., /WEB-INF/classes/).
    • Set the following property in a portal-ext.properties file in the Liferay Home folder: 
      • dl.store.impl=com.liferay.portal.store.s3.S3Store
  • Restart Liferay DXP.
  • In the Control Panel, navigate to Configuration → System Settings → File Storage
  • In the S3 Store screen, configure the store:
    • Bucket Name: bucket’s name.
    • Access Key: AWS access key.
    • Secret Key: secret key.
    • S3 Region: The geographic region; the default is us-east-1.
  • Leave the other fields on the default settings.
  • Click Save
  • Restart Liferay DXP.
  • Now, the Liferay DXP instance is using the Amazon S3 store.

Additional Information

  • You may encounter an error that requires you to set the S3Endpoint parameter.
  • Amazon’s Simple Storage Service (S3) is a cloud-based storage solution that can be used with Liferay.
  • An Amazon Web Services (AWS) account is needed and then setup is very easy. After registering for an account, Amazon assigns some credentials (Access Key ID & Secret Key) via AWS Identity and Access Management (IAM). When creating an S3 bucket, you will be provided with a Bucket Name. All of these should be set as configuration values in Liferay.
  • Then the documents can be stored in the cloud from Liferay Application Server(s), seamlessly.
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0