-
Notifications
You must be signed in to change notification settings - Fork 1
/
Installation
78 lines (61 loc) · 2.34 KB
/
Installation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Steps from https://linuxize.com/post/how-to-install-apache-maven-on-ubuntu-18-04/
Below are the steps to install Java, Maven, Git, Jenkins
===========================================
Install a machine with Ubuntu and enable all traffic [Refering QualityThought Portal references]
sudo apt-get update
sudo apt-get install tree
sudo apt-get update
Installing Java
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
java -version
sudo vi /etc/profile
add bellow steps end of file
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
Installing Maven
change directory to /opt
sudo wget http://www-eu.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
sudo tar -zxvf apache-maven-3.5.4-bin.tar.gz
sudo ln -s /opt/apache-maven-3.5.4/bin/mvn /usr/bin/mvn
[
ubuntu@ip-172-31-41-96:/opt$ ls -ltr /opt/apache-maven-3.5.4/bin/mvn
-rwxr-xr-x 1 501 staff 5741 Jun 17 2018 /opt/apache-maven-3.5.4/bin/mvn
ubuntu@ip-172-31-41-96:/opt$ ls -l /usr/bin/mvn
ls: cannot access '/usr/bin/mvn': No such file or directory
ubuntu@ip-172-31-41-96:/opt$ sudo ln -s /opt/apache-maven-3.5.4/bin/mvn /usr/bin/mvn
ubuntu@ip-172-31-41-96:/opt$ ls -l /usr/bin/mvn
lrwxrwxrwx 1 root root 31 Jan 23 11:52 /usr/bin/mvn -> /opt/apache-maven-3.5.4/bin/mvn
ubuntu@ip-172-31-41-96:/opt$
]
sudo vi /etc/profile
M2_HOME=/opt/apache-maven-3.5.4
PATH=$PATH:$M2_HOME/bin
export M2_HOME
export PATH
mvn -version
sudo apt-get install git
Installing Jenkins
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
-------------------------------
Maven Installation instructions
sudo apt-get update
sudo apt-get install tree
sudo apt-get update
sudo apt install maven
mvn -version
sudo apt install default-jdk
java -version
wget https://www-us.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz -P /tmp
sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt
sudo nano /etc/profile.d/maven.sh
export JAVA_HOME=/usr/lib/jvm/default-java
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
sudo chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh