You can configure a PostgreSQL database on Amazon RDS for use with Content Services, with the following prerequisites:
- Setup Amazon RDS using the AWS Management Console
- Amazon EC2 instance
To configure the database:
-
Use the ssh command to connect to the Amazon EC2 instance
using a provided .ppk key.
- For Amazon Linux, the user name is ec2-user.
- For RHEL5, the user name is either root or ec2-user.
- For Ubuntu, the user name is ubuntu. For SUSE Linux, the user name is root.
- Execute sudo su to change to root.
- Install Content Services.
-
Install the PostgreSQL database connector to allow the database to talk to the server.
- Download postgresql-42.x.jar from the PostgreSQL download site.
-
Copy the JAR file into the /lib directory.
For example, for Tomcat, copy the JAR file into the <TOMCAT_HOME>/lib directory.
-
Install and use a database tool to connect to the Amazon RDS PostgreSQL datasource.
If Content Services is installed as standard with no configuration then psql from the installation folder can be used.
- Create a database named alfresco.
-
Create a user named alfresco.
This user must have write permissions on all tables and sequences.
- Set the new user’s password to alfresco.
- Open the <classpathRoot>/alfresco-global.properties file.
- Locate the line: dir.root=./alf_data
-
Edit this to set an absolute path to point to the directory in which you want to store
Content Services data. For example:
dir.root=C:/Alfresco/alf_data
-
Uncomment and set the database connection properties.
db.name=alfresco db.username=alfresco db.password=alfresco db.host=postgressql-alfresco.cw4mo3qj8qdu.us-east-1.rds.amazonaws.com db.port=5432 db.pool.max=275 # PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent) # db.driver=org.postgresql.Driver db.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}
Note: Ensure that these database connection properties aren’t commented out. - Save the file.
- Restart the Content Services server.