Skip to content

Commit 4f2691b

Browse files
more background
1 parent 3967902 commit 4f2691b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

initial-memcached/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,40 @@ prompt> make
3030

3131
At this point, a lot of stuff will happen to build `memcached`, but hopefully it just works and you are ready to try it out!
3232

33+
## Run
34+
35+
Now we will run `memcached`. For this, it is best to have two terminal windows open; we will assume these are on the same computer (they can be on different ones - this is a network server after all! - but then the instructions will be slightly different).
36+
37+
In the first terminal, we will run `memcached`. To do so, from the build directory, type the following:
38+
39+
```sh
40+
prompt> ./memcached
41+
```
42+
43+
To stop running it at any time, just hit `control c` (i.e., hold down the `control` key and hit the `c` key). This will send a `SIGINT` signal to `memcached`, which it will catch but in response it will exit. Try it!
44+
45+
Now, let's assume that `memcached` is running. In the second terminal window, we will attach to it and put some data into it, using a simple `telnet` session (if you don't know what `telnet` is, look it up!). We can do so as follows:
46+
47+
```sh
48+
telnet 127.0.0.1 11211
49+
```
50+
51+
If this is successful, it will say something like this:
52+
```
53+
Trying 127.0.0.1...
54+
Connected to localhost.
55+
Escape character is '^]'.
56+
```
57+
58+
If not, it will say:
59+
```
60+
Trying 127.0.0.1...
61+
telnet: connect to address 127.0.0.1: Connection refused
62+
telnet: Unable to connect to remote host
63+
```
64+
(in which case, `memcached` probably isn't running).
65+
66+
Hopefully, it works! If so, we're now ready to type something into this second window, to send `memcached` a command. How exciting!
3367

3468

3569

0 commit comments

Comments
 (0)