Configure EJBCA with MySQL database

Source: Internet
Author: User

1. Required software:

1. j2sdk, ant, JBoss, EJBCA, MySQL database, MySQL JDBC driver, jce_policy-1_4_2 (if

This file is required if the password is more than six characters ).

2. install and configure the j2sdk, ant, JBoss, and EJBCA. Install the MySQL database.

Ii. Installation Process

1. Install MySQL and MYSQL client and create the database EJBCA under the root user. During MySQL installation, the default user is root.


2. JDBC driver: mysql-connector-java-3.0.17-ga-bin.jar copied to % JBoss-home %/Server/defalut/lib

3. modified the data source JNDI name in the mysql-ds.xml file to my own name sunrisefeds (this name can be any

, The name must be the same ). And the username and password for logging on to the database. My root password is 6844, because my database is built under root.

4. Copy the modified mysql-ds.xml file to JBoss-home/Server/default/deploy

5. Then run ant replaceds
Follow the prompts to enter the parameters:
MySQL
Java:/sunrisefeds (if the above JNDI name is AAAA, this is Java:/AAAA)

6. Run ant
7: Run ant deploy
8: Start JBoss
9. Run install. For installation steps, refer to the installation guide on the official website.

It is worth noting that: There may be some conflicts between a lot of software. At first I used the latest version of EJBCA for a long time, and then I changed it to a lower version. According to other people's experience, the MySQL driver may also have version conflicts, so when this version does not work, you can try another one.

The installation screen is shown as follows:

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C: \ Documents ents and Settings \ Administrator> Cd ../..

C: \> Cd EJBCA

C: \ EJBCA> ant replaceds
Buildfile: Build. xml

Replaceds:
[Input] type of database :( Oracle, MSSQL, MySQL, ipvs, ipvs8, sapdb, hsqld
B, Sybase)
MySQL
[Input] Data Source (default Java:/defaultds, recommended Java:/ejbcads ):
Java:/ejbcads
[Copy] copying 1 file to c: \ EJBCA \ SRC \ Ca \ META-INF
[Copy] copying 1 file to c: \ EJBCA \ SRC \ Ra \ META-INF
[Copy] copying 1 file to c: \ EJBCA \ SRC \ log \ META-INF
[Copy] copying 1 file to c: \ EJBCA \ SRC \ authorization \ META-INF
[Copy] copying 1 file to c: \ EJBCA \ SRC \ hardtoken \ META-INF
[Copy] copying 1 file to c: \ EJBCA \ SRC \ keyrecovery \ META-INF

Build successful
Total time: 22 seconds
C: \ EJBCA> ant
Buildfile: Build. xml

Init:
[Mkdir] created dir: C: \ EJBCA \ TMP \ Classes
[Mkdir] created dir: C: \ EJBCA \ Dist

Compile:
[Javac] compiling 465 source files to c: \ EJBCA \ TMP \ Classes
[Copy] copying 470 files to c: \ EJBCA \ SRC \ Java

Apply. War:
[Mkdir] created dir: C: \ EJBCA \ TMP \ publicweb \ apply. War
[Copy] copying 20 files to c: \ EJBCA \ TMP \ publicweb \ apply. War
[Copy] copying 44 files to c: \ EJBCA \ TMP \ publicweb \ apply. War \ WEB-INF \ Classes

[Jar] building jar: C: \ EJBCA \ Dist \ apply. War

Status. War:
[Mkdir] created dir: C: \ EJBCA \ TMP \ publicweb \ status. War
[Copy] copying 1 file to c: \ EJBCA \ TMP \ publicweb \ status. War
[Copy] copying 26 files to c: \ EJBCA \ TMP \ publicweb \ status. War \ WEB-INF \ Classe
S
[Jar] building jar: C: \ EJBCA \ Dist \ status. War

Webdist. War:
[Mkdir] created dir: C: \ EJBCA \ TMP \ publicweb \ webdist. War
[Copy] copying 7 files to c: \ EJBCA \ TMP \ publicweb \ webdist. War
[Copy] copying 48 files to c: \ EJBCA \ TMP \ publicweb \ webdist. War \ WEB-INF \ class
Es
[Jar] building jar: C: \ EJBCA \ Dist \ webdist. War

CA. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ Ca \ ca. Jar
[Copy] copying 442 files to c: \ EJBCA \ TMP \ Ca \ ca. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ ca. Jar

Log. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ log. Jar
[Copy] copying 11 files to c: \ EJBCA \ TMP \ log. Jar
[Copy] copying 23 files to c: \ EJBCA \ TMP \ log. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ log. Jar

Authorization. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ authorization. Jar
[Copy] copying 10 files to c: \ EJBCA \ TMP \ authorization. Jar
[Copy] copying 91 files to c: \ EJBCA \ TMP \ authorization. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ authorization. Jar

Hardtoken. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ hardtoken. Jar
[Copy] copying 10 files to c: \ EJBCA \ TMP \ hardtoken. Jar
[Copy] copying 64 files to c: \ EJBCA \ TMP \ hardtoken. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ hardtoken. Jar

Keyrecovery. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ keyrecovery. Jar
[Copy] copying 11 files to c: \ EJBCA \ TMP \ keyrecovery. Jar
[Copy] copying 28 files to c: \ EJBCA \ TMP \ keyrecovery. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ keyrecovery. Jar

RA. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ rA. Jar
[Copy] copying 12 files to c: \ EJBCA \ TMP \ rA. Jar
[Copy] copying 95 files to c: \ EJBCA \ TMP \ rA. Jar
[Jar] building jar: C: \ EJBCA \ Dist \ rA. Jar

Adminweb. War:
[Mkdir] created dir: C: \ EJBCA \ TMP \ adminweb. War
[Copy] copying 95 files to c: \ EJBCA \ TMP \ adminweb. War
[Copy] copying 14 files to c: \ EJBCA \ TMP \ adminweb. War \ WEB-INF \ Classes
[Jar] building jar: C: \ EJBCA \ Dist \ adminweb. War

CA. Ear:
[Mkdir] created dir: C: \ EJBCA \ TMP \ Ca \ ear
[Copy] copying 1 file to c: \ EJBCA \ TMP \ Ca \ ear
[Copy] copying 7 files to c: \ EJBCA \ TMP \ publicweb \ publicwebroot. War
[Jar] building jar: C: \ EJBCA \ TMP \ Ca \ ear \ publicwebroot. War
[Copy] copying 10 files to c: \ EJBCA \ TMP \ Ca \ ear
[Copy] copying 7 files to c: \ EJBCA \ TMP \ Ca \ ear \ Lib
[Jar] building jar: C :\ejbca \ Dist \ ejbca-ca.ear

Admin. jar:
[Mkdir] created dir: C: \ EJBCA \ TMP \ adminjar
[Copy] copying 2 files to c: \ EJBCA \ TMP \ adminjar
[Copy] copying 226 files to c: \ EJBCA \ TMP \ adminjar
[Jar] building jar: C: \ EJBCA \ ADMIN. Jar

Build:

Build successful
Total time: 1 minute 19 seconds
C: \ EJBCA> ant deploy
Buildfile: Build. xml

Init:

Compile:

Apply. War:

Status. War:

Webdist. War:

CA. jar:

RA. jar:

Adminweb. War:

Log. jar:

Hardtoken. jar:

Keyrecovery. jar:

Authorization. jar:

CA. Ear:

Admin. jar:

Deploy:
[Copy] copying 1 file to c: \ jboss-4.0.2 \ Server \ Default \ deploy
[Copy] copying c: \ EJBCA \ Dist \ ejbca-ca.ear to C: \ jboss-4.0.2 \ Server \ Default \
Deploy \ ejbca-ca.ear

Build successful
Total time: 18 seconds
C: \ EJBCA> install
Welcome to EJBCA Installation
This script acts as a wizard helping you with the installation of your certifica
Te authority.

Before the installation will begin make sure of the following preparations have
Been done:

1. The EJBCA application is deployed to the application server. ('Ant deploy ')

2. You run this installation with access to administrative privileges.

Is these requirements meet (yes/no): Yes

This installation will create a first administrative ca. This CA will be used
Create the first
Superadministrator and for the SSL server certificate of administrative Web Serv
Er.

When the administrative Web server have been setup you can create other CA: S and
Administrators.

Please enter the short name for the CA.
This is only used for administrative purposes,
Avoid spaces or odd characters (ex 'adminca'): sunrisefe
Enter the Distinguished Name of the CA. This is used in the CA certificate to Di
Stinguish the ca. (EX 'cn = adminca1, O = primekey solutions AB, c = se'): Cn = sunrisefe
CA, O = WHUT, c = Cn
Enter the keysize in bits of the CA, only digits. (EX '000000'): 2048
Enter the validity in days for the CA, only digits (ex '000000'): 3650
Enter the policy ID of the CA. Policy ID determine which PKI policy the ca uses.

Type your policy ID or use '2. 5.29.32.0 'for any policy or 'no' for no policy
All.
(EX '2. 5.29.32.0 '): 2.5.29.32.0

Now for some information required to set up the administration Web interface.

Please enter the computer name of CA server. (EX 'caserver. primekey. se'): sunris
Efe
Enter the Distinguished Name of the SSL server certificate used by the administr
Ative web GUI
(EX 'cn = caserver. primekey. se, O = primekey solutions AB, c = se'): Cn = caserver. sunris
EFE, O = WHUT, c = Cn
Enter a good password for the super administrators keystore. Please remember thi
S one: 6481432

You have entered the following data:

CA short name: sunrisefe
Distinguished Name CA: Cn = sunrisefeca, O = WHUT, c = Cn
Keysize of the CA: 2048
Validity in days for the CA: 3650
Policy ID of the CA: 2.5.29.32.0
Computer Name of CA Server: sunrisefe
Distinguished Name of the SSL server certificate: Cn = caserver. sunrisefe, O = WHUT,
C = Cn
Password for the super administrators keystore: 6481432
Is this correct (Yes/No/exit): Yes

The installation will now start, please wait .....

Initializing ca
Generating rootca keystore:
DN: Cn = sunrisefeca, O = WHUT, c = Cn
Keysize: 2048
Validity (days): 3650
Policy ID: 2.5.29.32.0
Initalizing temporary authorization module.
Creating ca...
Caid for created CA: 959669511
-Created and published initial CRl.
CA initialized

Setup of administration Web interface have started, this will take a minute to C
Omplete ....

The authentication has been added to the keystore.

The installation is now complete.
Proceed with the following steps in order to start administrating EJBCA.

1. Restart the application server.
2. Import the p12/superadmin. p12 file in your browser.
3. Go to the following url: https: // <computername>: 8443/EJBCA/adminweb
4. And now your are all set to start using EJBCA.

If you are interested in professional support of EJBCA and PKI related question
S,
Please contact primekey solutions AB, Sweden at ejbca@primekey.se or www. primeke
Y. se for more information.

C: \ EJBCA>

3. supplement the above configurations

Install jdk1.4. *, set java_home = c: \ j2sdk1.4.2 _ 02; Set classpath = c: \ j2sdk1.4.2 _ 02 \ Lib; Set Path = c: \ j2sdk1.4.2 _ 02 \ bin;
Install ant, download the installation package, decompress it to the installation path, and set ant_home = c: \ apache-ant-1.6.1; Set Path = c: \ apache-ant-1.6.1 \ bin; (ANT installation is normal)
Install JBoss, download the installation package, decompress to the installation path, set jboss_home = c: \ jboss-3.2.5, start JBoss (run jboss_home \ bin \ Run. BAT), accessed with http: // localhost: 8080. The JBoss information indicates that JBoss is successfully installed.
Download an "unlimited strength jurisdiction policy files" at the place where JDK is downloaded. decompress the file and obtain a JCE folder, copy the two files to the system. By default, the Lib \ Security of the JRE environment overwrites the original two files. (put it under c: \ Program Files \ Java \ j2re1.4.2 _ 02 \ Lib \ Security to install the program)

After the installation, it is best to restart the machine so that EJBCA can find jboss_home.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.