Create an external database that meets the Database requirements, and initialize it as explained in the following sections.
Downloading the Validation Authority database scripts
Follow the steps described in the following sections to download and validate the EVA Database Scripts compressed file.
Setting the variables of the Validation Authority database scripts
To run the database scripts, you will need to provide the following values, either in the execution command line or as environment variables.
Variable | Value |
|---|---|
DBNAME | The database name. |
HOSTNAME | The name of the host to connect to. |
USERNAME | The name of a DBMS user with permission to create tables, create users, and grant user permissions. |
PASSWORD | The password of the database user. |
OCSPRESPONDER_DB_PASSWORD | The password of the OCSP Responder user with Read permissions on the certStatus and metadata tables. |
OCSPRESPONDER_DB_USER | The name of the OCSP Responder user with Read permissions on the certStatus and metadata tables. |
STATUSFEEDER_DB_PASSWORD | The password of the Status Feeder user with Read and Write permissions on the certStatus and metadata tables. |
STATUSFEEDER_DB_USER | The name of the Status Feeder user with Read and Write permissions on the certStatus and metadata tables. |
Creating the database on Oracle
Run the certstatus_ initial_schema.sql and metadata_initial_schema.sql scripts to create the database objects on Oracle.
sqlplus "$USERNAME/$PASSWORD@tcp://$HOSTNAME/$DBNAME" @./certstatus_initial_schema.sqlsqlplus "$USERNAME/$PASSWORD@tcp://$HOSTNAME/$DBNAME" @./metadata_initial_schema.sqlRun the create_users.sql script to create the database users on Oracle.
sqlplus "$USERNAME/$PASSWORD@tcp://$HOSTNAME/$DBNAME" @./create_users.sql $USERNAME $STATUSFEEDER_DB_USER $STATUSFEEDER_DB_PASSWORD $OCSPRESPONDER_DB_USER $OCSPRESPONDER_DB_PASSWORDThe commands above assume a Linux operating system. Running these commands on a Windows machine may require a different syntax – for example, evaluating the <var> variables with the %<var>% syntax.
Creating the database on PostgreSQL
Run the certstatus_initial_schema.sql and metadata_initial_schema.sql scripts to create the database objects on PostgreSQL.
PGPASSWORD=$PASSWORD psql -d $DBNAME -U $USERNAME -h $HOSTNAME -v "ON_ERROR_STOP=1" -f ./certstatus_initial_schema.sqlPGPASSWORD=$PASSWORD psql -d $DBNAME -U $USERNAME -h $HOSTNAME -v "ON_ERROR_STOP=1" -f ./metadata_initial_schema.sqlRun the create_users.sql script to create the database users on PostgreSQL.
PGPASSWORD=$PASSWORD psql -d $DBNAME -U $USERNAME -h $HOSTNAME \-v STATUSFEEDER_DB_USER=$STATUSFEEDER_DB_USER \-v OCSPRESPONDER_DB_USER=$OCSPRESPONDER_DB_USER \-v STATUSFEEDER_DB_PASSWORD=$STATUSFEEDER_DB_PASSWORD \-v OCSPRESPONDER_DB_PASSWORD=$OCSPRESPONDER_DB_PASSWORD \-v "ON_ERROR_STOP=1" -f ./create_users.sqlThe commands above assume a Linux operating system. Running these commands on a Windows machine may require a different syntax – for example, evaluating the <var> variables with the %<var>% syntax.
Creating the database on SQL Server
Run the certstatus_ initial_schema.sql and metadata_initial_schema.sql scripts to create the database objects on SQL Server.
sqlcmd -S "$HOSTNAME" -U "$USERNAME" -P $PASSWORD -v DBNAME="$DBNAME" -i ./certstatus_initial_schema.sqlsqlcmd -S "$HOSTNAME" -U "$USERNAME" -P $PASSWORD -v DBNAME="$DBNAME" -i ./metadata_initial_schema.sqlRun the create_users.sql script to create the database users on SQL Server.
sqlcmd \ -S "$HOSTNAME" -U "$USERNAME" -P $PASSWORD \ -v STATUSFEEDER_DB_USER="$STATUSFEEDER_DB_USER" \ -v OCSPRESPONDER_DB_USER="$OCSPRESPONDER_DB_USER" \ -v STATUSFEEDER_DB_PASSWORD="$STATUSFEEDER_DB_PASSWORD" \ -v OCSPRESPONDER_DB_PASSWORD="$OCSPRESPONDER_DB_PASSWORD" \ -v DBNAME="$DBNAME" \ -i ./create_users.sqlThe commands above assume a Linux operating system. Running these commands on a Windows machine may require a different syntax – for example, evaluating the <var> variables with the %<var>% syntax.