EJBCA installation without the support of other databases

Source: Internet
Author: User

Windows XP platform installation:

Ejbca_3_0_7.zip
Http://ejbca.sourceforge.net/download.htm

You cannot use version 1.5. It must be changed to version 1.4 ..
Jdk1.5.0 _ 02
Http://java.sun.com/j2se/1.5.0/download.jsp (JCE at the bottom)

Http://java.sun.com/j2ee/1.4/download.html#sdk
Http://java.sun.com/j2se/1.4.2/download.html (JCE at the bottom)

Apache-ant-1.6.3beta1-bin.zip
Http://ant.apache.org/

Jboss-4.0.1sp1.zip
Http://www.jboss.org/downloads/index#as

Database Version:
Mysql-5.0.3-beta-win32

MySQL connector/J is the official JDBC driver for MySQL
All of the following have been tried .. It seems that there is no difference
Mysql-connector-java-3.0.16-ga.zip
Mysql-connector-java-3.1.7.zip
Mysql-connector-java-3.2.0-alpha (it is said to support more than 5.0 of MySQL)

Http://dev.mysql.com/downloads/connector/j/3.1.html

 

Installation steps:

1. Install JDK and decompress JBoss, ant, and MySQL;

2. Set the environment variables java_home, jboss_home, ant_home, path, and classpath.
Environment Settings:

Environment variable settings:
Java_home = D: \ sun \ appserver \ JDK
Jboss_home = E: \ EJBCA \ JBoss
Ant_home = E: \ EJBCA \ apache-ant-1.6.3beta1
J2ee_home = D: \ Program Files \ Java \ J2EE

Path = contains these items: % java_home % \ bin; % jboss_home % \ bin; % ant_home % \ bin;

Classpath = % java_home % \ Lib; % j2ee_home % \ Lib

/*
Overwrite several jce_policy_1.5.0 files to % jre path % \ Lib \ Security.
The unlimited encryption package covers the actual JRE used by JBoss,
If this is not covered correctly, it will prompt that the unlimited encryption package is not used.
D: \ Program Files \ Java \ jre1.5.0 _ 02 \ Lib \ Security.
D: \ Program Files \ Java \ jdk1.5.0 _ 02 \ JRE \ Lib \ Security
*/
Overwrite two jce_policy_1.4.2 files to D: \ sun \ appserver \ JDK \ JRE \ Lib \ Security

3. Decompress EJBCA;

 

Use MYSQL as the database configuration as follows: (if MySQL is not used, use the default database directly)

4. Configure MYSQL:

Create Database EJBCA;

Grant create, drop, alter, select, insert, update, delete on EJBCA. *

EJBCA @ localhost identified by "123456"; // you can only log on to the local machine and limit the EJBCA Database

Grant create, drop, alter, select, insert, update, delete on *. * To EJBCA @ "%"

Identified by "123456"; // log on to any database on any machine.
Grant all on EJBCA. * to admin @ localhost identified by "123456" with grant option

5. Go to the decompressed directory of EJBCA for execution.
E: \ EJBCA> ant replaceds press ENTER
Buildfile: Build. xml

Replaceds:
[Input] type of database:

(Oracle, MSSQL, MySQL, ipvs, ipvs8, sapdb, HSQLDB, Sybase)
MySQL press ENTER
[Input] Data Source (default Java:/defaultds, recommended Java:/ejbcads ):
Java:/ejbcads press ENTER
[Copy] copying 1 file to E: \ EJBCA \ SRC \ Ca \ META-INF
[Copy] copying 1 file to E: \ EJBCA \ SRC \ Ra \ META-INF
[Copy] copying 1 file to E: \ EJBCA \ SRC \ log \ META-INF
[Copy] copying 1 file to E: \ EJBCA \ SRC \ authorization \ META-INF
[Copy] copying 1 file to E: \ EJBCA \ SRC \ hardtoken \ META-INF
[Copy] copying 1 file to E: \ EJBCA \ SRC \ keyrecovery \ META-INF

Build successful

Execute ant deploy:
E: \ EJBCA> ant deploy

6,
Copy mysql-connector-java-3.1.7-bin.jar
E: \ EJBCA \ JBoss \ Server \ Default \ Lib ($ jboss_home/Server/default/lib /)

7,

Copy E: \ EJBCA \ doc \ mysql-ds.xml to
E: \ EJBCA \ JBoss \ Server \ Default \ deploy

($ Jboss_home/Server/default/deploy /)

Modify the mysql-ds.xml to change the database connection parameters to your actual connection parameters:

<JNDI-Name> ejbcads </JNDI-Name> // Data Source
<User-Name> EJBCA </user-Name>
& Lt; password & gt; 123456 & lt;/password & gt;

User-name password is set based on the actual database connection parameters.

In the following two files, What Is MySQL used for modification?
Standardjbosscmp-JDBC and standardjaws are ing configuration files, which can also be used by default.
Removing the hsqldb-ds.xml is intended not to connect to the default data source.

E: \ EJBCA \ JBoss \ Server \ Default \ conf \ standardjbosscmp-jdbc.xml
($ Jboss_home/Server/default/CONF/standardjbosscmp-jdbc.xml)
Find the following items at the beginning of the file and modify them:

<Jbosscmp-jdbc>

<Defaults>
<Datasource> JAVA:/ejbcads </datasource>
<Datasource-mapping> mysql </datasource-mapping>

E: \ EJBCA \ JBoss \ Server \ Default \ conf \ standardjaws. xml
($ Jboss_home/Server/default/CONF/standardjaws. XML)

Find the following items at the beginning of the file and modify them:
<Jaws>
<Datasource> JAVA:/ejbcads </datasource>
<Type-mapping> mysql </type-mapping>

Note that MySQL is case sensitive.

8. delete all the hsql *. xml files under JBoss (to remove the default data source configuration information)

9. Run JBoss. Everything should be OK.

10,
E: \ EJBCA> install. cmd

Setup of administration Web interface have started, this will take a minute

To complete ....

If JDK is used, no response will be made here.
If you change to JDK, there will be no problem:

Keytool error: Java. Lang. Exception: alias <EJBCA-CA> does not exist
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.

Everything is okay. You can use https: // localhost: 8443/EJBCA/adminweb for access. You can apply for a certificate through http: // localhost: 8080/EJBCA/publicweb

######################################## #####################################
######################################## #####################################
######################################## #####################################
The default installation and configuration process for other databases is as follows:

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

C: \ Documents ents and Settings \ windforce> E:

E: \> Cd EJBCA/EJBCA

E: \ EJBCA> ant
Buildfile: Build. xml

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

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

Apply. War:
[Mkdir] created dir: e: \ EJBCA \ TMP \ publicweb \ apply. War
[Copy] copying 20 files to E: \ EJBCA \ TMP \ publicweb \ apply. War
[Copy] copying 44 files to E: \ EJBCA \ TMP \ publicweb \ apply. War \ WEB-INF \ c
Lasses
[Jar] building jar: e: \ EJBCA \ Dist \ apply. War

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

Webdist. War:
[Mkdir] created dir: e: \ EJBCA \ TMP \ publicweb \ webdist. War
[Copy] copying 7 files to E: \ EJBCA \ TMP \ publicweb \ webdist. War
[Copy] copying 48 files to E: \ EJBCA \ TMP \ publicweb \ webdist. War \ WEB-INF
\ Classes
[Jar] building jar: e: \ EJBCA \ Dist \ webdist. War

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

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

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

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

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

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

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

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

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

Build:

Build successful
Total time: 18 seconds
E: \ 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 E: \ EJBCA \ JBoss \ Server \ Default \ deploy
[Copy] copying e :\ejbca \ EJBCA \ Dist \ ejbca-ca.ear to E: \ EJBCA \ JBoss \ Server \ de
Fault \ deploy \ ejbca-ca.ear

Build successful
Total time: 3 seconds
E: \ EJBCA> install. cmd
Welcome to EJBCA Installation
This script acts as a wizard helping you with the installation of your certificate 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): Y

This installation will create a first administrative ca. This CA will be used to create the first superadministrator and for the SSL server certificate of administrative Web server.

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'): CA
Enter the Distinguished Name of the CA. this is used in the CA certificate to distinguish the CA. (EX 'cn = adminca1, O = primekey solutions AB, c = se'): Cn = Ca, 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 at all. (EX '2. 5.29.32.0'): 192.168.0.17

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

Please enter the computer name of CA server. (EX 'caserver. primekey. se'): Fly-in-sky
Enter the Distinguished Name of the SSL server certificate used by the administrative Web GUI (ex 'cn = caserver. primekey. se, O = primekey solutions AB, c = Se '): Cn = fly-in-sky, c = Cn

Enter a good password for the super administrators keystore. Please remember this one: 000000

You have entered the following data:

CA short name: CA
Distinguished Name CA: Cn = Ca, c = Cn
Keysize of the CA: 2048
Validity in days for the CA: 3650
Policy ID of the CA: 192.168.0.17
Computer Name of CA Server: Fly-in-sky
Distinguished Name of the SSL server certificate: Cn = fly-in-sky, c = Cn
Password for the super administrators keystore: 000000
Is this correct (Yes/No/exit): Y

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

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

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

Keytool error: Java. Lang. Exception: alias <EJBCA-CA> does not exist
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 questions, please contact primekey solutions AB, Sweden at ejbca@primekey.se or www. primekey. se for more information.

E: \ EJBCA>

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.