SearchBlox

SearchBlox Developer Hub

Welcome to the SearchBlox developer hub. Here you will find comprehensive guides and documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

Installing on Ubuntu

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
    

Steps to Uninstall/Remove SearchBlox

To uninstall SearchBlox, please use the below command:
apt-get remove searchblox

Default Port 8080

Note:The default port should be 8080 and It will not run in port 80

Additional Tip on Configuring Hosts

  • Check if the /etc/hosts file has an entry for the assigned IP address and hostname. Restart the server once that is set up.
    • vi /etc/hostname
  • 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.
  • By default, there will be one HTTP collection with the root URL http://www.cnn.com, which can be updated if required. You can index a collection by clicking the index button from the dashboard or the Index sub-tab.
  • Click on the DashBoard sub-tab under Collections to view the indexing status.
  • SearchBlox will run with a free license, by default, which allows you to use one collection only. To add another collection, delete the existing one and create another.
  • Go to http://localhost:8080/searchblox/search.jsp or http://localhost:8080/searchblox/plugin/index.html to start searching.

Disk Encryption

Additional Disk is required for disk encryption

  1. Installation of cryptsetup
    for Ubuntu:
    # sudo apt-get install cryptsetup
  2. LUKS Format disk
    Note: while formatting the disk we have to give some password
    # cryptsetup luksFormat /dev/sdb
WARNING!
========
This will overwrite data on /dev/sdb irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
  1. Luks open
    Note: We have to use the password created earlier while formatting the disk.
    # cryptsetup luksOpen /dev/sda data
Enter passphrase for /dev/sdb:
  1. Create a filesystem
    #mkfs -t ext4 /dev/mapper/data

mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 52428288 4k blocks and 13107200 inodes
Filesystem UUID: 1c71b0f4-f95d-46d6-93e0-cbd19cb95edb
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done  
  1. Mounting the new file system at /opt
    # mount /dev/mapper/data /opt
  2. To get UUID
    #blkid /dev/mapper/data
/dev/mapper/data: UUID="0a228c13-06d8-4739-99c3-f596c2dcce8e" TYPE="ext4"
  1. We need to add the UUID into /etc/fstab like this and save it
    Note: We need to add the UUID into etc/fstab file
LABEL=cloudimg-rootfs   /        ext4   defaults,discard        0 0
UID="4539b70d-66ab-4c07-b2a2-d4583f461a2f"   /secret   ext4 defaults 0 0
UID="4539b70d-66ab-4c07-b2a2-d4583f461a2f"   /opt      ext4 defaults 0 0
UUID="0a228c13-06d8-4739-99c3-f596c2dcce8e"   /opt  ext4  defaults 0  0
===================================================
  • TO close encryption
    /#cryptsetup luksClose /dev/mapper/data
  • To open encryption
    /# cryptsetup luksOpen /dev/mapper/data

Updated 5 days ago

Installing on Ubuntu


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.