This document is an EJBCA configuration record for Windows. Many online documents are referenced in the configuration process. Thank you.
See http://job2job.blog.163.com/blog/static/1416633120071162154863/
Http://www.cnblogs.com/luoxiao/archive/2008/01/12/1035963.html
Required software:
1. http://java.sun.com/jdk1.5.0 _ 9/
2. JBOSS-4.2.2.GA http://sourceforge.net/project/showfiles.php? Group_id = 22866 & package_id = 16942 & release_id = 548923
3. ejbca_3_5_4.zip http://ejbca.sourceforge.net/download.htm
Http://sourceforge.net/project/showfiles.php? Group_id = 39716 & package_id = 108797
4. apache-ant-1.7.0-bin.zip http://apache.mirror.phpchina.com/ant/binaries/apache-ant-1.7.0-bin.zip
5. mysql5.0
6. jce_policy-1_5_0.zip http://java.sun.com/javase/downloads/index_jdk5.jsp
7. mysql-connector-java-5.0.6.zip http://download.softagency.net/MySQL/Downloads/Connector-J/
1. Set Environment Variables
Java_home = D: \ Java \ JDK
Ejbca_home = D: \ EJBCA
Jboss_home = D: \ EJBCA \ JBoss
Ant_home = D: \ EJBCA \ apache-ant-1.7.0
Path = path; % java_home % \ bin; % jboss_home % \ bin; % ant_home % \ bin;
Classpath =.; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar; % java_home % \ Lib;
2. MySQL path D: \ mysql username and password: Root, 123456
The username and password used to create the database EJBCA to connect to the database are also root, which is configured after 123456.
3. Copy the mysql-connector-java-5.0.6-bin.jar to D: \ EJBCA \ JBoss \ Server \ Default \ Lib
The following are some configuration file modifications of EJBCA, which refer to others' blogs:
Copy % ejbca_home % \ conf \ EJBCA. properties. Sample and save it as % ejbca_home % \ conf \ EJBCA. properties.
% Ejbca_home % \ conf \ Web. properties. sample, copy and save as % ejbca_home % \ conf \ Web. properties. To set the display Chinese interface, modify the following (the red letter indicates the corresponding modification)
# Defines the available ages by using agecodes separated with a comma (example en, ZH ).
# If you are not sure that you know how to add a new language (languagefile. XX. properties etc ),
# We suggest you stick with the default the first time you install If you wan't to add your own language.
# Otherwise you may not be able to log in to the admin-Gui.
# Default: En, FR, IT, es, Se, ZH
Web. availablelanguages = ZH, en, FR, IT, es, se
# Default content encoding used to display JSP pages, for example ISO-8859-1, UTF-8 or GBK.
# Default: ISO-8859-1
Web. contentencoding = GBK
Copy % ejbca_home % \ conf \ database. properties. Sample and save it as % ejbca_home % \ conf \ database. properties, and modify it as follows (the red letter indicates the corresponding modification)
# Default: HSQLDB
Database. Name = MySQL
# The datasource mapping selected for deployment.
# The J2EE server needs to be configured with the appropriate datasource mapping.
# For JBoss this maps to a setting in standardjbosscmp-jdbc.xml and must match the database chosen above.
# All supported mappings are defined below, others can easily be added
# Default: Hypersonic SQL
Datasource. Mapping = MySQL
# Database connection URL.
# This is the URL used to connect to the database, used to configure a new datasource in JBoss.
# Default: JDBC: HSQLDB :$ {JBoss. server. Data. dir }$ {/} hypersonic $ {/} localdb
Database. url = JDBC: mysql: // 127.0.0.1: 3306/EJBCA? Characterencoding = UTF-8
# JDBC driver classname.
# The J2EE server needs to be configured with the appropriate JDBC driver for the selected Database
# Default: org. HSQLDB. jdbcdriver
Database. Driver = com. MySQL. JDBC. Driver
# Database username.
# Default: SA (works with HSQLDB)
Database. Username = root
# Database Password.
# Default: (Blank works with HSQLDB)
Database. Password = 1234564. After the JCE is decompressed, the JAR file overwrites the JAR file under JDK/JRE/lib/security.
5. Ant Bootstrap under EJBCA
CMD to the directory % ejbca_home %, run ant Bootstrap, and run EJBCA under % ejbca_home % \ Dist. ear copy to \ % jboss-4.0.5 % \ Server \ Default \ deploy (later versions EJBCA do not need, will automatically copy the past)
6. Start JBoss. % Boss_home %/run. bat
Note: You must start the MySQL database before ant install. Otherwise, the p12 file cannot be generated. My MySQL is started manually. Therefore, it is null in the p12 folder after ant install several times. Later I found that MySQL was not started.
In manual.htm of ejbca, ant install can only run once. When the installation fails and re-installs, remember to drop EJBCA in MySQL and re-establish it.
7 .. % Ejbca_home %/ant install
8. Stop JBoss
9.% ejbca_home % directory, run ant deploy. The whole system will be re-deployed and sevlet container will be configured with the keystore.
10. Import the % ejbca_home %/P12/superadmin. p12 certificate to the browser. The default password is EJBCA. During the import process, select the Browser Internet option-> content tab-> certificate button-> Import button. The import certificate dialog box is displayed.
11. Restart JBoss.
12. log on to http: // localhost: 8080/EJBCA/
13. Go to Adminstrator and the browser will ask you to select a certificate. Select the previously imported admincache.
Some errors occur during installation:
I'm not sure if the cacerts file under % java_home %/JRE/lib/security/will be modified for EJBCA installation. Someone said in the blog that JDK should be reinstalled to restore cacerts after the installation fails, but I found that the cacerts file does not change before and after JDK installation. We recommend that you back up the file before installation.
In this way, after the first installation failure, you do not need to reinstall the JDK. You only need to restore the file.