Linux first look guide
Prerequisites
-
Java 17
-
A Neo4j cluster meeting these requirements
The query log feature is only available for DBMSs with instances that are running Neo4j 5.1.0 or higher. |
Create persistence DBMS
Download and extract
Download latest Neo4j Linux/Mac executable from here and extract the package. Extracted directory location is referred to as NEO4J_HOME form now on.
Change password
Navigate to NEO4j_HOME and run:
./bin/neo4j-admin dbms set-initial-password lovelypassword
Run Neo4j
./bin/neo4j start
See Neo4j Linux installation documentation for more details about installing and running Neo4j.
Server installation
Unpack NOM server from Neo4j package
tar -xzf NEO4J_HOME/products/neo4j-ops-manager-server-*-unix.tar.gz
Extracted directory is now known as NOM_SERVER_HOME.
Generate self-signed certificates
Navigate to NOM_SERVER_HOME and run:
java -jar ./lib/server.jar ssc -n localhost \
-o ./certificates \
-p <PASSWORD> \
-d localhost
<PASSWORD> appears as a value in this step and twice in the following step; all of these values should be replaced with the same secure password. |
More information on Self Signed certificates here.
Run NOM server as console application
java -jar ./lib/server.jar \
--spring.neo4j.uri=neo4j: neo4j://localhost:7687\
--spring.neo4j.authentication.username=neo4j \
--spring.neo4j.authentication.password=lovelypassword \
--server.port=8080 \
--server.ssl.key-store-type=PKCS12 \
--server.ssl.key-store=file:./certificates/localhost.pfx \
--server.ssl.key-store-password=<PASSWORD> \
--grpc.server.port=9090 \
--grpc.server.security.key-store-type=PKCS12 \
--grpc.server.security.key-store=file:./certificates/localhost.pfx\
--grpc.server.security.key-store-password=<PASSWORD>\
--jwt.secret=please-set-a-random-secret-string-here-for-jwt-signing \
Running as console application on Unix is documented here
Open NOM UI
Wait for the server to start and then go to https://localhost:8080. Login as admin:passw0rd and accept license terms.
Set up agent
Register agent
In NOM UI - navigate to Agent settings (clicking on the sad robot takes you to the correct page) and add a new agent. Copy environment variables that are provided.
Full documentation on registering an agent is here.
Unpack agent
tar -xzf NEO4J_HOME/products/neo4j-ops-manager-agent-*-linux-amd64.tar.gz
Extracted directory will now be known as NOM_AGENT_HOME.
Configure agent
Edit the export command below as follows:
-
Replace <OUTPUT_FROM_REGISTER_AGENT> with the four lines shown during the reigister agent step in the NOM UI.
-
Replace the bolt URIs, usernames and passwords with the correct ones for your cluster.
-
Remove any instance configurations you don’t need or add configurations if you have more than three instances in your cluster.
export \
<OUTPUT_FROM_REGISTER_AGENT>
CONFIG_TLS_TRUSTED_CERTS=<SERVER_INSTALL_DIR>/certificates/localhost.cer \
CONFIG_LOG_LEVEL=debug \
CONFIG_INSTANCE_1_NAME=server1 \
CONFIG_INSTANCE_1_BOLT_URI=<SERVER_1_BOLT_URI> \
CONFIG_INSTANCE_1_BOLT_USERNAME=neo4j \
CONFIG_INSTANCE_1_BOLT_PASSWORD=<SERVER_1_BOLT_PASSWORD> \
CONFIG_INSTANCE_1_QUERY_LOG_PORT=9500 \
CONFIG_INSTANCE_1_LOG_CONFIG_PATH=<SERVER1_HOME_DIR>/conf/server-logs.xml \
CONFIG_INSTANCE_2_NAME=server2 \
CONFIG_INSTANCE_2_BOLT_URI=<SERVER_2_BOLT_URI> \
CONFIG_INSTANCE_2_BOLT_USERNAME=neo4j \
CONFIG_INSTANCE_2_BOLT_PASSWORD=<SERVER_2_BOLT_PASSWORD> \
CONFIG_INSTANCE_2_QUERY_LOG_PORT=9600 \
CONFIG_INSTANCE_2_LOG_CONFIG_PATH=<SERVER2_HOME_DIR>/conf/server-logs.xml \
CONFIG_INSTANCE_3_NAME=server3 \
CONFIG_INSTANCE_3_BOLT_URI<SERVER_3_BOLT_URI> \
CONFIG_INSTANCE_3_BOLT_USERNAME=neo4j \
CONFIG_INSTANCE_3_BOLT_PASSWORD=<SERVER_3_BOLT_PASSWORD> \
CONFIG_INSTANCE_3_QUERY_LOG_PORT=9700 \
CONFIG_INSTANCE_3_LOG_CONFIG_PATH=<SERVER3_HOME_DIR>/conf/server-logs.xml
Run the edited export command.
Full documentation on configuring an agent is here.
Explore NOM UI
Go to NOM UI and wait for DBMS to appear - this may take a few minutes. You should be able to see that the agent has connected in the agents listing. Once the DBMS is shown in the home page, double click on the name (initially a generated string) to edit it. Double click on the DBMS to see the metrics, status, security panel, logs and upgrade pages for the DBMS.
Was this page helpful?