先看我遇到的问题,再部署,不走弯路。
一:xpack ca证书不加密部署
1. 环境准备:centos 7.7 ELK 7.6.2
[root@es_master kibana]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
禁用防火墙。或者配置防火墙策略
2. 机器准备
| 机器ip | 安装应用 |
|---|---|
| 192.168.186.132 | es master x-pack |
| 192.168.186.130 | es datanode x-pack |
| 192.168.186.131 | es datenode x-pack |
3. 下载安装包
下载安装包(三台都需要安装解压)
[root@es_master ]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz #下载es
[root@es_master ]#scp elasticsearch-7.6.2-linux-x86_64.tar.gz root@192.168.186.130:/root/
[root@es_master ]#scp elasticsearch-7.6.2-linux-x86_64.tar.gz root@192.168.186.131:/root/
[root@es_master ]# tar -xf elasticsearch-7.6.2-linux-x86_64.tar.gz -C /usr/local/
4. 创建es用户以及目录
创建目录以及用户(三台)
[root@es_node1 ~]#useradd elastic
[root@es_node1 ]# mkdir -p /data/elastic/data
[root@es_node1 ]# mkdir -p /data/elastic/logs
[root@es_node1 ]# chown -R elastic:elastic /data/elastic/data/
[root@es_node1 ]# chown -R elastic:elastic /data/elastic/logs/
给es安装目录授权
[root@es_master local]# pwd
/usr/local
[root@es_master local]# chown -R elastic:elastic elasticsearch-7.6.2
5. 生成ca证书(master节点)
[root@es_master elasticsearch-7.6.2]# pwd
/usr/local/elasticsearch-7.6.2
[elastic@es_master elasticsearch-7.6.2]$ bin/elasticsearch-certutil ca #生成ca证书颁发机构
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.
The 'ca' mode generates a new 'certificate authority'
This will create a new X.509 certificate and private key that can be used
to sign certificate when running in 'cert' mode.
Use the 'ca-dn' option if you wish to configure the 'distinguished name'
of the certificate authority
By default the 'ca' mode produces a single PKCS#12 output file which holds:
* The CA certificate
* The CA's private key
If you elect to generate PEM format certificates (the -pem option), then the output will
be a zip file containing individual files for the CA certificate and private key
Please enter the desired output file [elastic-stack-ca.p12]: #回车默认证书名为elastic-stack-ca.p12
Enter password for elastic-stack-ca.p12 : #是否设置密码 回车为空在下面的配置文件中就不需要添加ca证书的密码
[elastic@es_master elasticsearch-7.6.2]$
[elastic@es_master elasticsearch-7.6.2]$
[elastic@es_master elasticsearch-7.6.2]$ bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.
The 'cert' mode generates X.509 certificate and private keys.
* By default, this generates a single certificate and key for use
on a single instance.
* The '-multiple' option will prompt you to enter details for multiple
instances and will generate a certificate and key for each one
* The '-in' option allows for the certificate generation to be automated by describing
the details of each instance in a YAML file
* An instance is any piece of the Elastic Stack that requires an SSL certificate.
Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats
may all require a certificate and private key.
* The minimum required value for each instance is a name. This can simply be the
hostname, which will be used as the Common Name of the certificate. A full
distinguished name may also be used.
* A filename value may be required for each instance. This is necessary when the
name would result in an invalid file or directory name. The name provided here
is used as the directory name (within the zip) and the prefix for the key and
certificate files. The filename is required if you are prompted and the name
is not displayed in the prompt.
* IP addresses and DNS names are optional. Multiple values can be specified as a
comma separated string. If no IP addresses or DNS names are provided, you may
disable hostname verification in your SSL configuration.
* All certificates generated by this tool will be signed by a certificate authority (CA).
* The tool can automatically generate a new CA for you, or you can provide your own with the
-ca or -ca-cert command line options.
By default the 'cert' mode produces a single PKCS#12 ou

最低0.47元/天 解锁文章
5314

被折叠的 条评论
为什么被折叠?



