Skip to content

Install

Payam Meyer edited this page Apr 25, 2018 · 22 revisions

Check out the code

git clone [email protected]:zuliaio/zuliasearch.git

Build and copy distro

cd zuliasearch
./gradlew
cp ~/zuliasearch/zulia-server/build/distributions/zulia-1.0-SNAPSHOT.tar ~/
cd ~/
tar zxvf zulia-1.0-SNAPSHOT.tar
rm zulia-1.0-SNAPSHOT.tar

Add node and start

cd zulia-1.0-SNAPSHOT/bin
./zuliad --config ../config/zulia.properties addNode
./zuliad --config ../config/zulia.properties start

systemd script and future maintenance

Create systemd and environment file script

nano /etc/default/zulia

ZULIAD_OPTS="-Xmx15g"

# save and exit

nano /etc/systemd/system/zuliad.service

[Unit]
Description=Zulia
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
WorkingDirectory=/home/search/zuliasearch/
ExecStart=/home/$USER/zulia/bin/zuliad start
Restart=on-failure
User=$USER
EnvironmentFile=/etc/default/zulia

[Install]
WantedBy=multi-user.target

# save and exit

sudo systemctl daemon-reload
sudo systemctl enable zuliad.service

Create a symlink (to be used by script below)

ln -s zulia-1.0-SNAPSHOT zulia

Building and restarting

Assuming that you have checked out the repo in 'zuliasearch' directory, the following helper script would pull any new changes, build and restart zulia.

#!/bin/bash
cd ~/zuliasearch && git pull && cp ~/zulia/config/zulia.properties ~/ && ./gradlew -x test && cp ~/zuliasearch/zulia-server/build/distributions/zulia-1.0-SNAPSHOT.tar ~/ && rm -rf ~/zulia-1.0-SNAPSHOT && cd ~/ && tar -xvf zulia-1.0-SNAPSHOT.tar && rm zulia-1.0-SNAPSHOT.tar && cp ~/zulia.properties ~/zulia/config/zulia.properties && rm -f ~/zulia.properties && sudo systemctl restart zuliad
Clone this wiki locally