Skip to content

Commit 83dcc1f

Browse files
committed
update sample VM setup instructions
1 parent 8991abc commit 83dcc1f

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

IoTSonnenUploader/OCISetup/SQLDBAccessClientSetupVM.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
11
#Setup a Linux instance VM connected to the VCN as per the IoT setup (be sure to enable the basion agent)
2+
# general update
3+
sudo dnf update --assumeyes
4+
5+
# install the oci command and it's dependencies
6+
sudo dnf -y install oraclelinux-developer-release-el9 --assumeyes
7+
sudo dnf install python39-oci-cli --assumeyes
28

39
#once VM is in place and you're connected using the bastion (The CreatebastionSession.sh can set this up for you)
410
#€install java and maven to allow for compilation as well as the sqlcl command
511
#we also need git to get the code itself
6-
# install the java version
12+
# install the desired java version
713
sudo dnf install java-25-openjdk-devel --assumeyes
14+
# try to switch to the new version
15+
sudo alternatives --config java
16+
sudo alternatives --config javac
17+
# For Oracle alternatives system
18+
# to list older versions of java if needed
19+
alternatives --list | grep java
20+
# to uninstall one (e.g. jre_17)
21+
sudo alternatives --remove-all jre_17
22+
sudo alternatives --remove-all jre_openjdk
23+
# for java installed using RPM
24+
dnf list --installed 'java-*-openjdk*' 'jdk-*'
25+
# then to remove
26+
sudo dnf remove java-17-openjdk-headless
27+
# make sure it's what we want
28+
sudo alternatives --display java
29+
sudo alternatives --display javac
30+
31+
make sure that the path is setup, if it's not then you'll need to do so
32+
echo $JAVA_HOME
33+
# this shoudl work
34+
sudo alternatives --config java
35+
#(then chose the java version you want)
36+
# logout then back in
37+
java -version
38+
#if it's not there (or wrong) then get the best path with and add to ~/.bash_profile
39+
40+
# IMPORTANT, you will then need to log out and back in
841
# this insista on installing jdk 17 with maven, so don't do that
942
#sudo dnf install maven --assumeyes
1043
# get maven, the dnf install method insiste oon installing jdk 17 and that's not what we want so we have to do it manually

0 commit comments

Comments
 (0)