I have a virtual machine located in an OCI private subnet. I need to install an Oracle software (e.g. Oracle ODI) in this VM.
How I can download the software to this VM?
We have a couple of options:
1- Download the software to your laptop, then sftp it to the VM (connecting through VPN and your private key) ==> a little bit slow.
2- -The other option that I’m going to use here is using wget script to download directly from the VM.
You may ask, How can I download directly from the VPN as long as it is located in a private subnet and not exposed to the internet?
You are right, the solution is to use a NAT gateway in your VCN.
What is NAT Gateway:
NAT is a networking technique commonly used to give an entire private network access to the internet without assigning each host a public IPv4 address. The hosts can initiate connections to the internet and receive responses, but not receive inbound connections initiated from the internet.
When a host in the private network initiates an internet-bound connection, the NAT device’s public IP address becomes the source IP address for the outbound traffic. The response traffic from the internet therefore uses that public IP address as the destination IP address. The NAT device then routes the response to the host in the private network that initiated the connection.
Prepare the WGET Script:
Login to the edlivery.oracle.com and select the required software to download:
Click the “WGET Options”:
Click the “Download.sh” button, this will download a script called wget.sh to your laptop.
You can either sftp this small script to your VM, or open it, copy its content and paste to a new file called wget.sh in your VM.
Don’t forget to make that script executable (chmod +x wget.sh)
Download the Software:
From your VM, run the wget.sh script, it will prompt you for the MOS username and password:
After that, it will start to download the software, but you will not see any other messages until it finishes.
To monitor the download progress, open another session and tail the log file that is generated at the same download directory:
It took just 3-4 minutes to download the above 1.9GB file.