-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild_java.sh
38 lines (26 loc) · 860 Bytes
/
build_java.sh
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
#!/bin/sh
########################################################################################
#
# Install JDK Script
#
# Shawn Ma
#
########################################################################################
# Define
HOST=192.168.1.158
TARGET=jdk-7u25-linux-x64.tar.gz
SOURCE=http://$HOST/deploy/java/dist/$TARGET
# Create a build directory
mkdir -p /opt/install/java && cd /opt/install/java
# Prepare for compilation source
curl -o $TARGET $SOURCE
mkdir -p tmp && tar -zxvf $TARGET -C tmp
# Install build dependencies
# Create a User Group
# Compile and deploy
mkdir -p /opt/environment/java && mv tmp/* /opt/environment/java/1.7.0
# Postinstallation setup
export PATH=$PATH:/opt/environment/java/1.7.0/bin
# Configuration
# Additional
#sed -i '/export PATH$/a\export PATH=$PATH:\/opt\/environment\/java\/1.7\/bin' /etc/profile