Gentics Mesh can quickly be installed on a Linux by registering a systemd service.
First you need to install Java 11 on your server. After that step you can download the Gentics Mesh server jar to your installation folder.
Store the service file in the same folder.
mesh-server.service
[Unit]
Description=Gentics Mesh Server
Wants=basic.target
After=basic.target network.target syslog.target
[Service]
User=node
Restart=on-failure
ExecStart=/usr/bin/java -Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=512m -Dstorage.diskCache.bufferSize=512 -jar mesh-server.jar
WorkingDirectory=/opt/mesh-server
LimitMEMLOCK=infinity
LimitNOFILE=65536
LimitAS=infinity
LimitRSS=infinity
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
|
The given limits are mandatory. Especially the LimitNOFILE setting must be set to prevent database issues.
|
You can also change the Wants
and After
setting if you run Elasticsearch on the same server. In that case it is recommended to start Gentics Mesh after Elasticsearch has been started.
Wants=elasticsearch.service
After=elasticsearch.service
Finally you can register the systemd service file:
systemctl enable /opt/mesh-server/mesh-server.service
service mesh-server start