Install memgraph in subdirectory of lib
Reviewers: mferencevic Reviewed By: mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1076
This commit is contained in:
parent
6861a580c7
commit
9cacf970cc
@ -32,16 +32,35 @@ Therefore we add node `Rating` with these values as property `name` and relation
|
||||
#### Example Queries
|
||||
|
||||
We have prepared a database snapshot for this example, so you can easily import it
|
||||
when starting memgraph using `durability-directory` option:
|
||||
when starting Memgraph using the `--durability-directory` option.
|
||||
|
||||
```
|
||||
memgraph --durability-directory /usr/share/memgraph/examples/TEDTalk --durability-enabled=false
|
||||
/usr/lib/memgraph/memgraph --durability-directory /usr/share/memgraph/examples/TEDTalk \
|
||||
--durability-enabled=false --snapshot-on-exit=false
|
||||
```
|
||||
|
||||
NOTE: If you modify dataset these changes will stay
|
||||
When using Memgraph installed from DEB package, you may need to stop the
|
||||
currently running Memgraph server before you can import the example. Use the
|
||||
following command:
|
||||
|
||||
```
|
||||
systemctl stop memgraph
|
||||
```
|
||||
|
||||
When using Docker, you can import the example with the following command:
|
||||
|
||||
```
|
||||
docker run -p 7687:7687 \
|
||||
-v mg_lib:/var/lib/memgraph -v mg_log:/var/log/memgraph -v mg_etc:/etc/memgraph \
|
||||
memgraph --durability-directory /usr/share/memgraph/examples/TEDTalk \
|
||||
--durability-enabled=false --snapshot-on-exit=false
|
||||
```
|
||||
|
||||
Now you're ready to try out some of the following queries.
|
||||
|
||||
NOTE: If you modify the dataset, the changes will stay only during this run of
|
||||
Memgraph.
|
||||
|
||||
1) Find all talks given by specific speaker:
|
||||
```
|
||||
MATCH (n:Speaker {name: "Hans Rosling"})-[:Gave]->(m:Talk)
|
||||
@ -61,7 +80,7 @@ ORDER BY TalksGiven DESC LIMIT 20;
|
||||
```
|
||||
MATCH (n:Talk {name: "Michael Green: Why we should build wooden skyscrapers"})-[:HasTag]->(t:Tag)<-[:HasTag]-(m:Talk)
|
||||
WITH * ORDER BY m.name
|
||||
RETURN t.name, COLLECT(m.name), COUNT(m) AS TalksCount;
|
||||
RETURN t.name, COLLECT(m.name), COUNT(m) AS TalksCount
|
||||
ORDER BY TalksCount DESC;
|
||||
```
|
||||
|
||||
|
@ -18,5 +18,5 @@ VOLUME /etc/memgraph
|
||||
USER memgraph
|
||||
WORKDIR /home/memgraph
|
||||
|
||||
ENTRYPOINT ["memgraph"]
|
||||
ENTRYPOINT ["/usr/lib/memgraph/memgraph"]
|
||||
CMD [""]
|
||||
|
@ -4,7 +4,7 @@ Description=Memgraph: High performance, in-memory, transactional graph database
|
||||
[Service]
|
||||
User=memgraph
|
||||
Group=memgraph
|
||||
ExecStart=/usr/bin/memgraph
|
||||
ExecStart=/usr/lib/memgraph/memgraph
|
||||
# Uncomment this if Memgraph needs more time to write the snapshot on exit.
|
||||
#TimeoutStopSec=5min
|
||||
|
||||
|
@ -102,7 +102,7 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "memgraph")
|
||||
# Install and rename executable to just 'memgraph' Since we have to rename,
|
||||
# we cannot use the recommended `install(TARGETS ...)`.
|
||||
install(PROGRAMS $<TARGET_FILE:memgraph>
|
||||
DESTINATION bin RENAME memgraph)
|
||||
DESTINATION lib/memgraph RENAME memgraph)
|
||||
# Install the config file (must use absolute path).
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/config/community.conf
|
||||
DESTINATION /etc/memgraph RENAME memgraph.conf)
|
||||
|
Loading…
Reference in New Issue
Block a user