Comment installer Maven sur CentOS

--Environnement - CentOS Linux release 7.6.1810 (Core) - tar (GNU tar) 1.26 - GNU Wget 1.14 built on linux-gnu.

Téléchargez l'archive

# 1.Passer à l'utilisateur root
$ sudo su -
[sudo] password for ponsuke: 

# 2.Télécharger
# wget https://www.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
--2020-04-02 16:32:40--  https://www.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
Resolving www.apache.org (www.apache.org)... 40.79.78.1, 95.216.24.32, 2a01:4f9:2a:185f::2
...réduction...
100%[=========================================================================================================================================================================>] 7,956,528   2.58MB/s   in 2.9s   

2020-04-02 16:33:48 (2.58 MB/s) - ‘apache-maven-3.2.5-bin.tar.gz’ saved [7956528/7956528]

Décompressez et placez

# tar xzvf apache-maven-3.2.5-bin.tar.gz -C /opt/
apache-maven-3.2.5/README.txt
...réduction...
apache-maven-3.2.5/lib/slf4j-simple-1.7.5.jar

Traverser

# 1.Passer de l'utilisateur root à vous-même
# exit
logout

# 2. .bash_Définissez le chemin dans le profil
$ vi ~/.bash_profile
↓ Ajouter ceci
PATH=$PATH:/opt/apache-maven-3.2.5/bin/
↓ Avant cela ↑ Ecrivez ceci
export PATH

# 3. .bash_Refléter le profil
$ source ~/.bash_profile 
[1]+  Done                    exec ibus-daemon -dx

# 4.Vérifier CHEMIN
$ printenv PATH
/sbin:/bin:...réduction...:/opt/apache-maven-3.2.5/bin/

Jetez un œil à la version pour voir si Maven fonctionne

#Mise en garde:La commande n'est pas maven
$ maven --version
bash: maven: command not found

#mvn est correct
$ mvn --version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T02:29:23+09:00)
Maven home: /opt/apache-maven-3.2.5
Java version: 1.8.0_212, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.12.2.el7.x86_64", arch: "amd64", family: "unix"

Recommended Posts

Comment installer Maven sur CentOS
Comment installer PyPy sur CentOS
Comment installer TensorFlow sur CentOS 7
Comment installer Apache (httpd) sur CentOS7
Comment installer Apache (httpd) sur CentOS8
Comment installer mysql-connector-python sur Mac
Étapes pour installer VirtualBox sur CentOS
Comment installer Graph-Tool sur macOS
Comment installer Git GUI et Gitk sur CentOS
Comment installer VMware-Tools sur Linux
Comment installer pycrypto sur Windows
Comment installer OpenCV sur Mac
[AWS EC2] Comment installer Maven sur Amazon Linux 2
Comment installer Music 21 sur Windows
Comment installer Python2.7 python3.5 avec pyenv (sur RHEL5 CentOS5) (novembre 2016)
Comment installer aws-session-manager-plugin sur Manajro Linux
[Kivy] Comment installer Kivy sur Windows [Python]
Comment installer des packages sur Alpine Linux
Comment installer Richzhang / Colorisation sur Windows 10
Comment installer php7.4 sur Linux (Ubuntu)
Comment installer NumPy sur Raspeye
Comment installer cx_Oracle sur macOS Sierra
Comment installer python3 avec docker centos
Comment installer Python
Comment installer pip
Comment installer Archlinux
Installez numba sur CentOS 7.2
Comment installer python
Installez Python3.4 sur CentOS 6.6
Comment installer BayesOpt
Installez mecab-python sur CentOS
Installez Python 2.7.3 sur CentOS 5.4
Comment installer Nbextensions
Comment installer Prover9
Installez awscli sur centos7
Installer Chainer sur CentOS 6.7
[Version 2020] Comment installer Python3 sur EC2 d'AWS
Comment installer OpenCV sur Jetson Nano Python
Comment installer rapidement h5py sur Windows 10 [non officiel]
Comment installer OpenGM sur OSX avec macports
Comment installer Camunda Modeler sur Manjaro Linux
[Python] Comment installer OpenCV sur Anaconda [Windows]
Comment installer / vérifier Graphviz sur anaconda / windows10
[2020.8 dernière] Comment installer Python
Comment installer Python [Windows]
Comment installer Tabpy 1.0 (version 2020-01)
Installez la série ImageMagick-6.2.x sur CentOS7.7
Installez Python 3.8 sur CentOS 7 (SCL)
Comment s'inscrire auprès de pypi
Comment installer mkl numpy
Installez Chrome sur la série CentOS 7
Comment installer le blog Pelican
Comment installer Linux sur un PC UEFI 32 bits
Comment installer git sur Linux tel que EC2
Comment installer Python à l'aide d'Anaconda
Étapes pour déployer EMLauncher sur CentOS 8
raspberry pi 4 centos7 installer sur docker
Comment installer et utiliser Tesseract-OCR
Instructions pour installer matplotlib sur votre Mac