易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 5|回复: 0
收起左侧

配置es的鉴权账号 Elasticsearch开启安全认证详细步骤

[复制链接]
发表于 2024-10-31 15:00:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
启动集群:
* v$ M+ m8 p. V& _$ N+ g0 }! t2 O; e, k, @2 ]7 S4 f
前提:设置好系统配置和JVM堆内存
5 k) y- M+ R7 A2 T) [' R* c. ]0 v. \0 I, [! u  u9 h0 g
创建elastic的数据和日志存放目录,如果是测试环境无所谓,如果是生成环境一定要单独设置数据和日志存放的路径,因为ES可能因为升级或其它原因把原有的数据清理或丢失等因素$ }" b6 L: W! F5 Y
8 ?6 g+ A. h* P8 Q; m
* A7 N' {& {: x1 \; V. D6 \: j

& O1 J/ T! O$ |5 K; g" }8 P  f* g$ ~* I: a, ^- \8 N: h! n
配置文件属组权限,并启动+ ^6 [1 {9 Q  `: T
[root@it-elassearch elasticsearch]# chown -R es:es elastic-cluster1/* x/ D4 a, P) h: |0 a- \
[root@it-elassearch-2 elasticsearch]# chown -R es:es elastic-cluster2/  C9 N0 k; n5 L* x% {9 P+ R: [( k

* n; f* I7 t" ?1 X% Z# P

2 _# F2 @" N6 w' @) D% M" q' t2 Q( ^6 y$ i7 N; a6 F
如果添加鉴权配置请按照此处配置,不配置即可略过:
4 d/ p: p2 l: G

% b7 B% F! [8 a; U( M* ?& q& w9 u
. P$ ~2 T/ `3 q% t  j4 |! }7 T
生成密匙:! ~2 r4 e+ E4 u. `5 h
[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil ca
9 l3 s; V  z# Q- a: k* c* TThis tool assists you in the generation of X.509 certificates and certificate
3 [/ m0 n  R. |4 T! \' Usigning requests for use with SSL/TLS in the Elastic stack.6 x6 q- A+ N3 ~4 ]# O

* E. b. T+ d- S! d, L& d' g1 m+ Z
) n/ H+ B( h4 A
The 'ca' mode generates a new 'certificate authority'1 _+ t( [8 z. x' _! W
This will create a new X.509 certificate and private key that can be used: ]# H! z2 X3 ]; q
to sign certificate when running in 'cert' mode.
0 h9 |8 r. l% o. C' n$ ?; S, h" R( Z4 G# f: s, y
4 C' Z& r' c/ t) l1 i
Use the 'ca-dn' option if you wish to configure the 'distinguished name'
3 W7 y: P7 s$ G1 ^4 uof the certificate authority- t* ]# s& c3 M: W
- X/ r  d  D) _& N

- g8 c0 Z5 ?. A; M/ _2 |( YBy default the 'ca' mode produces a single PKCS#12 output file which holds:3 k/ Y3 |- D! `% C' N9 I
    * The CA certificate
) h' w! r1 N3 [+ |+ j( J    * The CA's private key
  x# w" r( g% `5 R( a$ F
( z2 B& H  _. E# c( R8 |' l
, X$ z! g. R+ W, L/ l8 f) {' @
If you elect to generate PEM format certificates (the -pem option), then the output will
4 x. Q9 p3 @2 V# G+ L- abe a zip file containing individual files for the CA certificate and private key
9 L1 Q+ |! L1 U: |% @- E2 j
* `) A/ G# X% S$ k, B' ]) |
Please enter the desired output file [elastic-stack-ca.p12]:         【这里忽略,直接回车进入下面输入密码:】3 a: x4 P% V& Q
Enter password for elastic-stack-ca.p12 :    【输入密码】
" F- a3 m! V3 S0 W0 D

( l; H+ a* [: h$ i
& I/ w/ V' ]! F( [% n. k

+ B% b4 c6 }1 t  ~! x
[es@it-elassearch elasticsearch-8.15.0]$ ll
- g) ^# {! \  J8 m6 c* Rtotal 2268
! {; U& P, A  Y......
( Q6 O& U- ~3 y: n-rw-------  1 es es    2672 Oct 28 17:05 elastic-stack-ca.p12
  y1 C4 q6 V3 ]......
  O' X  r8 t$ a! `5 |9 Z$ m+ P

. b0 ~# q' h3 U5 E4 D0 F3 @

' G9 q6 ^6 _* |' H7 W3 Q; g
6 K+ k" a7 X( [! i0 p* H: d$ }& L/ M, j: m& C4 b$ ?

9 j- Z5 S1 V9 p( d! k, t" L" m0 {5 q/ @
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil ca' H0 |* i: p% c2 A# e
This tool assists you in the generation of X.509 certificates and certificate
4 n7 T6 @; ?  w4 h% c, _5 r4 V- {signing requests for use with SSL/TLS in the Elastic stack.+ ]' _8 S, x! m4 s: @

/ a+ _% I& Q, V- T
6 o* Q- t; F7 N" r' [# n+ a
The 'ca' mode generates a new 'certificate authority'
. N9 Y3 T9 [4 A/ t4 U! ^* D. |5 ]3 QThis will create a new X.509 certificate and private key that can be used
. _! t/ e1 |6 r5 {  b$ v7 Ito sign certificate when running in 'cert' mode.
" x% e4 a# b* a1 g' o
/ }' j6 k# E7 l- h. [+ `

! T: Y7 _+ O5 Z# z1 UUse the 'ca-dn' option if you wish to configure the 'distinguished name'
$ l  l% Y1 K/ b/ ]/ I& ]2 Wof the certificate authority
4 u& J4 @: e- ^8 P
! T. D( o  H# L. W

4 |! G' [8 t) k2 o% DBy default the 'ca' mode produces a single PKCS#12 output file which holds:
+ @+ @3 {, Q$ y+ J# r+ m    * The CA certificate
% W( I2 ?- y+ O- F    * The CA's private key
5 A' x; A) l; Z+ `* c7 s: F  X1 N/ n  K0 D
. N; o" b5 I! E$ S( ~6 |' T
If you elect to generate PEM format certificates (the -pem option), then the output will
8 J( g0 M7 P5 i* A. fbe a zip file containing individual files for the CA certificate and private key
3 _  ~) G. k, G0 F/ Q2 u4 s4 i1 N6 j% y1 v) i+ E  D

+ w3 y: U4 f. r, }Please enter the desired output file [elastic-stack-ca.p12]:0 a% _3 W, E) ^* x' }+ I
Enter password for elastic-stack-ca.p12 :9 z" O: U' p% i  y
6 `* r/ b2 k0 k3 w4 |) ]
; a$ @; g$ X+ A  M% o
生成密钥:
2 `6 `% }, g) O2 o& d3 f" R* D! L- Q$ _

/ ]/ ]% T9 R/ Y3 Y

) t- |* A/ ~5 {1 [* T( Q[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
/ y. {! K7 b1 t4 U2 D9 [/ ZThis tool assists you in the generation of X.509 certificates and certificate
* y6 h* W. k: k( o7 }signing requests for use with SSL/TLS in the Elastic stack.
- }! w: Y5 }6 j/ E* D
, u, W9 ]$ l% o$ mThe 'cert' mode generates X.509 certificate and private keys.+ l  m0 \" T" W( v: x8 W/ ^0 Q
    * By default, this generates a single certificate and key for use! L, b3 J: h+ f4 L2 N$ [
       on a single instance.
$ k( k; d: j1 v, R4 b- U0 D/ ]    * The '-multiple' option will prompt you to enter details for multiple, S# s. f. n) e4 s) U
       instances and will generate a certificate and key for each one  [; a3 }1 C2 G' k8 K" e7 t# D3 M" L4 f
    * The '-in' option allows for the certificate generation to be automated by describing
& B& f& q  N- x. ?6 p       the details of each instance in a YAML file
. G* s, M" k0 V2 ^0 N8 S8 Y9 c$ Z& |2 ~2 ]
    * An instance is any piece of the Elastic Stack that requires an SSL certificate.
% _8 T. T6 u2 T- F      Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats
8 @; a$ |& R* I0 z      may all require a certificate and private key.
& P* p% ?( n: w% q8 Y. B1 ?    * The minimum required value for each instance is a name. This can simply be the
  I2 K) i; \- h      hostname, which will be used as the Common Name of the certificate. A full
8 e7 f+ c4 C* b2 W' W% `      distinguished name may also be used.
0 _% S/ \. G& }0 |3 K7 z    * A filename value may be required for each instance. This is necessary when the
8 Z- z" B3 ^! J      name would result in an invalid file or directory name. The name provided here% ]# k& K" [7 P& N5 b6 c6 s: t
      is used as the directory name (within the zip) and the prefix for the key and
( L8 E9 m4 f" L  ^8 w      certificate files. The filename is required if you are prompted and the name  O; r- J1 o7 R0 d
      is not displayed in the prompt.
; @* c0 G- C9 _0 f4 |9 ^, ]4 c& g    * IP addresses and DNS names are optional. Multiple values can be specified as a! O% q* F1 x' K+ T
      comma separated string. If no IP addresses or DNS names are provided, you may
" b5 q3 h+ M9 |+ P4 c' r( q      disable hostname verification in your SSL configuration.
6 x- |% l  u5 s2 \8 H- H7 i1 Z' t' W6 ^8 I0 K. ]* y; D

0 U* Y. B$ d- k" M' U+ S' g    * All certificates generated by this tool will be signed by a certificate authority (CA)/ Z9 g8 ~2 [; c
      unless the --self-signed command line option is specified.
& B0 N0 \) Z5 H      The tool can automatically generate a new CA for you, or you can provide your own with3 b. D% `+ x# m9 |2 k& r9 R
      the --ca or --ca-cert command line options.
3 G5 k/ M8 b2 P2 |* T- s/ f! \0 n7 w9 d" r7 S# h7 o! P2 `

& N. r" S9 o7 @! W! @By default the 'cert' mode produces a single PKCS#12 output file which holds:
+ L2 J) t0 Q  [& m/ D" Z$ \    * The instance certificate- ^; n9 {: s+ p( d9 w0 h7 S
    * The private key for the instance certificate3 N- \) T8 R' c* `% C  P) L$ H2 P
    * The CA certificate
% n7 x! s  ~/ y( R5 R3 F* P' W" A  W
If you specify any of the following options:
8 l- F* W; S/ e  L+ p5 f! @, C    * -pem (PEM formatted output)
  p+ F1 m- y3 l    * -multiple (generate multiple certificates)
& l5 j( X( F. v2 `( R+ B( w. E    * -in (generate certificates from an input file)1 N9 E1 _6 E# V2 I+ A! e
then the output will be be a zip file containing individual certificate/key files$ w2 Y: e6 a; E) G3 _4 |
  z  f0 Z7 X3 X2 Y: B7 _. d
Enter password for CA (elastic-stack-ca.p12) :      【输入密码】
, F4 V6 h, }5 e. O# k/ T: \Please enter the desired output file [elastic-certificates.p12]:      【直接回车】
# r. F6 h$ r7 bEnter password for elastic-certificates.p12 :     【再次输入密码】9 O) I. @5 _; D% T% o, y

3 [! O$ A, O7 u- W% lCertificates written to /data/elasticsearch/elastic-cluster1/elasticsearch-8.15.0/elastic-certificates.p12
! z  G' V3 r2 L+ X7 K8 p  Y$ g# J. Q, u2 E- _  ~
This file should be properly secured as it contains the private key for
" ^& R) L$ z! W1 z- vyour instance.
, X6 ]& E" Y' E1 e6 KThis file is a self contained file and can be copied and used 'as is'( Y, Z6 i4 \6 O- h
For each Elastic product that you wish to configure, you should copy. ]4 j0 l2 W: `# Q8 f
this '.p12' file to the relevant configuration directory
' z: N" x. [) ]' M/ ?7 pand then follow the SSL configuration instructions in the product guide.
: c5 V+ D! l6 B. b5 g/ N# \) r% q7 T% P4 F6 t4 q
For client applications, you may only need to copy the CA certificate and
! W7 u8 h( ?% i. L5 Bconfigure the client to trust this certificate.6 e5 k$ S! J6 N2 K; X  B
- J) B6 r7 l& g! }* d) c

+ c. k# S" P3 l; }2 y# U
; Y: r; {9 P' `, s2 l/ y. |* b[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
# b" t( r/ M$ Y+ r1 QThis tool assists you in the generation of X.509 certificates and certificate
0 ^( x4 K  y- u$ Rsigning requests for use with SSL/TLS in the Elastic stack.
" L' k# k' U. `; h$ U2 T5 {9 _- S) `7 N+ u
The 'cert' mode generates X.509 certificate and private keys.; W. b1 F5 c. }0 J- }  D) n6 e
    * By default, this generates a single certificate and key for use
# d# m; V) U" e/ @- ~; M$ g       on a single instance.
' T) D: M8 z) ~% I    * The '-multiple' option will prompt you to enter details for multiple5 Y! I' N( _. u% m# N% F$ w* n1 `
       instances and will generate a certificate and key for each one, h6 ~/ W0 [% t
    * The '-in' option allows for the certificate generation to be automated by describing
; F7 F5 S! P% {       the details of each instance in a YAML file
; F8 ~" z0 x' i( a! }% _3 f; ?" j5 q6 q5 D- I% t
    * An instance is any piece of the Elastic Stack that requires an SSL certificate.
# l7 m8 p' K# ~- Q      Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats
# y/ y7 ]+ @" O) K  v* e! ]4 l. A  Q      may all require a certificate and private key.0 t4 p) j7 W1 s+ b) c+ F
    * The minimum required value for each instance is a name. This can simply be the
5 w- ]* W- l; h- R/ \      hostname, which will be used as the Common Name of the certificate. A full
: z2 @; p8 @* o& @7 c: V! x1 ?5 L7 [      distinguished name may also be used.! e( ~  j6 V2 t% u0 r
    * A filename value may be required for each instance. This is necessary when the
# e- I* B: O4 r      name would result in an invalid file or directory name. The name provided here" k, z2 Q7 a" f
      is used as the directory name (within the zip) and the prefix for the key and% K/ S7 q7 Y! _( [4 \2 a8 x0 p
      certificate files. The filename is required if you are prompted and the name
  ^1 F) s* R: X      is not displayed in the prompt.2 ]- g- u6 o5 N- o5 T( Q
    * IP addresses and DNS names are optional. Multiple values can be specified as a
. f  W9 B$ V( t% F      comma separated string. If no IP addresses or DNS names are provided, you may
3 }& v: M& V1 a9 v  G3 A      disable hostname verification in your SSL configuration.
# K* B* ?" w0 B8 B
! K5 j& D9 ]6 [/ m; o8 `
" u6 l+ R9 F, z    * All certificates generated by this tool will be signed by a certificate authority (CA): l, W7 G! z7 V- `
      unless the --self-signed command line option is specified.1 M  T$ ^& v! z. ^: [4 M
      The tool can automatically generate a new CA for you, or you can provide your own with4 T" O7 N" D5 v7 X) x
      the --ca or --ca-cert command line options.
$ F5 G& U) l4 Z7 J  r1 Z% w
1 c& _; u" _  i3 k: M- w( F6 ~$ O' T
By default the 'cert' mode produces a single PKCS#12 output file which holds:
2 R  b, I. F* W) o' W: C+ }8 j) j4 n    * The instance certificate& E5 w- ^& L, m* ^
    * The private key for the instance certificate7 t+ S2 D! z$ S/ K
    * The CA certificate
* s' J1 j/ ^% u; e  I4 Q5 F" `, K* v
If you specify any of the following options:- j# F1 W( n( D5 S, ^) G5 _$ U
    * -pem (PEM formatted output)
* h: V" r) i3 n' e    * -multiple (generate multiple certificates)+ G& e- A* o3 s4 J0 P; O  R
    * -in (generate certificates from an input file)! N7 o) ?1 H# O' t+ v# m% d% [4 N
then the output will be be a zip file containing individual certificate/key files1 I. S% K3 a' j9 n2 M. i, p. g. J

/ t! L. a1 F; WEnter password for CA (elastic-stack-ca.p12) :   【输入密码】. B# I% ]2 T; Z/ D5 @/ y+ r& F
Please enter the desired output file [elastic-certificates.p12]:     【直接回车】
! Z5 e7 |7 W" t7 j, c4 J$ Y' R7 PEnter password for elastic-certificates.p12 :   【输入密码】
4 E( M( W+ a; J1 X9 Y2 P
' u$ O5 q* v0 P+ S+ @5 O/ FCertificates written to /data/elasticsearch/elastic-cluster2/elasticsearch-8.15.0/elastic-certificates.p12
' P0 ?* ]8 b" f6 Z9 m9 M* j6 K& U# ^% B/ N
This file should be properly secured as it contains the private key for
" c& H3 ?& J: b$ ]3 s( O, G* yyour instance.
5 W: P' N; K: `This file is a self contained file and can be copied and used 'as is'  W; D0 ^' C1 e" x# N/ g9 H
For each Elastic product that you wish to configure, you should copy; d1 f5 |( z$ y. R5 w8 I8 c
this '.p12' file to the relevant configuration directory
5 D1 I' n# s" p& \5 j7 j4 u# L8 x. Gand then follow the SSL configuration instructions in the product guide.% s. A. P# S9 t3 {, i4 v6 ]
+ ]; k$ @1 F7 e
For client applications, you may only need to copy the CA certificate and
$ o& d8 n' [- H( o& ]* V" \+ g) lconfigure the client to trust this certificate.% J% O, Q, q: E9 T& P) u

5 O1 y. q6 {# c/ B, o6 y, O7 a
9 c+ J5 P6 E! Z$ l  a##将凭证迁移到指定的目录:
/ u+ M  V- o* d$ ?9 g创建目录:: m" M! F8 m- K! V; I: o0 O
mkdir -p ./config/certificates/
6 }6 H/ _# j. l' n4 \移动凭证到指定目录下:
* u3 k/ J/ [0 gmv elastic-certificates.p12 ./config/certificates/
2 q! z) l4 a* k
# X: H5 i& F$ w! ?; \赋于权限:+ g& ?8 u: C+ _. b6 l$ M

! ~( v9 k- G1 Q1 |+ a
* A, D! G# l6 M- r; p# z[es@it-elassearch elasticsearch-8.15.0]$ rsync -azvP -e 'ssh -p 22' config/certificates/elastic-certificates.p12 es@172.24.110.126:/data/elasticsearch/elastic-cluster2/elasticsearch-8.15.0/config/certificates/elastic-certificates.p12, L# w+ R; }0 E/ Q$ O) U- N
The authenticity of host '[172.24.110.126]:22 ([172.24.110.126]:22)' can't be established.+ }  K" n7 @" e& S/ }  P
ECDSA key fingerprint is SHA256:Tvzi0ICzurMYEPySzerkOmwk/o7XHxmABVKRigofHzg.
: H9 q% g; P3 Y# G  F# ?: R1 x* iECDSA key fingerprint is MD5:f0:92:26:fd:da:d3:e4:db:be:36:b1:fe:d6:2b:65:25.
  g, k7 \4 M2 N) v: uAre you sure you want to continue connecting (yes/no)? yes1 Q( d. Q4 q7 N% Z
Warning: Permanently added '[172.24.110.126]:22' (ECDSA) to the list of known hosts.0 t+ S. I8 L& n% {7 |/ U9 y
es@172.24.110.126's password:
- Q" f* T) v1 Isending incremental file list
7 t8 F+ h& M4 @( \( celastic-certificates.p12
8 V! W( |* @- b5 Q% T          3,596 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)8 b5 c. y  j. p- [; |# J( \+ y$ [

! O$ K- M3 W8 _' q7 m- A% ]" J
. K: Y2 P& d, z; H) \4 D% {
sent 3,631 bytes  received 35 bytes  564.00 bytes/sec
9 |! W2 I3 d8 ?2 Htotal size is 3,596  speedup is 0.98
# m+ C$ ~' m0 o7 V9 x5 C

$ k1 m( K( y5 {) h$ \% T/ |修改配置文件(每台都需要添加), G1 S" X3 h9 p
1 j: L5 j- p( l% g' \6 B
' L3 n$ P% a3 Z3 T- {  q
http.cors.enabled: true
" P/ d7 O$ h! Z  F* ], Ohttp.cors.allow-origin: "*"
, t+ W: l+ Q5 s" zhttp.cors.allow-headers: Authorization,X-Requested-With,Content-Type,Content-Length
5 O7 l, p4 p% T: a6 u% l5 U$ G1 u
5 b! J! F1 e% ~- t3 e8 b
5 |2 k% O; ^8 b% A6 \/ a
xpack.security.enabled: true
: |% u- d  R9 f! j$ I# Axpack.security.authc.accept_default_password: true
, I8 D; b) a1 Lxpack.security.transport.ssl.enabled: true
- |0 l3 {3 _% e" z( wxpack.security.transport.ssl.verification_mode: certificate
7 f9 }. W3 Z& E, p3 s+ s2 Cxpack.security.transport.ssl.keystore.path: ./config/certificates/elastic-certificates.p12/ s: r( U, [9 l/ I
xpack.security.transport.ssl.truststore.path: ./config/certificates/elastic-certificates.p12
# b  B2 E% m8 X& A1 r; k1 K& p- F& W) z

2 l! j% ]* U3 f! g5 o, s' u在各个节点上添加密码:(每一台es都需要操作)

6 `8 n8 t* ^# x1 r6 W' T
/ c. s0 G8 B# B+ A$ x
' j' X9 p6 r7 f! D5 v/ ^6 Z. E6 f; m

7 n! N& l/ D, y+ ^

' d$ W8 ]' G( G" c* P" |! X, Z: Z0 H' \- B
加权一样需要切换到es账号:8 ]+ m3 C, g1 `4 N9 M

& }3 w) R% w3 \. F' y( t在各个节点上添加密码:  M- k: Y9 L8 C  I+ H" t( }

( ]+ e' T' z: v% A0 W6 i% V; a[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password7 \9 ]% ~9 e" s- U/ S
[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password8 ~% O+ ^. @, M+ y  Q
Enter value for xpack.security.transport.ssl.keystore.secure_password:
2 a) u. E# s. `' N$ l4 F7 X' N* Z' N, A
4 F; r9 ~% @7 K
; K7 `4 G0 F# X$ \3 a) D% h
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password
  E# Q: _; W# z6 [1 eEnter value for xpack.security.transport.ssl.keystore.secure_password:1 Y1 i, e( m8 }% l3 b+ C6 _
输入密码:第一次输入密码7 A" U" T! B; _: g- `& a( [# r

7 o% Z4 {2 U+ x& Z- s[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password
; D" c% N! F* LEnter value for xpack.security.transport.ssl.truststore.secure_password:
3 d3 U. J2 p9 Z9 E: `
1 L- o5 G% W: F8 p[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password
) r+ T: F8 k( N8 ?: T( n* e2 S! N1 tEnter value for xpack.security.transport.ssl.truststore.secure_password:
6 v3 s# H4 Z. G( _6 z/ h* ~8 A0 t0 X2 Z$ z& k  i
, g. K5 e8 I  I& V3 K( K* {) J: H
输入密码: 第二次输入上面的密码:, H% b, O. W" [7 C) c  _& {1 H
! K; C9 _. P  g
$ [( c/ C( W  f2 ]7 S5 ?+ p

. u' z& M- `2 `: Q7 j6 f- K, S5 B$ g! A% l
接下来和没有做鉴权的一样,逐个启动集群:+ n7 \* x2 a$ \; ?0 b/ Y) _  W

* M+ Z0 O0 y9 u8 g* A' ]$ j0 t6 r( s! J. f' _' Y
& w- @) I4 _' _3 a
切换到其它用户,root用户不能启动ES:su es
3 e7 j, a- v' T2 q% r4 A# n6 I% ]" _9 M4 y
/ P% ~* @4 b, w8 a5 ]) R3 ^. h
! |4 m. }9 _' T% c7 k0 X) [% D
bin/elasticsearch -d% p/ H1 \6 ?' \1 C$ v( `0 y
[es@it-elassearch elasticsearch-8.15.0]$ bin/elasticsearch -d
" q9 S2 _0 K- N$ h
3 o9 Q" I5 Y7 p

; A& d; n7 _/ f* b! {& p" n/ v& s8 g: v' E8 h6 I$ B' |6 p: E

* I# q+ E9 a# A. T; w4 _! q
: D) l, D. {- V" M
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:30 , Processed in 0.056207 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表