1. Environment Description
CentOS 7.7 x64
elasticSearch-7.6.1-linux-x64
nodejs v13.10.1
6.13.7 asl
phantomjs-2.1.16-linux-x86_64
2. Install nodejs and npm
Since elasticsearch-head constructed using the node, so it is necessary to install.
Please refer to: node.js installation configuration
3. Install phantomjs
Transfer the whole of this step: Web front end of the study notes to install and use phantomjs
3.1 Download
Visit: https://phantomjs.org/download.html , select the version, right, copy the link address
Log on to Linux, enter the directory you want to install, use wget to download:
cd /usr/local/server/phantomjs
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Wait for the download to complete
3.2. Phantomjs dependent software installation
yum install fontconfig
yum install bzip2
3.3. Unpack
Decompression bz2 package:
bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2
Extract the tar package:
tar -xvf phantomjs-2.1.1-linux-x86_64.tar
3.4. Configuration Environment Variables
Here does not modify the path, only phantomjs soft link to the file environment variable:
ln -s /usr/local/server/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
3.5. Test Command
Enter "phantomjs", can enter the command line:
You can see, the installation was successful. ctrl + c to exit the command line
4. Installation git
Elasticsearch-head current source is hosted on GitHub, git downloaded to the local need, and then perform the installation
yum install git
5. Download elasticsearch-head installation package
cd /usr/local/server/
git clone https://github.com/mobz/elasticsearch-head.git
6. Install grunt
cd elasticsearch-head
npm install grunt --save, results:
7. Modify configuration
7.1. Modify the host and listener port
文件:elasticsearch-head/Gruntfile.js
The default listening port 9200 of 127.0.0.1, as we increase the hostname * indicates monitor all the host, that is, local, intranet, extranet can access; and modifying the port is listening.
7.2. Modify the connection address head, that is, to make head found elasticSearch (optional, this is just a default connection address, you can specify the es-head page)
File: elasticsearch / _site / app.js, search "localhost: 9200", find this line:
The localhost address into elasticSearch services, such as:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://x.x.x.x:7712";
8. Perform install, download dependencies
npm install
If there are mistakes, the first implementation of npm install [email protected] --ignore-scripts , and then execute npm install just fine:
Installation successful results:
9. Start
npm run start, the results:
10. Browser Test Access
I really have only one node-1 node. Thus, elasticsearch-head installation
11. Reference
Installation under Linux elasticSearch and head installation