EJBCA+MySQL准备与安装配置

测试需要  (winxp pro,2003server)   

J2EE jdk 1.5

JBOSS-4.0.4.GA

EJBCA_3_4_1

apache-ant-1.7.0-bin.zip

mysql-4.1.11-win32.zip

mysql-connector-java-3.1.14.zip

jce_policy-1_4_2.zip


步骤

1.安装 J2 EE,mysql 。解压ejbca,jboss,apache-ant,connector,jce_policy。

2.设置环境变量

JAVA_HOME = C:\Sun\AppServer\jdk
JBOSS_HOME = C:\CA\jboss
ANT_HOME = C:\CA\apache-ant-1.6.3beta1

PATH = ;%JAVA_HOME%\BIN;%JBOSS_HOME%\BIN;%ANT_HOME%\bin;
(以上为path中包含)

CLASSPATH= .;% JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib;

将 无限加密包jce_policy_1.4.2 的几个文件覆盖到 %jre path%\lib\security ,覆盖jdk下就行。

3。

安装mysql, 用户名和密码均为root, 创建数据库ejbca(以后设置ejbca和SQL链接时,用这个密码)

* 将mysql-connector-java-5.0.5解压缩后,将其中的mysql-connector-java-5.0.5-bin.jar拷贝到了%JBOSS_HOME%\server\default\lib目录下

将%EJBCA_HOME%\conf\ejbca.properties.sample  复制保存为    %EJBCA_HOME%\conf\ejbca.properties

将%EJBCA_HOME%\conf\web.properties.sample,  复制保存为    %EJBCA_HOME%\conf\web.properties

将%EJBCA_HOME%\conf\database.properties.sample复制保存为  %EJBCA_HOME%\conf\database.properties

并修改如下 (红字为对应修改)

# 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=root
4.cmd到%EJBCA_HOME%目录下,运行ant bootstrap
   并将生成的%EJBCA_HOME%\dist\下的ejbca.ear拷贝到\%jboss-4.0.5%\server\default\deploy(高版本ejbca不需要)
5.运行run.bat启动jboss控制台
6.cmd到%EJBCA_HOME%目录下,运行ant install (安装会生成p12文件,如无此文件,检查前几步是否有漏项)
7.停止JBOSS,%EJBCA_HOME%目录下,运行ant deploy (ejbca配置更改,EX.语言文件修改,需重新deploy)
8.run JBOSS.访问admin需导入p12.

你可能感兴趣的:(java,mysql,jboss,ant,HSQLDB)