Linux server Java environment deployment series (three): install git, maven

introduction

  Java build environment under the relevant article introduces Linux server: Install git, maven.

Series Document Catalog

  Linux server Java environment deployment series (a): Install the JDK

  Linux server Java environment deployment series (two): Install nginx, mysql, tomcat, redis

  Linux server Java environment deployment series (three): install git, maven

  Linux server Java environment deployment series (four): jenkins built environment

Install git

  Git installation, by way of the data source, and to configure the environment variables

installation steps

  • View source git repository information: yum init git
  • Installation dependencies:
    • yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
    • yum install gcc perl-ExtUtils-MakeMaker
  • Uninstalling the git: yum remove git
  • Download the installation package: wget https://github.com/git/git/archive/v2.16.2.tar.gz
  • Extract the source package:
    • Decompression: tar -zxvf v2.16.2.tar.gz
    • Open Directory: cd git-2.16.2
    • Compile: make prefix = / usr / local / git all
    • Git mounted to specify the path: make prefix = / usr / local / git install
  • Set global environment variables: vim / etc / profile 
    • export PATH="/usr/java/git/bin:$PATH" 
    • source /etc/profile
  • View version: git --version

Installation maven

  Installation maven, using a form downloaded from the official installation.

installation steps

  • Enter the specified directory: cd / usr / local / src /
  • Download maven, package: wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
  • Decompression renamed: the compressed file into the / usr / local directory (/usr/local/apache-maven-3.6.3)
  • Configuration environment variable: vi / etc / profile
    • export MAVEN_HOME=/usr/local/apache-maven-3.6.0
    • export PATH=$MAVEN_HOME/bin:$PATH
    • source /etc/profile
  • Verify the version: mvn -v
  • Permissions: chmod a + x / usr / local / maven / bin / mvn

Guess you like

Origin www.cnblogs.com/huanghzm/p/12191199.html