-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsonarqube.sh
More file actions
32 lines (22 loc) · 764 Bytes
/
sonarqube.sh
File metadata and controls
32 lines (22 loc) · 764 Bytes
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
#!/bin/bash
## Sonarqube install on centos 7
## Please run this as user vagrant
user_name=`whoami`
if [ $user_name != vagrant ];
then
echo "Must be run as user vagrant !!!!"
exit 1
fi
sudo yum update -y
sudo yum install java-11-openjdk-devel -y
sudo yum install java-11-openjdk -y
cd /opt
sudo yum install wget unzip -y
sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.3.0.51899.zip
sudo unzip /opt/sonarqube-9.3.0.51899.zip
sudo chown -R vagrant:vagrant /opt/sonarqube-9.3.0.51899
cd /opt/sonarqube-9.3.0.51899/bin/linux-x86-64/
sudo firewall-cmd --permanent --add-port=9000/tcp
sudo firewall-cmd --reload
./sonar.sh start
echo "Installation done successfully please get the ip and access your sonarqube on the browser"