If you are using SuiteCRM you must be loving it already. It’s open source, and I love open source. Not that I just love FREE stuff, but this gives a lot of opportunities for business with limited resource. Any way this post is about “setting up Elasticsearch in SuiteCRM”.
First thing that I would advice do not follow the SuiteCRM documentation on this particular topic. As if you have noticed this is giving you no information as of I am writing this post.
Background
I am using SuiteCRM for one business with an EC2 on AWS . Itt’s ubuntu 22.x with SuiteCRM 8.0 as of now. The basic search is good for beginners but when you need more features and options you should go for elasticsearch. It’s again open source, so you will not have to pay for any license cost.
Setup
Step 1 : Install Java if not already installed. If already installed then skip to Step 2
$sudo apt-get update
$sudo apt-get install -y default-jdk
Step 2: Installing Elasticsearch
Import GPG Key to APT
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
Add the repository to APT
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
Update packages
sudo apt-get update
Install Elasticsearch
sudo apt install elasticsearch
Step 3: Configure
Will do a basic search here to start with and you can update the config to match your needs. The below will create a yml configuration file
sudo nano /etc/elasticsearch/elasticsearch.yml
Search for the below line and uncomment it, if not already done
network.host: localhost |
Also search for xpack.security.enabled=true and change it to false for now. Unless you already know how to configure authentication and created a user for this.
Save this file for now and exit.
Enable the server to start at bootup
sudo systemctl enable elasticsearch
Start the server
sudo systemctl start elasticsearch
Check if the server is running
curl -X GET "localhost:9200/"
If this will return some error about empty response dont worry, that could be due to the server setup is using SSL and your elasticsearch is not configured for that.
SuiteCRM search setup
Now that you have a Elasticsearch server running setup the below steps in SuiteCRM admin console.
Now go back to the setup page again and enter the “Elasticsearch” menu:
Click on TestConnection and it should show success message
Now schedule the Index
Schedule the elasticsearch index from the Scheduler manu.
Add your frequency and create a job
Conclusion
I love to play with open source systems. This is one more addition to the systems I have worked with. Loved it so far. Let’s stay connected if possible . Untill next post , keep reading and sharing..
efernece : Elastic.co
Leave a Reply