This topic describes how to configure an Active Directory (AD) domain controller for an Elastic Compute Service (ECS) instance and connect an ApsaraDB MyBase PostgreSQL instance to the AD domain.
Prerequisites
- The ECS instance where the AD domain controller runs and the ApsaraDB MyBase instance reside in the same virtual private cloud (VPC).
- The security group to which the ECS instance belongs is configured to allow access from the internal IP address of the ApsaraDB MyBase instance. For more information, see Add security group rules.
- By default, the firewall feature of the ECS instance is disabled. If you have enabled the firewall feature, you must configure the firewall feature to allow access from the internal IP address of the ApsaraDB MyBase instance.
Background information
Step 1: Configure an AD domain controller for an ECS instance
Step 2: Add an administrator user to the AD domain controller
Step 3: Add a standard user to the AD domain controller
In this example, a standard user named ldapuser
is added to the AD domain controller. This user is used to log on to the ApsaraDB
MyBase for PostgreSQL instance.
Step 4: Configure security group rules for the ECS instance
Step 5: Configure an ApsaraDB MyBase for PostgreSQL instance
Step 6: Test connectivity
Use a PostgreSQL command-line tool to connect to the ApsaraDB MyBase instance.
Run the following command to connect to the ApsaraDB MyBase instance by using the username and password of the standard user created for the AD domain controller:
psql -h <Endpoint of the ApsaraDB MyBase instance> -U ldapuser -p 5432 -d postgres