EverKB

Knowledge Base Ever

Namestite Elasticsearch 7.3 na CentOS7

2020-01-14 15:52:48

Oznaka: CentOS, Elasticsearch, CentOS7, Elasticsearch7.3, Namestite Elasticsearch, uradni Elasticsearch

Uredite datoteko /etc/yum.repos.d/elasticsearch.repo na naslednji način:

[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

Po namestitvi YUM nastavite zagon in zaženite storitev.

yum -y install elasticsearch

systemctl daemon-reload
systemctl enable elasticsearch
systemctl start elasticsearch

Spremenite konfiguracijsko datoteko /etc/elasticsearch/elasticsearch.yml

Pod vrstico #secruity dodajte konfiguracijo, ki ima dovoljenje, shranite in zapustite
network.host: 192.168.0.10

http.port: 9200

cluster.initial_master_nodes: ["node-1"]

Znova zaženite elastično iskanje in odjemalca lahko uporabite za daljinsko povezavo.

[root@localhost ~]# systemctl restart elasticsearch

[root@localhost ~]# curl 192.168.0.10:9200
{
  "name" : "carbon",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "RmfeiseHQ8C5S9eF7gG6aQ",
  "version" : {
    "number" : "7.3.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "de777fa",
    "build_date" : "2019-07-24T18:30:11.767338Z",
    "build_snapshot" : false,
    "lucene_version" : "8.1.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
[root@carbon ~]#

Težava: Po nastavitvi preverjanja pooblastila se vzpostavi tudi uporabnik in geslo, vendar se odjemalec ne more povezati.

Rešitev: Ustavite požarni zid
systemctl stop firewalld
systemctl stop iptables

Vprašanje: Poziv pri dostopu do programa ElasticSearch: Elasticsearch cluster 'master_not_discovered_exception'

Rešitev: Ta težava se je pojavila pri nameščanju Elasticsearch 7.5 v CentOS8. Razlog je v tem, da vozlišča med seboj ne morejo odkriti. Če obstaja samo eno vozlišče, lahko spremenite konfiguracijsko datoteko in ime vozlišča nastavite na node-1.

Priporočljivo je, da nastavite velikost predpomnilnika polja na 50% dejanskega pomnilnika.
vim /etc/elasticsearch/elasticsearch.yml

node.name: node-1

indices.fielddata.cache.size: 2gb

Oznaka

CentOS7 CentOS PHP Linux Python3 Python MySQL MariaDB YUM JavaScript CSS Redis MySQL8 caching_sha2_password HTML mysql_native_password PHP7 node.js ShadowsocksR vertical-align CURLFille horiz-align PyCharm SUBDATE BarManager exec mb_substr PEAR SOCKS5 Proxy Server WebStorm date add IntelliJIDEA remi Tag Chrome find PHP5.5 src Apache du jQuery nginx Shadowsocks-Python V2Ray cURL hide PostgreSQL sub folder availability eth0 MariaDB10.4 pdo_sqlsrv SOCKS5 Web Server date Install MongoDB mssql-tools register_shutdown_function Symfony File Upload php-fpm sqlsrv Zend Framework ADDDATE DevExpress JetBrain network interface Shadowsocks-Libev unixODBC-devel height Port 80 string Aura error_get_last password policy requirements SOCKS Web Development data INDENTIFIED BY msodbcsql Redis5 SVN Fedora Media Writer SQLAlchemy absolute Deepin jemalloc mysqlclient Shadowsocks toggle convert FuelPHP PHPUnit Framework ss5.passwd at-symbol Error Control Operator margin password SOCKET vps daemon process IIS MongoDB4 sudoers center Fatal Errors Phalcon SQL Server 2017 WiFi .htaccess DATE_SUB set_error_handler TestCase Compiling PHP frequency conflict PHPUnit ss5.conf apr Elasticsearch7.3 particles.js Slim Vincent Garreau daemon HTTP MongoDB Sudo Failed to build these modules: _uuid pg_bha.conf SQL Server width DATE_ADD ip command MySQL-python scrollbar Tcp BBR Compiling Apache Frameworks PHPStorm ss5-3.8.9 Apache2.4 Elasticsearch libpython3.7m.so.1.0 NodeJs show VIM CURLOPT_POSTFIELDS substr Bluetooth Failed to build these modules: _ctypes Minimal ISO PECL SQL Date Funcitons Wi-Fi date sub INTERVAL root Tag Cloud CodeIgniter font-size ss5 apache httpd dual network interfaces Laravel