


This article mainly introduces the installation and pit filling of elastic search on centos7. The editor thinks it is quite good. Now I will share it with you and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.
This article introduces the installation and pit filling of elastic search on centos7. I would like to share it with you. Let’s take a look.
Course Recommendation →: "Elasticsearch Full Text Search Practical Combat" (Practical Video)
From the course"Ten Million Level Data concurrency solution (theory + practical)》
Download elastic search 5.3.0
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.0.tar.gz mv elasticsearch-5.3.0.tar.gz /opt cd /opt tar -xzvf elasticsearch-5.3.0.tar.gz cd elasticsearch-5.3.0/
Start ES
cd /bin ./elasticsearch
According to theory, it should be ok, but then various pitfalls appeared one by one, respectively explaining
Error 1: error='Cannot allocate memory' (errno= 12)
error='Cannot allocate memory'
solutions:
Since elasticsearch5.0 allocates jvm space size of 2g by default, it needs to be changed to a smaller size
vim config/jvm.options -Xms2g → -Xms512m -Xmx2g → -Xmx512m
Error 2: can not run elasticsearch as root
can not run elasticsearch as root
solutions:
In Linux environment, elasticsearch is not allowed to run as root Run with root privileges! So you need to create a non-root user, start as a non-root user es
groupadd elk # 创建用户组elk useradd elk -g elk -p 111111 # 创建新用户elk,-g elk 设置其用户组为 elk,-p 111 设置其密码6个1 chown -R elk:elk /opt # 更改 /opt 文件夹及内部文件的所属用户及组为 elk:elk su elk # 切换到非root用户elk下来
Error 3: (1) max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
(2) max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
This error occurs when modifying network.host in config/elasticsearch.yml to network.host: 0.0.0.0 so that any IP on the external network can access it.
solutions:
Switch to the root user, and then
vim /etc/security/limits.conf * soft nofile 300000 * hard nofile 300000 * soft nproc 102400 * soft memlock unlimited * hard memlock unlimited
Error 4: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
sysctl -w vm.max_map_count=262144The persistence method is to modify the vm.max_map_count parameter in the /etc/sysctl.conf file:
echo "vm.max_map_count=262144" > /etc/sysctl.conf sysctl -p
Install the visualization plug-in elasticsearch-head
git clone git://github.com/mobz/elasticsearch-head.git cd elasticsearch-head npm install # 此处我试图用cnpm install有问题,用npm可以 npm run start
Finally, let’s do a simple test
Create a new Index and make a PUT request directly to the Elastic server. The following example creates a new Index named weather.Detailed installation and configuration of apache, php7 and mysql5.7 in CentOS7
Introduction to the installation method of Mysql5.7.19 under Centos7
What is the difference between installing mysql under centos7 and under linux
The above is the detailed content of Detailed explanation of elastic search installation on centos7. For more information, please follow other related articles on the PHP Chinese website!

Shell scripts are powerful tools for automated execution of commands in Linux systems. 1) The shell script executes commands line by line through the interpreter to process variable substitution and conditional judgment. 2) The basic usage includes backup operations, such as using the tar command to back up the directory. 3) Advanced usage involves the use of functions and case statements to manage services. 4) Debugging skills include using set-x to enable debugging mode and set-e to exit when the command fails. 5) Performance optimization is recommended to avoid subshells, use arrays and optimization loops.

Linux is a Unix-based multi-user, multi-tasking operating system that emphasizes simplicity, modularity and openness. Its core functions include: file system: organized in a tree structure, supports multiple file systems such as ext4, XFS, Btrfs, and use df-T to view file system types. Process management: View the process through the ps command, manage the process using PID, involving priority settings and signal processing. Network configuration: Flexible setting of IP addresses and managing network services, and use sudoipaddradd to configure IP. These features are applied in real-life operations through basic commands and advanced script automation, improving efficiency and reducing errors.

The methods to enter Linux maintenance mode include: 1. Edit the GRUB configuration file, add "single" or "1" parameters and update the GRUB configuration; 2. Edit the startup parameters in the GRUB menu, add "single" or "1". Exit maintenance mode only requires restarting the system. With these steps, you can quickly enter maintenance mode when needed and exit safely, ensuring system stability and security.

The core components of Linux include kernel, shell, file system, process management and memory management. 1) Kernel management system resources, 2) shell provides user interaction interface, 3) file system supports multiple formats, 4) Process management is implemented through system calls such as fork, and 5) memory management uses virtual memory technology.

The core components of the Linux system include the kernel, file system, and user space. 1. The kernel manages hardware resources and provides basic services. 2. The file system is responsible for data storage and organization. 3. Run user programs and services in the user space.

Maintenance mode is a special operating level entered in Linux systems through single-user mode or rescue mode, and is used for system maintenance and repair. 1. Enter maintenance mode and use the command "sudosystemctlisolaterscue.target". 2. In maintenance mode, you can check and repair the file system and use the command "fsck/dev/sda1". 3. Advanced usage includes resetting the root user password, mounting the file system in read and write mode and editing the password file.

Maintenance mode is used for system maintenance and repair, allowing administrators to work in a simplified environment. 1. System Repair: Repair corrupt file system and boot loader. 2. Password reset: reset the root user password. 3. Package management: Install, update or delete software packages. By modifying the GRUB configuration or entering maintenance mode with specific keys, you can safely exit after performing maintenance tasks.

Linux network configuration can be completed through the following steps: 1. Configure the network interface, use the ip command to temporarily set or edit the configuration file persistence settings. 2. Set up a static IP, suitable for devices that require a fixed IP. 3. Manage the firewall and use the iptables or firewalld tools to control network traffic.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
