How do I install SearchBlox on Linux?

Installation SearchBlox in Centos and RHEL

Prerequisites:
  • Install OpenJDK 11 on Linux prior to installing SearchBlox, and ensure it uses the default Java runtime. You can install OpenJDK 11 by running the following command:
    sudo yum install java-11-openjdk-devel
  • If wget is not installed please install the same using the command below
    yum install wget
  • Verify the installation by giving the command
    java -version
 Steps for Installation
  • Please login as root using sudo su if you are not the root user.
  • Create a SearchBlox user
    sudo adduser searchblox
    sudo passwd searchblox
  • SearchBlox has to be installed in /opt folder, so change directory to /opt
    cd /opt
  • Download SearchBlox rpm package
    sudo wget https://d2fco3ozzrfhhd.cloudfront.net/v9.1/searchblox-9.1-0.noarch.rpm
  • Install the rpm package
    sudo rpm -ivh searchblox-9.1-0.noarch.rpm
  • Change permission for few folders
    sudo chown -R searchblox:searchblox /opt/searchblox
    sudo chmod -R 777 /opt/searchblox/logs
    sudo chmod -R 777 /opt/searchblox/elasticsearch/logs
    sudo chmod -R 777 /opt/searchblox/bin
  • Increase the map count to run Elasticsearch without issues.
    sysctl -w vm.max_map_count=262144
    Elasticsearch also requires the ability to create many memory-mapped areas. The maximum map count check checks that the kernel allows a process to have at least 262,144 memory-mapped areas and is enforced on Linux only. To pass the maximum map count check, you must configure vm.max_map_count via sysctl to be at least 262144.
  • Run/start Elasticsearch and SearchBlox services
    systemctl start sbelastic
    systemctl start searchblox
  • To stop Elasticsearch and SearchBlox services use the commands below
    systemctl stop sbelastic
    systemctl stop searchblox

Installation of SearchBlox in Ubuntu

Prerequisites:
  • Install OpenJDK 11 on Linux prior to installing SearchBlox, and ensure it uses the default Java runtime. You can install OpenJDK 11 by running the following command:
    sudo apt install openjdk-11-jdk -y
  • The below command can be used if the above does not work. Refer ubuntu forums for more help in installation of java 11
    sudo add-apt-repository ppa:openjdk-r/ppa && sudo apt-get update -q && sudo apt install -y openjdk-11-jdk
  • Verify the installation by giving the command
    java -version
Steps for Installation
  • Please login as root using sudo su if you are not the root user or install using sudo commands as below.
  • Create a SearchBlox user by giving the necessary details
    sudo adduser searchblox
  • SearchBlox has to be installed in /opt folder, so change directory to /opt
    cd /opt
  • Download SearchBlox debain package
    sudo wget https://d2fco3ozzrfhhd.cloudfront.net/v9.1/searchblox_9.1-0_all.deb
  • Install the debian package
    sudo dpkg -i searchblox_9.1-0_all.deb
  • Change permission for few folders
    sudo chown -R searchblox:searchblox /opt/searchblox
    sudo chmod -R 777 /opt/searchblox/logs
    sudo chmod -R 777 /opt/searchblox/elasticsearch/logs
    sudo chmod -R 777 /opt/searchblox/bin
  • Increase the map count to run Elasticsearch without issues
    sysctl -w vm.max_map_count=262144
    Elasticsearch also requires the ability to create many memory-mapped areas. The maximum map count check checks that the kernel allows a process to have at least 262,144 memory-mapped areas and is enforced on Linux only. To pass the maximum map count check, you must configure vm.max_map_count via sysctl to be at least 262144.
  • Go to start.ini and give port 8080 at line number 143
  • Run/start Elasticsearch and SearchBlox services
    systemctl start sbelastic
    systemctl start searchblox
  • To stop Elasticsearch and SearchBlox use the commands below
    systemctl stop sbelastic
    systemctl stop searchblox

Accessing SearchBlox

  • Go to http://localhost:8080/searchblox/admin/main.jsp in your browser, accept the license agreement
  • Give the username as admin
  • You will see a temp password displayed the first time you go to the login page, after accepting the license agreement. Use the temp password to log in, then store or change the password for future login.

 



To learn more about SearchBlox please visit our developer document site https://developer.searchblox.com/docs

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