-
Notifications
You must be signed in to change notification settings - Fork 9
Install
Payam Meyer edited this page Apr 25, 2018
·
22 revisions
git clone [email protected]:zuliaio/zuliasearch.git
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
cd zulia-1.0-SNAPSHOT/bin
./zuliad --config ../config/zulia.properties addNode
./zuliad --config ../config/zulia.properties start
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
ln -s zulia-1.0-SNAPSHOT zulia
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