centos6.7 install MVN, install Elasticsearch ik participle

Source: Internet
Author: User

First talk about installing the MVN step, if it is installed can be ignored;

Under the TMP directory

1. Create a MVN directory

mkdir MVN

Cd/tmp/mvn

2. Download

wget http://apache.fayea.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

3. Unzip

TAR–XVF apache-maven-3.3.9-bin.tar.gz

4. Move to the Unified directory

MV Apache-maven-3.3.9/usr/local

5. Setting Environment variables

maven_home=/usr/local/apache-maven-3.3.9

Export Maven_home

Export Path=${path}:${maven_home}/bin

Source/etc/profile

6. Check if the MVN is installed successfully

Mvn–v

The above configuration is not permanent and requires access to the directory configuration file if it is to be permanently active:

Vim/etc/profile

Add at the end of the row:

Export maven_home=/usr/local/apache-maven-3.3.9
Export path= $MAVEN _home/bin: $PATH:

Export Es_home=/usr/share/elasticsearch
Export path= $ES _home/bin: $PATH:
Export ES_HEAP_MEM=2G

implementation of Source/ect/profile effective;

Next enter follow IK

1. Create an IK directory under/tmp/and download the file

Cd/tmp/ik

git clone Https://github.com/medcl/elasticsearch-analysis-ik
CD Elasticsearch-analysis-ik
MVN clean
MVN Compile
MVN Package

Copy & Unzip file #{project_path}/elasticsearch-analysis-ik/target/releases/elasticsearch-analysis-ik-*.zip to Your Elasticsearch ' s Folder:plugins/ik

modifying Linux environment variables

1, console settings, not in favor of this way, because he only to the current shell function, change a shell setting is invalid:

$PATH = "$PATH":/new_path (Close shell path reverts to the original path)

2, Modify the/etc/profile file, if your computer only as a development use of the push to use this method, because all the user's shell has the right to use this environment variable, may bring security issues to the system. This is for all the users, all the shells

Add at the bottom of/etc/profile: Export path= "$PATH:/new_path"

3, Modify the BASHRC file, this method is more secure, it can use these environment variable permissions to control the user level, here is for a specific user, if you need to give a user permissions to use these environment variables, you only need to modify their personal user home directory. The BASHRC file is available.

Add the following:

Export path= "$PATH:/new_path"

centos6.7 install MVN, install Elasticsearch ik participle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.