Theme editor

How to install elasticsearch to almalinux for xenforo with problem solving

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
83
Reaction score
2
Points
8
Age
39
Location
Turkey
Website
aior.com
If you are having problems with installing elasticsearch to almalinux for xenforo follow the steps below:

Stop Elasticsearch service:
Code:
sudo systemctl stop elasticsearch

Remove Elasticsearch packages:
Code:
sudo yum remove elasticsearch

Remove Elasticsearch configuration files and directories:

Remove Elasticsearch data directory (This step will permanently delete all Elasticsearch data):
Code:
sudo rm -rf /etc/elasticsearch/

Remove Elasticsearch log directory:

Code:
sudo rm -rf /var/log/elasticsearch/

Remove Elasticsearch user:

Code:
sudo userdel elasticsearch

it is a good practice to clean up the repository configurations:

Code:
sudo rm /etc/yum.repos.d/elasticsearch.repo

Follow removing all java versions with clicking here.Remove all java versions with care.

Code:
sudo yum install java-11-openjdk-devel


Import Elasticsearch GPG key:
Code:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Create a repository configuration file for Elasticsearch:

Code:
sudo nano /etc/yum.repos.d/elasticsearch.repo

Add the following lines to the file: Do not install newer or older versions for now.

Code:
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Save the file and exit the editor with CTRL + X and Install Elasticsearch:

Code:
sudo yum install elasticsearch

Configure Elasticsearch as you need.

Code:
sudo nano /etc/elasticsearch/elasticsearch.yml

Start and enable the Elasticsearch service:

Code:
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

Verify that Elasticsearch is running:

Code:
curl -XGET 'http://localhost:9200'

1687100088250.png

You can see that elasticsearch is active and running.

Then go to xenforo admin and activate elastic search as below:

1687100177375.png



And configure elasticsearch according to your needs.
 

Attachments

  • 1687100088250.png
    1687100088250.png
    34.3 KB · Views: 8
  • 1687100177375.png
    1687100177375.png
    152.9 KB · Views: 6

Featured content

Back
Top