- 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
- 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
- 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.
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.
sysctl -w vm.max_map_count=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
To uninstall SearchBlox, please use the below command:
*yum remove searchblox
Default Port 8080
Note:The default port would 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.
Additional Disk is required for disk encryption
Installation of cryptsetup
for RHEL / CentOS
# yum install cryptsetup-luks
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:
- 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:
4.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
5.Mounting the new file system at /opt
# mount /dev/mapper/data /opt
- To get UUID
/dev/mapper/data: UUID="0a228c13-06d8-4739-99c3-f596c2dcce8e" TYPE="ext4"
- 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
Before installation of OS, the entire root volume can be encrypted using steps below for GUI based CentOS systems
- To enable the disk encryption please go to installation destination
- While installing Centos7 Installation Enable the Encryption.
- Next create Disk Encryption Passphrase.
- On reboot you would get the following prompt to enter the passphrase so that you can successfully unlock the drive:
- Please use the command as in the screenshot below to verify the disk Encryption
Updated 2 days ago