Skip to content

Commit 441bb97

Browse files
authored
fixes and consolidates elasticsearch deploy on windows commands (#1295)
Substitutes #438 Closes #437 It fixes a couple of wrong command execution paths and it also consolidates the command execution examples to `./bin/elasticsearch....` instead of `bin/elasticsearch...` (using ./ is safer in windows power shell and it's totally valid in Linux). Also `./bin` is already used for a lot linux examples like starting Elasticsearch from the command line.
1 parent d021e21 commit 441bb97

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

deploy-manage/deploy/self-managed/_snippets/enroll-nodes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you can't access the first node, then modify your network configuration befor
1919
2. In a separate terminal from where {{es}} is running, navigate to the directory where you installed {{es}} and run the `elasticsearch-create-enrollment-token` tool to generate an enrollment token for your new nodes.
2020

2121
```sh subs=true
22-
bin{{slash}}elasticsearch-create-enrollment-token -s node
22+
.{{slash}}bin{{slash}}elasticsearch-create-enrollment-token -s node
2323
```
2424

2525
Copy the enrollment token, which you’ll use to enroll new nodes with your {{es}} cluster.
@@ -29,7 +29,7 @@ If you can't access the first node, then modify your network configuration befor
2929
3. From the installation directory of your new node, start {{es}} and pass the enrollment token with the `--enrollment-token` parameter.
3030

3131
```sh subs=true
32-
bin{{slash}}elasticsearch --enrollment-token <enrollment-token>
32+
.{{slash}}bin{{slash}}elasticsearch --enrollment-token <enrollment-token>
3333
```
3434

3535
{{es}} automatically generates certificates and keys in the following directory:

deploy-manage/deploy/self-managed/install-elasticsearch-with-zip-on-windows.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ You can install {{es}} as a service that runs in the background or starts automa
108108
1. Install {{es}} as a service. The name of the service and the value of `ES_JAVA_HOME` will be made available during install:
109109

110110
```sh subs=true
111-
C:\Program Files\elasticsearch-{{stack-version}}\bin>elasticsearch-service.bat install
111+
.\bin\elasticsearch-service.bat install
112112
```
113113

114114
Response:
@@ -127,7 +127,7 @@ You can install {{es}} as a service that runs in the background or starts automa
127127
2. Start {{es}} as a service. When {{es}} starts, authentication is enabled by default:
128128

129129
```sh subs=true
130-
C:\Program Files\elasticsearch-{{stack-version}}\bin>bin\elasticsearch-service.bat start
130+
.\bin\elasticsearch-service.bat start
131131
```
132132

133133
::::{note}
@@ -137,16 +137,12 @@ You can install {{es}} as a service that runs in the background or starts automa
137137
3. Generate a password for the `elastic` user with the [`elasticsearch-reset-password`](elasticsearch://reference/elasticsearch/command-line-tools/reset-password.md) tool. The password is output to the command line.
138138

139139
```sh subs=true
140-
C:\Program Files\elasticsearch-{{stack-version}}\bin>\bin\elasticsearch-reset-password -u elastic
140+
.\bin\elasticsearch-reset-password -u elastic
141141
```
142142

143143
#### Manage {{es}} as a service on Windows [windows-service-manage]
144144

145-
Run the `elasticsearch-service.bat` script in the `bin\` folder to install, remove, manage, or configure the service and potentially start and stop the service from the command line.
146-
147-
```sh subs=true
148-
C:\Program Files\elasticsearch-{{stack-version}}\bin>elasticsearch-service.bat
149-
```
145+
Use the `elasticsearch-service.bat` script located in the `bin\` folder to install, remove, manage, start, or stop the service from the command line. Starting and stopping are only available if the service is already installed.
150146
151147
Usage:
152148
```

0 commit comments

Comments
 (0)