Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Running Easysearch on LoongArch 3C5000L Architecture

Tech May 10 2

Before installnig Easysearch on Loongnix-Server 8.4.1 (3C5000L), several system optimizations are required. Execute these commands as root:

# Configure file descriptors and memory limits
cat > /etc/security/limits.d/easysearch.conf << 'END'
* soft nofile 1048576
* hard nofile 1048576
* soft memlock unlimited
* hard memlock unlimited
END

# Disable transparent huge pages
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

# Kernel tuning parameters
cat > /etc/sysctl.d/easysearch.conf << 'END'
vm.max_map_count = 262145
net.core.somaxconn = 65535
net.ipv4.tcp_max_syn_backlog = 65535
END
sysctl -p /etc/sysctl.d/easysearch.conf

User Setup

groupadd -g 602 searchgrp
useradd -u 602 -g searchgrp -m -d /home/searchusr -s /bin/bash searchusr

Java Installation

wget http://ftp.loongnix.cn/Java/openjdk17/loongson-jdk17.tar.gz -P /tmp
mkdir -p /opt/java
tar -xzf /tmp/loongson-jdk17.tar.gz -C /opt/java --strip-components=1

cat > /etc/profile.d/java.sh << 'END'
export JAVA_HOME=/opt/java
export PATH=$JAVA_HOME/bin:$PATH
END
source /etc/profile

Easysearch Installation

curl -sSL http://get.infini.sh | bash -s -- -p easysearch -d /opt/easysearch
cd /opt/easysearch
bin/initialize.sh

Configuration

cat > config/easysearch.yml << 'END'
cluster.name: search-cluster
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
path.data: /opt/easysearch/data
security.enabled: true
END

# Adjust JVM settings
sed -i 's/Xms1g/Xms4g/' config/jvm.options

Service Startup

chown -R searchusr:searchgrp /opt/easysearch
su - searchusr
/opt/easysearch/bin/easysearch -d

Verification

curl -k https://localhost:9200
curl -k https://localhost:9200/_cluster/health?pretty

Addtiional Components

Console Installation

curl -sSL http://get.infini.sh | bash -s -- -p console
cd /opt/console
./console-linux-loong64 -service install
./console-linux-loong64 -service start

Agent Setup

curl -sSL http://get.infini.sh | bash -s -- -p agent
cd /opt/agent
sed -i 's/localhost:9200/localhost:8000/' agent.yml
./agent-linux-loong64 -service start

Load Testing

curl -sSL http://get.infini.sh | bash -s -- -p loadgen
cd /opt/loadgen
./loadgen-linux-loong64 -c 4 -d 10

Related Articles

SBUS Signal Analysis and Communication Implementation Using STM32 with Fus Remote Controller

Overview In a recent project, I utilized the SBUS protocol with the Fus remote controller to control a vehicle's basic operations, including movement, lights, and mode switching. This article is aimed...

Comprehensive Guide to Hive SQL Syntax and Operations

This article provides a detailed walkthrough of Hive SQL, categorizing its features and syntax for practical use. Hive SQL is segmented into the following categories: DDL Statements: Operations on...

Understanding the MP4 File Format and Analysis

Table of Contents Overview Fundamentals of the MP4 Format Key Concepts of the Container Format Box Structure Track Samples Sample Tables Chunks Detailed Explanation of Core Boxes Additional Boxes...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.