forked from artisantek/jfrog-installation-ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-jfrog-ubuntu.sh
49 lines (41 loc) · 1.92 KB
/
install-jfrog-ubuntu.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
echo "\n################################################################"
echo "# #"
echo "# ***Artisan Tek*** #"
echo "# Artifactory Installation #"
echo "# #"
echo "################################################################"
# Installing necessary packages
echo "\n\n*****Installing necessary packages"
sudo apt-get update -y > /dev/null 2>&1
sudo apt-get install -y default-jre unzip > /dev/null 2>&1
echo " -> Done"
# Configuring Artifactory as a Service
echo "*****Configuring Artifactory as a Service"
sudo useradd -r -m -U -d /opt/artifactory -s /bin/false artifactory 2>/dev/null
sudo cp artifactory.service /etc/systemd/system/artifactory.service
sudo systemctl daemon-reload 1>/dev/null
echo " -> Done"
# Downloading JFROG Artifactory 6.9.6 version to OPT folder
echo "*****Downloading JFROG Artifactory 6.9.6 version"
sudo systemctl stop artifactory > /dev/null 2>&1
cd /opt
sudo rm -rf jfrog* artifactory*
sudo wget -q https://jfrog.bintray.com/artifactory/jfrog-artifactory-oss-6.9.6.zip
sudo unzip -q jfrog-artifactory-oss-6.9.6.zip -d /opt/artifactory 1>/dev/null
sudo chown -R artifactory: /opt/artifactory/*
sudo rm -rf jfrog-artifactory-oss-6.9.6.zip
echo " -> Done"
# Starting Artifactory Service
echo "*****Starting Artifactory Service"
sudo systemctl start artifactory 1>/dev/null
# Check if Artifactory is working
sudo systemctl is-active --quiet artifactory
echo "\n################################################################ \n"
if [ $? -eq 0 ]; then
echo "Artifactory installed Successfully"
echo "Access Artifactory using $(curl -s ifconfig.me):8081"
else
echo "Artifactory installation failed"
fi
echo "\n################################################################ \n"