You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ If you just want to start using NATS, and you have [installed Go](https://golang
11
11
Install and run the NATS server:
12
12
13
13
```
14
-
go get github.com/nats-io/gnatsd
15
-
gnatsd
14
+
go get github.com/nats-io/nats-server
15
+
nats-server
16
16
```
17
17
18
18
Install the [Go NATS client](https://github.com/nats-io/go-nats/blob/master/README.md):
@@ -40,16 +40,16 @@ You can build the latest version of the server from the `master` branch. The mas
40
40
You need [*Go*](https://golang.org/) version 1.9+ [installed](https://golang.org/doc/install) to build the NATS server. We support vendored dependencies.
41
41
42
42
- Run `go version` to verify that you are running Go 1.9+. (Run `go help` for more guidance.)
43
-
- Clone the <https://github.com/nats-io/gnatsd> repository.
44
-
- Run `go build` inside the `/nats-io/gnatsd` directory. A successful build produces no messages and creates the server executable `gnatsd` in the directory.
43
+
- Clone the <https://github.com/nats-io/nats-server> repository.
44
+
- Run `go build` inside the `/nats-io/nats-server` directory. A successful build produces no messages and creates the server executable `nats-server` in the directory.
45
45
- Run `go test ./...` to run the unit regression tests.
46
46
47
47
## Running
48
48
49
-
To start the NATS server with default settings (and no authentication or clustering), you can invoke the `gnatsd` binary with no [command line options](#command-line-arguments) or [configuration file](#configuration-file).
49
+
To start the NATS server with default settings (and no authentication or clustering), you can invoke the `nats-server` binary with no [command line options](#command-line-arguments) or [configuration file](#configuration-file).
50
50
51
51
```sh
52
-
> ./gnatsd
52
+
> ./nats-server
53
53
[68229] 2018/08/29 11:50:53.789318 [INF] Starting nats-server version 1.3.0
[68229] 2018/08/29 11:50:53.789566 [INF] Listening for client connections on 0.0.0.0:4222
@@ -92,27 +92,27 @@ On Unix systems, the NATS server responds to the following signals:
92
92
| SIGUSR1 | Reopens the log file for log rotation |
93
93
| SIGHUP | Reloads server configuration file |
94
94
95
-
The `gnatsd` binary can be used to send these signals to running NATS servers using the `-sl` flag:
95
+
The `nats-server` binary can be used to send these signals to running NATS servers using the `-sl` flag:
96
96
97
97
```sh
98
98
# Reload server configuration
99
-
gnatsd -sl reload
99
+
nats-server -sl reload
100
100
101
101
# Reopen log file for log rotation
102
-
gnatsd -sl reopen
102
+
nats-server -sl reopen
103
103
104
104
# Stop the server
105
-
gnatsd -sl stop
105
+
nats-server -sl stop
106
106
```
107
107
108
-
If there are multiple `gnatsd` processes running, or if `pgrep` isn't available, you must either specify a PID or the absolute path to a PID file:
108
+
If there are multiple `nats-server` processes running, or if `pgrep` isn't available, you must either specify a PID or the absolute path to a PID file:
109
109
110
110
```sh
111
-
gnatsd -sl stop=<pid>
111
+
nats-server -sl stop=<pid>
112
112
```
113
113
114
114
```sh
115
-
gnatsd -sl stop=/path/to/pidfile
115
+
nats-server -sl stop=/path/to/pidfile
116
116
```
117
117
118
118
See the [Windows Service](#windows-service) section for information on signaling the NATS server on Windows.
@@ -122,27 +122,27 @@ See the [Windows Service](#windows-service) section for information on signaling
122
122
The NATS server supports running as a Windows service. In fact, this is the recommended way of running NATS on Windows. There is currently no installer and instead users should use `sc.exe` to install the service:
The above will create and start a `gnatsd` service. Note that the gnatsd flags should be passed in when creating the service. This allows for running multiple NATS server configurations on a single Windows server by using a 1:1 service instance per installed NATS server service. Once the service is running, it can be controlled using `sc.exe` or `gnatsd.exe -sl`:
129
+
The above will create and start a `nats-server` service. Note that the nats-server flags should be passed in when creating the service. This allows for running multiple NATS server configurations on a single Windows server by using a 1:1 service instance per installed NATS server service. Once the service is running, it can be controlled using `sc.exe` or `nats-server.exe -sl`:
130
130
131
131
```batch
132
132
REM Reload server configuration
133
-
gnatsd.exe -sl reload
133
+
nats-server.exe -sl reload
134
134
135
135
REM Reopen log file for log rotation
136
-
gnatsd.exe -sl reopen
136
+
nats-server.exe -sl reopen
137
137
138
138
REM Stop the server
139
-
gnatsd.exe -sl stop
139
+
nats-server.exe -sl stop
140
140
```
141
141
142
-
The above commands will default to controlling the `gnatsd` service. If the service is another name, it can be specified:
142
+
The above commands will default to controlling the `nats-server` service. If the service is another name, it can be specified:
143
143
144
144
```batch
145
-
gnatsd.exe -sl stop=<service name>
145
+
nats-server.exe -sl stop=<service name>
146
146
```
147
147
148
148
## Command line arguments
@@ -157,8 +157,8 @@ Server Options:
157
157
-m, --http_port <port> Use port for http monitoring
158
158
-ms,--https_port <port> Use port for https monitoring
159
159
-c, --config <file> Configuration file
160
-
-sl,--signal <signal>[=<pid>] Send signal to gnatsd process (stop, quit, reopen, reload)
161
-
<pid> can be either a PID (e.g. 1) or the path to a PID file (e.g. /var/run/gnatsd.pid)
160
+
-sl,--signal <signal>[=<pid>] Send signal to nats-server process (stop, quit, reopen, reload)
161
+
<pid> can be either a PID (e.g. 1) or the path to a PID file (e.g. /var/run/nats-server.pid)
162
162
--client_advertise <string> Client URL to advertise to other servers
163
163
-t Test configuration and exit
164
164
@@ -323,7 +323,7 @@ NATS makes building the full mesh easy. Simply designate a server to be a *seed*
323
323
When running NATS Servers in different hosts, the command line parameters for all servers could be as simple as:
Even on the host where the *seed* is running, the above would work as the server would detect an attempt to connect to itself and ignore that. In other words, the same command line could be deployed in several hosts and the full mesh will properly form.
@@ -337,7 +337,7 @@ The following example demonstrates how to run a cluster of 3 servers on the same
337
337
See also [clustered NATS](https://nats.io/documentation/managing_the_server/clustering/) for clustered NATS examples using Docker.
When running on the same host, we need to pick different ports for the client connections `-p`, and for the port used to accept other routes `-cluster`. Note that `-routes` points to the `-cluster` address of the seed server (`localhost:4248`).
@@ -410,7 +410,7 @@ From the seed's server log, we see that the route is indeed accepted:
A token is a unique identifier of an application requesting to connect to NATS. You can start the NATS server with authentication enabled by passing in the required token on the command line.
641
641
642
642
```
643
-
gnatsd -auth 'S3Cr3T0k3n!'
643
+
nats-server -auth 'S3Cr3T0k3n!'
644
644
```
645
645
646
646
You can also enable token-based authentication and set the credentials in the server configuration file as follows:
@@ -980,7 +980,7 @@ The server can be run using command line arguments to enable TLS functionality.
980
980
Examples using the test certificates which are self signed for localhost and 127.0.0.1.
@@ -1055,7 +1055,7 @@ In addition to TLS functionality, the server now also supports bcrypt for passwo
1055
1055
There is a utility bundled under /util/mkpasswd. By default with no arguments it will generate a secure password and the associated hash. This can be used for a password or a token in the configuration. If you already have a password selected, you can supply that on stdin with the -p flag.
To enable monitoring via the configuration file, use `host:port` (there is no explicit configuration flag for the monitoring interface).
1089
1089
1090
-
For example, running the `gnatsd -m 8222` command, you should see that the NATS server starts with the HTTP monitoring port enabled. To view the monitoring home page, go to <ahref="http://localhost:8222/"target="_blank">http://localhost:8222/</a>.
1090
+
For example, running the `nats-server -m 8222` command, you should see that the NATS server starts with the HTTP monitoring port enabled. To view the monitoring home page, go to <ahref="http://localhost:8222/"target="_blank">http://localhost:8222/</a>.
1091
1091
1092
1092
```
1093
1093
[70450] 2018/08/29 12:48:30.819682 [INF] Starting nats-server version 1.3.0
@@ -1110,15 +1110,15 @@ NATS Office Hours will be on hiatus for the US summer season. Please join our [S
0 commit comments