易陆发现互联网技术论坛

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

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

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

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

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

x
启动集群:
& o/ v2 \( ~4 G' b, K" s: x* r* m& u* \% |/ B
前提:设置好系统配置和JVM堆内存
4 E' u; f6 k0 q, q& [) }: O  K
3 F- c3 V9 x$ r  k8 ?: O创建elastic的数据和日志存放目录,如果是测试环境无所谓,如果是生成环境一定要单独设置数据和日志存放的路径,因为ES可能因为升级或其它原因把原有的数据清理或丢失等因素  x4 [7 Z/ P0 W. h( ~# g- b! Q

! @/ L+ c  P2 ^$ o+ ^
1 h- w- w$ E8 D: A! C' T- I$ S/ r# o" T) g" K$ N5 o+ V3 s

+ [9 _: ?& j/ X配置文件属组权限,并启动" r6 q' ?8 k+ y
[root@it-elassearch elasticsearch]# chown -R es:es elastic-cluster1/
  C1 p! D$ A6 t! _7 G[root@it-elassearch-2 elasticsearch]# chown -R es:es elastic-cluster2/
4 b, A9 _6 j9 z4 ~
4 q* Y* V, \* n. H

6 R: n- Z5 k7 b+ y) N6 L
7 }. Z  S9 Z3 r: d如果添加鉴权配置请按照此处配置,不配置即可略过:

! w% J8 [7 W) o; g6 x
# X7 v, t6 i, X9 m; c
4 ?2 R. ^5 Z/ J
生成密匙:
' a8 r" O3 h: T! Y[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil ca
2 w- G6 W+ \1 uThis tool assists you in the generation of X.509 certificates and certificate
4 H+ s$ `0 [4 z( f9 P/ bsigning requests for use with SSL/TLS in the Elastic stack.: C8 Q' G! T- t  `) H9 Q

) ]/ c9 u2 Y7 M  X! |" F" A! a' P
5 a) z" G' }. Q* K9 M# `: n
The 'ca' mode generates a new 'certificate authority'
. `; B  x/ C" E2 PThis will create a new X.509 certificate and private key that can be used( i9 K* I9 `$ q- e
to sign certificate when running in 'cert' mode.8 G/ I3 S2 g+ g9 C6 S& v; P9 r" Y( f6 `

% K$ _  v5 b. e6 H3 `. \( }9 E& E
" ^* e* g8 F7 ^1 ^
Use the 'ca-dn' option if you wish to configure the 'distinguished name'
- A6 N3 a* \6 |/ Q* E9 s5 uof the certificate authority+ \3 {/ t% U8 z" x$ U

3 l. S! ]  z: T5 @
' t9 y" O0 H3 c3 E( ~
By default the 'ca' mode produces a single PKCS#12 output file which holds:
& y5 B$ z; d: `3 |9 M    * The CA certificate
! d/ e1 c9 U, Z8 Z7 p    * The CA's private key
% X" f1 P5 \9 e) \/ G8 N# a$ a% R1 a- ?2 R9 [( P5 a$ t
# s. u# e7 d3 n& O
If you elect to generate PEM format certificates (the -pem option), then the output will# C6 \! B- w2 E! f! D  B5 T! P
be a zip file containing individual files for the CA certificate and private key9 T1 B+ _1 `6 b& Q9 e- o
* l4 O/ ~# ^# T, A: h* e( N4 m
Please enter the desired output file [elastic-stack-ca.p12]:         【这里忽略,直接回车进入下面输入密码:】* e5 y  d" p) Z7 J  M" S! y$ A( Y/ q2 {
Enter password for elastic-stack-ca.p12 :    【输入密码】

- ^1 h- {; I, f: \7 h- d
0 p3 c1 Y" A# D' t) n4 t2 h# E+ C
5 M9 Q/ t( W1 C

4 e3 I1 d0 q' |7 ]2 }% l6 s# y) e
[es@it-elassearch elasticsearch-8.15.0]$ ll
9 ]0 y2 z! K( |% @total 2268& i- t/ \. ~9 o8 r1 x$ F
......+ ^: V- o" Y( p  T. [/ L' @
-rw-------  1 es es    2672 Oct 28 17:05 elastic-stack-ca.p12
+ w# s5 t9 c/ ^0 e8 g) ^, ^0 S7 b......

' I; P1 \! p! O( ]7 \9 [( c7 h0 O5 G" B* k3 h0 |. O

! U; M4 Q5 G5 W' x9 P! E' }- Q# x2 f( X' M6 X0 I- O* ~% S6 N
/ c$ [, G, _5 w0 y" J9 F/ i0 P
* E9 R7 d1 r0 [% a8 l. l
1 v8 Q3 x# p% U
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil ca
8 y0 d+ f1 \4 q, _8 s8 D# eThis tool assists you in the generation of X.509 certificates and certificate
9 @) I) m/ M) }) ]5 B  Hsigning requests for use with SSL/TLS in the Elastic stack.
1 o. x( g* m# |& U$ I: y1 s
+ f# f. [9 J* T; B1 w1 U

5 b: O# t/ d. j' @3 oThe 'ca' mode generates a new 'certificate authority'6 f. y7 F$ D+ w, p) s  O2 D
This will create a new X.509 certificate and private key that can be used
6 W3 N, M, V8 L6 Z0 [to sign certificate when running in 'cert' mode.* H; R: J9 t: O1 }
! I. m. U* K1 |

# I8 }+ L( g5 L1 x" L/ pUse the 'ca-dn' option if you wish to configure the 'distinguished name'
! q5 s: [) s  }% j% M% m- Iof the certificate authority
, a. q4 I4 B& K7 A6 M$ Q; [) z6 k7 M& e$ K! o! ?

2 Z9 A& @4 n# zBy default the 'ca' mode produces a single PKCS#12 output file which holds:  ?6 `; q. E+ Y$ g5 n( N
    * The CA certificate- R6 c' D5 g7 v1 w" Z9 X8 ]
    * The CA's private key
: E9 K: s! W9 e! P' }/ [! I/ S) a4 m5 A% n& T1 V2 o- k: }  j
) O- k, i- `  k4 C, v& X- o3 L$ Z1 n
If you elect to generate PEM format certificates (the -pem option), then the output will
+ ]; [9 g; \" N8 M  ~be a zip file containing individual files for the CA certificate and private key
' [; ?5 g% p2 S) C3 d" u
$ [* W0 p% z1 Z
, |! W3 Z+ ~7 ?! ?: L. h, M; \7 ~
Please enter the desired output file [elastic-stack-ca.p12]:
% c- x4 h" V  a1 I6 h: q+ i4 HEnter password for elastic-stack-ca.p12 :
3 o6 z9 N. ~$ ~' H+ R' \: b; }3 A! `0 t/ p# l1 x5 G. z
% A! Y; S3 [1 P; d
生成密钥:
! S" Q" e, Y; k% w: r

/ W3 H2 O: p  i( ^

1 ^  S) f" ^3 G' V[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 1 r0 S7 Z9 D* a6 ]! y" G
This tool assists you in the generation of X.509 certificates and certificate
9 y* ]  k- Z8 L' N5 D: s' Z9 Zsigning requests for use with SSL/TLS in the Elastic stack.
3 W" s7 J+ @* r/ ^8 b# T+ T* y" v8 m& N1 _* g
The 'cert' mode generates X.509 certificate and private keys.( J% n; V" ?' E
    * By default, this generates a single certificate and key for use% @* k) F9 C9 s4 }$ O8 g- g: S1 h
       on a single instance.
8 U3 R# J: p' C* }% V    * The '-multiple' option will prompt you to enter details for multiple9 `# c- [: L' A' q& _
       instances and will generate a certificate and key for each one( I/ R+ ~) N  p0 R4 N% K+ P
    * The '-in' option allows for the certificate generation to be automated by describing7 }$ @- Q# ?* \3 n# B: w
       the details of each instance in a YAML file
; v' J  z2 {+ E2 h# R) y
& a. q1 K: j' c% k6 @* E3 ~% h- k    * An instance is any piece of the Elastic Stack that requires an SSL certificate.
: l# Y! q! }0 F6 m, X# Q      Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats+ t/ P1 `* W) Z' H9 Y9 ^
      may all require a certificate and private key.
) o: z. Y7 {; @2 C; J  t9 `# ]. _2 `    * The minimum required value for each instance is a name. This can simply be the
1 W2 Q( b7 D: X# ]. {- z      hostname, which will be used as the Common Name of the certificate. A full; f; J" C2 N  }; ^
      distinguished name may also be used.. k' b% F+ x- U$ a# d9 @3 _
    * A filename value may be required for each instance. This is necessary when the
7 W8 O4 t5 X9 K0 U      name would result in an invalid file or directory name. The name provided here% _+ H- M0 H" w4 y8 r& E* I! t
      is used as the directory name (within the zip) and the prefix for the key and
* E$ m4 S8 u; b      certificate files. The filename is required if you are prompted and the name# m+ f0 ]8 b  j( G
      is not displayed in the prompt.  }: G/ V9 R* m" Z) `
    * IP addresses and DNS names are optional. Multiple values can be specified as a
& T0 b( v# Y* b6 v. c3 x( a9 D      comma separated string. If no IP addresses or DNS names are provided, you may( z- |9 d* `0 D* B$ X# F4 R9 V
      disable hostname verification in your SSL configuration.- {+ l% c. n# G, ^) V
& @! G6 H( s& O- v8 d7 F

7 _/ `4 k# _/ c4 ^( F    * All certificates generated by this tool will be signed by a certificate authority (CA)" t) J3 g( C$ f9 z) z$ S# W+ }
      unless the --self-signed command line option is specified.' U/ D! F- T5 [" E
      The tool can automatically generate a new CA for you, or you can provide your own with
1 B8 q& e( H& Y& J* Q      the --ca or --ca-cert command line options.
5 `7 L- Z  P9 V. g
, d1 A* k- s% L, G% z
) @' ?0 r# o3 Y+ T. E+ \  v5 {" |By default the 'cert' mode produces a single PKCS#12 output file which holds:& C- P$ R0 F5 t6 V/ G% b$ m! f
    * The instance certificate
5 H& X! Q1 i1 u' a6 _  _" e5 T    * The private key for the instance certificate+ {0 _+ \1 k0 F" H( ~, {7 L
    * The CA certificate1 a8 u/ |" u' H' c

; K$ _1 J; i+ ?6 G6 M2 DIf you specify any of the following options:
0 \0 E% n- x& J" h    * -pem (PEM formatted output)- a' M% @# u( W" q( z
    * -multiple (generate multiple certificates)3 x" A- O1 c& o  m+ Y
    * -in (generate certificates from an input file)& `% |4 \2 @: h9 ~: E/ E$ g
then the output will be be a zip file containing individual certificate/key files
* p8 ~3 Y7 ?' Y% m* n0 P
) }6 |& j$ B+ y7 l3 J8 l: m$ B/ lEnter password for CA (elastic-stack-ca.p12) :      【输入密码】- _3 c; E) Z1 h! m
Please enter the desired output file [elastic-certificates.p12]:      【直接回车】& T! z0 Y. X( X6 }! k- {
Enter password for elastic-certificates.p12 :     【再次输入密码】( Y% {( w& y  A' }  |

1 {) _' u: j# ?4 p+ tCertificates written to /data/elasticsearch/elastic-cluster1/elasticsearch-8.15.0/elastic-certificates.p12# S# B# @3 `  ?! j3 u

2 y% ?8 Q0 J: f4 V( tThis file should be properly secured as it contains the private key for
1 |$ r5 L: g+ _3 x  Z8 e) s: iyour instance.
5 Z4 @# k9 l2 w* ?* gThis file is a self contained file and can be copied and used 'as is'
" R/ |9 |& `0 `6 n& fFor each Elastic product that you wish to configure, you should copy$ M! h+ D0 L5 O/ i
this '.p12' file to the relevant configuration directory9 k7 _( W2 W3 X3 J
and then follow the SSL configuration instructions in the product guide.
, y0 l% @" W, I$ D9 X3 Q! N/ R8 y. s! _( R
For client applications, you may only need to copy the CA certificate and
7 W7 l9 ?0 P7 Z6 ~& S8 ]configure the client to trust this certificate.' @  |/ m) h# o2 h
* @3 t3 x: p7 G% i

+ U8 b: O+ R3 a6 I; g5 W* M! G# r2 h- v8 j5 Y' S; C' g
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 5 W) w0 W! Q* l- `: ~  s) P8 X1 Y
This tool assists you in the generation of X.509 certificates and certificate- x6 S2 d, R' w: H
signing requests for use with SSL/TLS in the Elastic stack.4 [8 l5 Z5 H# N8 H  {/ ~
2 l5 q( I9 |# p( ~* b% E4 A* Q3 D
The 'cert' mode generates X.509 certificate and private keys.
  E* l3 k8 [4 o! j7 }    * By default, this generates a single certificate and key for use
( Y4 L" L$ r$ `! `& g  f       on a single instance.
: T, h( r4 o. P    * The '-multiple' option will prompt you to enter details for multiple
2 ~' y6 I* R5 P/ ]: [8 Y( e       instances and will generate a certificate and key for each one
  C  R; I) L0 A: l* M4 I    * The '-in' option allows for the certificate generation to be automated by describing0 r  S' Y: C6 c5 a( Y( M
       the details of each instance in a YAML file
- \* A" Y; J1 s' f) h! }$ B1 n5 k- d9 n8 w! a
    * An instance is any piece of the Elastic Stack that requires an SSL certificate." u; O9 S4 ]( O# C$ r; c  {% a
      Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats/ O2 U5 V& Z2 [
      may all require a certificate and private key.
- L" Q. P2 W6 `9 H+ b# W    * The minimum required value for each instance is a name. This can simply be the* y9 ]. P1 S4 P, G/ q
      hostname, which will be used as the Common Name of the certificate. A full, {; Y" l  @% w5 e/ H+ z4 o$ z
      distinguished name may also be used.
5 q1 }( L) E; D) o$ |    * A filename value may be required for each instance. This is necessary when the$ }& s  b( J: S* i8 ~  t
      name would result in an invalid file or directory name. The name provided here
' O4 r: m1 R) ^- w8 S6 C& h      is used as the directory name (within the zip) and the prefix for the key and3 c9 i+ H: H; k7 N: R; d
      certificate files. The filename is required if you are prompted and the name, E5 B6 {" q# y8 h* ^9 x
      is not displayed in the prompt.. T& H$ }" U- o$ h: g5 ^
    * IP addresses and DNS names are optional. Multiple values can be specified as a! R4 h0 ^4 _& V
      comma separated string. If no IP addresses or DNS names are provided, you may
4 z6 i. G* b7 ^) }) R      disable hostname verification in your SSL configuration.
. }6 W4 X1 [& o' T) m% d% [% g
) L5 L7 B8 M; k, t" B
8 N! r- w; B# ]- b. f, x. t    * All certificates generated by this tool will be signed by a certificate authority (CA)
9 W1 j6 R$ u, v' |& ~' G6 D      unless the --self-signed command line option is specified.
: L1 L; Y3 @' ]" F; y; _* ]4 J      The tool can automatically generate a new CA for you, or you can provide your own with: n5 V: d, {# R" q' G- v3 r
      the --ca or --ca-cert command line options.
$ I2 m: c6 r9 x& p! t+ t- e5 z! b) @+ `8 Q2 i3 J

# S+ w! K& _9 o2 ]By default the 'cert' mode produces a single PKCS#12 output file which holds:
9 S5 r0 M; L+ T$ [# T    * The instance certificate
) r* z2 |& W/ w9 _0 R    * The private key for the instance certificate) J2 |+ r& C6 C" _/ {9 S, ]( z
    * The CA certificate" [2 C$ b- i- d; E2 L: n0 {
2 U/ H, \( |  y& M: s
If you specify any of the following options:1 J/ I2 I4 N) {9 o( p
    * -pem (PEM formatted output)% |3 H1 E5 J2 R) u% F; t
    * -multiple (generate multiple certificates)
, m1 Q5 P# }/ c2 l    * -in (generate certificates from an input file)4 S/ i$ d% ~4 @, v$ l! R8 Z
then the output will be be a zip file containing individual certificate/key files
& L2 V5 W6 u6 I  \1 @3 y" x# L2 b8 r# r  s
Enter password for CA (elastic-stack-ca.p12) :   【输入密码】
! q: T! M# s; zPlease enter the desired output file [elastic-certificates.p12]:     【直接回车】
$ G5 c1 O3 v& T( w  ^, CEnter password for elastic-certificates.p12 :   【输入密码】: C9 |2 Y9 l% X( F5 H

. `: g7 ~( K' C+ L; \9 XCertificates written to /data/elasticsearch/elastic-cluster2/elasticsearch-8.15.0/elastic-certificates.p129 a" z) e, x5 U3 X8 G
' F% l& f8 c& t6 J7 n5 t
This file should be properly secured as it contains the private key for
" n# ?! M7 o7 Fyour instance.
7 B- o1 J1 t; W$ w8 y' P9 C& l  HThis file is a self contained file and can be copied and used 'as is'2 M: p& }- L3 H( h) |
For each Elastic product that you wish to configure, you should copy0 z/ _+ D$ ]' V# y
this '.p12' file to the relevant configuration directory# [; |0 p6 z  Q6 z. R- ]
and then follow the SSL configuration instructions in the product guide.0 j8 b# E' C- Z9 e- _
, R  i* n- b1 n2 P
For client applications, you may only need to copy the CA certificate and
6 s; ~9 L8 {, |configure the client to trust this certificate.* ]7 m2 @8 v& L& R' q  C6 B3 ~

, }, L; A2 V- r: s& s. T
5 ]! V( p5 }) ^' K( `##将凭证迁移到指定的目录:) v+ ]) d% l' e* m/ N' B' z1 S" R
创建目录:
, d' w2 D' Z& h" H/ b4 d mkdir -p ./config/certificates/
) U/ i+ ^4 S  @% j" y8 P% v! @! G移动凭证到指定目录下:: ?- [0 t0 V; A* h5 ]0 a6 C1 ~
mv elastic-certificates.p12 ./config/certificates/' i. u; G; N! }
* V) I4 g3 f  ?5 `; n2 D" d2 C
赋于权限:2 Z4 C# ~* i8 d; A
3 p! ?3 ]- t) [- M1 F8 L
' N/ S6 w- u9 I6 S' C
[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.p122 R$ v- O+ {# M) o. x5 k; i
The authenticity of host '[172.24.110.126]:22 ([172.24.110.126]:22)' can't be established.5 v+ c1 }6 X/ K
ECDSA key fingerprint is SHA256:Tvzi0ICzurMYEPySzerkOmwk/o7XHxmABVKRigofHzg.! L  M: K5 m/ }: j" O! M8 e, ~
ECDSA key fingerprint is MD5:f0:92:26:fd:da:d3:e4:db:be:36:b1:fe:d6:2b:65:25.. n& e) H/ {' N: ~% Y9 T+ S$ R
Are you sure you want to continue connecting (yes/no)? yes4 O' \) ]* ^) @
Warning: Permanently added '[172.24.110.126]:22' (ECDSA) to the list of known hosts.
* {3 A: ~9 Z" yes@172.24.110.126's password: 2 e. X1 ^3 Y3 [8 Y
sending incremental file list
6 L4 |2 W9 L! i1 ?elastic-certificates.p12
& J- U( q9 O6 S8 c! j          3,596 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)
. w: Q: c! X2 H
+ A0 i% g# n4 W: d% Y* l* o9 @$ e

8 }8 y+ V2 O' ?4 d/ i% B& lsent 3,631 bytes  received 35 bytes  564.00 bytes/sec
- g- S( B& j7 X! B) s( [1 wtotal size is 3,596  speedup is 0.98
* ^3 f2 X: a* g' o: P7 g

) \8 L! m( a/ [( f; ?修改配置文件(每台都需要添加)
) f  N8 `  L* q8 Q6 t5 p' ~5 S

/ C( Z6 N( }1 G& V6 w

: U0 H3 ^5 l% a- O  L$ a/ \http.cors.enabled: true
( T9 C& y4 w$ E; M1 shttp.cors.allow-origin: "*"9 w- m1 r4 ^4 p
http.cors.allow-headers: Authorization,X-Requested-With,Content-Type,Content-Length$ E5 }. Y6 R+ S/ \3 [4 ^

) ~+ {2 A* x# l7 w: A

) T5 k' x) `+ i( axpack.security.enabled: true
- Q- l! l; N3 nxpack.security.authc.accept_default_password: true
, z( g: |8 H& Nxpack.security.transport.ssl.enabled: true
' H, f2 W$ I  v5 v; d5 ixpack.security.transport.ssl.verification_mode: certificate* X3 M. J$ c* R5 ~  z& ]3 R$ J
xpack.security.transport.ssl.keystore.path: ./config/certificates/elastic-certificates.p127 _# d( J5 J2 A7 L6 v
xpack.security.transport.ssl.truststore.path: ./config/certificates/elastic-certificates.p12' b7 t$ F/ P2 R! g6 J! g3 ?

: S, ~$ a4 l+ d9 W4 A/ z) ~
) k! F/ T: t* z; a1 V7 I
在各个节点上添加密码:(每一台es都需要操作)
7 p, Q6 p. n! f& n

2 `- m% \/ U4 ?( t
6 ~9 |& E) E3 G( W

) ~) A9 ~/ M7 A  e
( \: F( b9 Z2 d! [4 l: n2 V* W8 b; I

/ p+ ]9 M5 V, W/ {* G& l加权一样需要切换到es账号:# i& W; r( K, `
# G! i6 Z) T7 u( d$ t! A3 |, \; F* X# _
在各个节点上添加密码:
) t/ c0 U* M# B" N( U
, u: T- V- Y, u% p[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password7 _! e; O$ j# J  h
[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password& V1 A( O# \" O* j7 j# x
Enter value for xpack.security.transport.ssl.keystore.secure_password:: d6 g2 R" g5 s; @7 M1 j

: [7 \/ R0 g3 k1 ^& Q# I1 O% r
* Q+ V( N, L- d+ F
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password' v5 s7 |/ s& x! D3 O5 M1 y4 I
Enter value for xpack.security.transport.ssl.keystore.secure_password:+ n8 Q6 _! E( S" ~$ R7 |5 Z
输入密码:第一次输入密码
9 k2 s- n# `. x  S! \# Q
3 J1 H. a  K, B6 _6 N* B[es@it-elassearch elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password* k0 V/ R7 L' P5 ?: B7 o
Enter value for xpack.security.transport.ssl.truststore.secure_password:3 R% ?. ?# X- S3 ?" i
; a, \( n/ k; W5 f
[es@it-elassearch-2 elasticsearch-8.15.0]$ ./bin/elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password7 @7 [- `" ?% x8 t' `
Enter value for xpack.security.transport.ssl.truststore.secure_password:
4 Q% }: g6 C( o( M( E- h4 j/ J; E! E' J6 X' g8 Z" ^
" }+ d( d. g% L  c& Q
输入密码: 第二次输入上面的密码:
4 C3 w. n9 R) P: f: r7 L8 N$ ?% H5 t& ^& \1 k
* U) c3 y9 w. j, J
) p) P6 H8 x: Z3 r- y9 T0 T$ M

* H. F% e% C4 q( J接下来和没有做鉴权的一样,逐个启动集群:
( S1 t4 u7 Z) o6 E  f' a* `6 o* r8 j9 t' M/ H6 j
" s! B) E. A3 y5 `, G+ H

$ T7 j/ J2 r( ~4 f0 D8 ~切换到其它用户,root用户不能启动ES:su es
- N8 A" Q6 ~. J0 e0 F  ~% e9 U9 J1 V
, X: V* K" Y) Z8 j, c7 m6 ?

+ Q( A" t4 X- }( C$ R0 b' `( e/ V
& [# g$ f- L4 Bbin/elasticsearch -d( J+ F9 f9 e" G
[es@it-elassearch elasticsearch-8.15.0]$ bin/elasticsearch -d
& W5 _; j) i5 m4 Y. a& `( ?2 c* D3 e/ Y# d

+ Y, q- l  V) ?6 y& u  A; j( y' r0 r/ \) h6 T- I4 E

2 K2 o$ q8 h: F: A+ W! h1 r+ ]6 x6 s& `: D& L3 v* Z
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-8 20:17 , Processed in 0.052294 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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