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