Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Running Easysearch on LoongArch 3C5000L Architecture

Tech May 10 13

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

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

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