How do I install SearchBlox on Linux?

Install OpenJDK 8 on Linux prior to installing SearchBlox, and ensure it uses the default Java runtime.

You can install OpenJDK 8 by running the following command:

su -c "yum install java-1.8.0-openjdk"

yum install wget

SearchBlox can be installed by running the following command in path /opt :

curl -s http://d2fco3ozzrfhhd.cloudfront.net/v8.6.3/installsearchblox.sh | sh

To start/stop/restart the searchblox service, use the following commands:

sudo service searchblox start

To stop the service, use the following commands:

sudo service searchblox stop

To restart the service, use the following commands:

sudo service searchblox restart

 

To increase the memory allocation for SearchBlox from 4GB to 8GB, edit the following file: /opt/searchblox/services/conf/wrapper.conf

wrapper.java.additional.3a =-Xms4g
wrapper.java.additional.3b =-Xmx4g

Change these values to:

wrapper.java.additional.3a =-Xms8g
wrapper.java.additional.3b =-Xmx8g

Have more questions? Submit a request

Comments

  • Avatar
    Juraj

    Hi there,

    The "installsearchblox.sh" script should also fix file permissions after it installs files into "/opt/searchblox" folder. All the files and directories in that folder have permissions set to 777. It's a security disaster in waiting.

    You could do so, for example, by running the following:

    find /opt/searchblox -print0 | xargs -0 chmod o-w
    find /opt/searchblox -print0 | xargs -0 chmod g-w
    find /opt/searchblox -type f -not -path '*/bin/*' -print0 | xargs -0 chmod a-x
    chmod 755 /opt/searchblox/startSearchBlox

    Also, the "/opt/searchblox/startSearchBlox" with CTRL-C part could be scripted as well. The "installsearchblox.sh" script could call the following command shortly before it calls "service searchblox start":

    timeout --signal=SIGKILL 30s /opt/searchblox/startSearchBlox 2>/dev/null

    That will start "/opt/searchblox/startSearchBlox", let it run for 30 seconds (you can increase that if you like), and then kills it.

    This would allow a lot of automation, especially for people deploying SearchBlox via Puppet, Ansible, or other automation tools.

    Just a couple of thoughts.

    Cheers.

    Edited by Juraj