open***2.3.12安装与easy-rsa3的使用

本文介绍如何部署Open*** 2.3.12版本及配套使用Easy-RSA3来生成证书的过程。包括安装必要的软件包、编译安装Open***、下载并配置Easy-RSA3以及创建服务器和客户端密钥等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 最近公司要求在内网部署一套open***使用,上网查了一下才发现open***版本已经升级到2.3.12了,其中最主要的改动是源码包里不再包含easy-rsa,如今部署open***要去github上面下载easy-rsa程序,并且easy-rsa也已经升级到了第三个版本(以往easy-rsa2居多),所以决定重新整理一下新版本的open***部署,以及easy-rsa3的使用。


部署open***:

一:yum源安装相关的包:

# yum -y install openssl.x86_64 pam-devel.x86_64


二:安装lzo包,lzo包需源码包编译安装,不然编译open***时会报"lzo missing"的错误:

# tar -zxvf lzo-2.03.tar.gz
# cd lzo-2.03
# ./configure --prefix=/usr/local
# make && make install


三:编译安装open***:

# tar -zxvf open***-2.3.12.tar.gz
# cd open***-2.3.12
# ./configure --prefix=/opt/apps/open***
# make && make install


四:获取easy-rsa3应用:

 创建etc目录,从https://github.com/Open***/easy-rsa下载easy-rsa3程序包:

# mkdir /opt/apps/open***/etc && cd /opt/apps/open***/etc
# unzip easy-rsa-master.zip
# cd easy-rsa-master && mv ../easyrsa3 && cd ..

 以上,就获取到了easyrsa3程序,easyrsa目录结构如下:

# tree easyrsa3/
easyrsa3/
├── easyrsa
├── openssl-1.0.cnf
├── vars.example
└── x509-types
    ├── ca
    ├── client
    ├── COMMON
    └── server

 可以看到easy-rsa3中,少了2版本中的许多执行文件,只剩下easyrsa一个执行文件,使用这个文件,就可以创建各种所需的密钥文件。



五:创建服务端与客户端密钥:

 服务端:(这里采用无密码方式创建相关文件,避免后期输入pam密码的各种麻烦)

# cp -rp easyrsa3 key_server
# cd key_server


----var文件-----------
# mv vars.example vars


----初始化pki目录------
# ./easyrsa init-pki
Note: using Easy-RSA configuration from: ./vars
init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /opt/apps/open***/etc/key_server/pki


----以无密码方式,创建服务器ca文件-----
# ./easyrsa build-ca nopass
Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
................................................................+++
......................+++
writing new private key to '/opt/apps/open***/etc/key_server/pki/private/ca.key.xyvUlxOV9t'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [Easy-RSA CA]:
CA creation complete and you may now import and sign cert requests.
Your new CA certificate file for publishing is at:
/opt/apps/open***/etc/key_server/pki/ca.crt


----创建服务端key文件--------
# ./easyrsa gen-req cmhserver nopass
Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
...................................+++
...................................................+++
writing new private key to '/opt/apps/open***/etc/key_server/pki/private/cmhserver.key.0S1X7d4NCP'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [cmhserver]:
Keypair and certificate request completed. Your files are:
req: /opt/apps/open***/etc/key_server/pki/reqs/cmhserver.req
key: /opt/apps/open***/etc/key_server/pki/private/cmhserver.key


----注册服务端CN名,生产服务端crt文件------
# ./easyrsa sign server cmhserver
Note: using Easy-RSA configuration from: ./vars
You are about to sign the following certificate.
Please check over the details shown below for accuracy. Note that this request
has not been cryptographically verified. Please be sure it came from a trusted
source or that you have verified the request checksum with the sender.
Request subject, to be signed as a server certificate for 3650 days:
subject=
    commonName                = cmhserver
Type the word 'yes' to continue, or any other input to abort.
  Confirm request details: yes
Using configuration from /opt/apps/open***/etc/key_server/openssl-1.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'cmhserver'
Certificate is to be certified until Oct 29 03:51:14 2026 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
Certificate created at: /opt/apps/open***/etc/key_server/pki/issued/cmhserver.crt


------dh.pem文件生产-------
# ./easyrsa gen-dh
Note: using Easy-RSA configuration from: ./vars
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
.................................................................................................................................................................+.................................................................................................................+................+..........................................................................................................................................+..........................................................................+.........+..............+..+..............................................................................................................................................................+...............................................................+.............................................+..................................................................................................................+..................................................+.................................................................................+..........+................................................................................................................+............................................................+..+...........+..................................................................+..............+..........................................................................+.+........+........................................................................................................................................................+..................++*++*
DH parameters of size 2048 created at /opt/apps/open***/etc/key_server/pki/dh.pem

 

 客户端:

# cd /opt/apps/open***/etc
# cp -rp easyrsa3 key_client
# cd key_client

----var文件-----------
# mv vars.example vars


----初始化pki目录------
# ./easyrsa init-pki
Note: using Easy-RSA configuration from: ./vars
init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /opt/apps/open***/etc/key_server/pki


----以无密码方式,创建客户端key文件-----
# ./easyrsa gen-req cmhclient nopass

Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
...............+++
..........................+++
writing new private key to '/opt/apps/open***/etc/key_client/pki/private/cmhclient.key.RM36zZRxnc'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [cmhclient]:

Keypair and certificate request completed. Your files are:
req: /opt/apps/open***/etc/key_client/pki/reqs/cmhclient.req
key: /opt/apps/open***/etc/key_client/pki/private/cmhclient.key


-----进入服务端key目录,关联客户端req,使之向服务端注册----
# cd ../key_server/
# ./easyrsa import-req /opt/apps/open***/etc/key_client/pki/reqs/cmhclient.req cmhclient

Note: using Easy-RSA configuration from: ./vars

The request has been successfully imported with a short name of: cmhclient
You may now use this name to perform signing operations on this request.


-----注册客户端CN名,生产客户端key文件-------
# ./easyrsa sign client cmhclient

Note: using Easy-RSA configuration from: ./vars


You are about to sign the following certificate.
Please check over the details shown below for accuracy. Note that this request
has not been cryptographically verified. Please be sure it came from a trusted
source or that you have verified the request checksum with the sender.

Request subject, to be signed as a client certificate for 3650 days:

subject=
    commonName                = cmhclient


Type the word 'yes' to continue, or any other input to abort.
  Confirm request details: yes
Using configuration from /opt/apps/open***/etc/key_server/openssl-1.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'cmhclient'
Certificate is to be certified until Oct 29 03:54:56 2026 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

Certificate created at: /opt/apps/open***/etc/key_server/pki/issued/cmhclient.crt

 

六:服务端配置,指定相关ca、crt、key文件,打开服务器路由转发以及防火墙转发:

# cp /opt/src/open***-2.3.12/sample/sample-config-files/server.conf /opt/apps/open***/etc/
# grep -v "^#" server.conf | grep -v "^;" | grep -v "^$"
local 192.168.52.135
port 1194
proto tcp
dev tun
ca /opt/apps/open***/etc/key_server/pki/ca.crt
cert /opt/apps/open***/etc/key_server/pki/issued/cmhserver.crt
key /opt/apps/open***/etc/key_server/pki/private/cmhserver.key
dh /opt/apps/open***/etc/key_server/pki/dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status open***-status.log
verb 3

打开服务器的ip路由转发功能,并生效;

# grep ipv4 /etc/sysctl.conf
net.ipv4.ip_forward= 1
# sysctl -p
net.ipv4.ip_forward= 1
# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -jMASQUERADE


七:开启服务以及客户端配置:

# /opt/apps/open***/sbin/open*** --daemon --config /opt/apps/open***/etc/server.conf


客户端下载如下文件,并应用,即可使用密钥使用***:(各系统的客户端配置不一,故这里不赘述客户端配置)

/opt/apps/open***/etc/key_server/pki/ca.crt

/opt/apps/open***/etc/key_client/pki/private/cmhclient.key

/opt/apps/open***/etc/key_server/pki/issued/cmhclient.crt






easy-rsa-old-master.zip . ├── configure.ac ├── COPYING ├── COPYRIGHT.GPL ├── distro │   ├── Makefile.am │   └── rpm │   ├── easy-rsa.spec.in │   └── Makefile.am ├── doc │   ├── Makefile.am │   ├── README-1.0 │   └── README-2.0 ├── easy-rsa │   ├── 1.0 │   │   ├── build-ca │   │   ├── build-dh │   │   ├── build-inter │   │   ├── build-key │   │   ├── build-key-pass │   │   ├── build-key-pkcs12 │   │   ├── build-key-server │   │   ├── build-req │   │   ├── build-req-pass │   │   ├── clean-all │   │   ├── list-crl │   │   ├── make-crl │   │   ├── openssl.cnf │   │   ├── revoke-crt │   │   ├── revoke-full │   │   ├── sign-req │   │   └── vars │   ├── 2.0 │   │   ├── build-ca │   │   ├── build-dh │   │   ├── build-inter │   │   ├── build-key │   │   ├── build-key-pass │   │   ├── build-key-pkcs12 │   │   ├── build-key-server │   │   ├── build-req │   │   ├── build-req-pass │   │   ├── clean-all │   │   ├── inherit-inter │   │   ├── list-crl │   │   ├── openssl-0.9.6.cnf │   │   ├── openssl-0.9.8.cnf │   │   ├── openssl-1.0.0.cnf │   │   ├── pkitool │   │   ├── revoke-full │   │   ├── sign-req │   │   ├── vars │   │   └── whichopensslcnf │   └── Windows │   ├── build-ca.bat │   ├── build-ca-pass.bat │   ├── build-dh.bat │   ├── build-key.bat │   ├── build-key-pass.bat │   ├── build-key-pkcs12.bat │   ├── build-key-server.bat │   ├── build-key-server-pass.bat │   ├── clean-all.bat │   ├── index.txt.start │   ├── init-config.bat │   ├── README.txt │   ├── revoke-full.bat │   ├── serial.start │   └── vars.bat.sample └── Makefile.am
<think>好的,我需要帮助用户找到Spring Boot 2.3.12兼容的spring-boot-starter-messaging版本。首先,我应该回忆一下Spring Boot的版本管理机制。根据引用[1],Spring Boot项目通常通过spring-boot-starter-parent或spring-boot-dependencies来管理依赖版本,这样可以避免手动指定每个依赖的版本号。 接下来,用户提到的spring-boot-starter-messaging可能是指某个特定于消息传递的starter,比如Spring for Apache Kafka(spring-boot-starter-kafka)或RabbitMQ(spring-boot-starter-amqp)。不过官方并没有一个名为spring-boot-starter-messaging的标准starter,用户可能是指其中一个具体的消息中间件starter。需要确认这一点,但根据用户的问题,假设他们指的是某个消息相关的starter,比如Kafka或RabbitMQ。 根据Spring Boot的版本规则,每个Spring Boot版本会对应一组兼容的依赖版本。例如,Spring Boot 2.3.12会指定对应的Spring Kafka或Spring AMQP版本。用户需要查找对应2.3.12的starter版本,可以通过查看官方文档或Maven仓库来确定。 另外,引用[2]提到spring-boot-starter-web包含了spring-boot-starter,这说明starter之间可能存在继承关系。但这里的关键是确定消息starter的版本。通常,这些starter的版本Spring Boot主版本一致,比如2.3.12.RELEASE。因此,用户可以直接使用对应的starter版本,例如: 对于RabbitMQ: ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> <version>2.3.12.RELEASE</version> </dependency> ``` 或者对于Kafka: ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-kafka</artifactId> <version>2.3.12.RELEASE</version> </dependency> ``` 不过需要验证这些版本是否实际存在。查看Maven中央仓库,确实存在这两个starter的2.3.12.RELEASE版本。因此,用户只需根据他们使用的具体消息中间件选择对应的starter,并指定Spring Boot相同的版本号即可。 此外,引用[3]提到整合JPA时的starter使用,这说明在数据访问层,版本匹配同样重要。同样的原则适用于消息starter,确保版本一致以避免兼容性问题。 总结步骤: 1. 确认用户具体需要的消息中间件(如RabbitMQ、Kafka等)。 2. 查找对应Spring Boot 2.3.12版本的starter,通常版本号Spring Boot一致。 3. 建议用户检查官方文档或Maven仓库以确认版本兼容性。</think>要确定Spring Boot 2.3.12兼容的`spring-boot-starter-messaging`版本,需根据Spring Boot的依赖管理机制进行匹配。以下是具体步骤: ### 1. **理解Spring Boot版本管理** Spring Boot通过`spring-boot-starter-parent`或`spring-boot-dependencies`统一管理所有官方Starter的版本[^1]。因此,**官方Starter的版本通常Spring Boot主版本一致**。例如,Spring Boot 2.3.12对应的Starter版本应为`2.3.12.RELEASE`。 ### 2. **确认Starter名称** Spring Boot官方未提供名为`spring-boot-starter-messaging`的Starter,可能涉及以下消息中间件相关的Starter: - **RabbitMQ**: `spring-boot-starter-amqp` - **Apache Kafka**: `spring-boot-starter-kafka` - **JMS (ActiveMQ等)**: `spring-boot-starter-artemis`或`spring-boot-starter-activemq` 以`spring-boot-starter-amqp`(RabbitMQ)为例,其兼容版本可直接使用`2.3.12.RELEASE`: ```xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> <version>2.3.12.RELEASE</version> </dependency> ``` ### 3. **验证版本兼容性** - **官方文档**: 查看[Spring Boot 2.3.12 Release Notes](https://github.com/spring-projects/spring-boot/releases/tag/v2.3.12.RELEASE)或对应模块的文档。 - **Maven仓库**: 在[Maven Central](https://search.maven.org/)搜索Starter,确认`2.3.12.RELEASE`是否存在。 ### 4. **依赖继承(可选)** 若项目继承了`spring-boot-starter-parent`,则无需手动指定版本号: ```xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.12.RELEASE</version> </parent> ``` 此时依赖声明可简化为: ```xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> ``` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值