A-Team Chronicles

Installing Data Sync in Oracle Compute - Oracle Linux on Oracle Cloud Infrastructure (OCI)

October 7, 2016
Text Size 100%:

* This blog was last tested on Oracle Linux 7.9 Image build 2021.04.09-0 + Oracle Analytics Cloud Data Sync (2.6.1) by Jay Pearson (Oracle A-Team) * 

For other A-Team articles about OAC and Data Sync, click here


The Data Sync tool provides the ability to extract from both on-premise, and cloud data sources, and to load that data into relational databases. In some use cases, both the source databases, and the target, may be in 'the Cloud'. Rather than run the Data Sync tool 'On-Premise' to extract data down from the cloud, only to load it back up again, this article outlines an approach where the Data Sync tool is installed and run in an Oracle Compute Instance in the Cloud. In this way all data movement and processing happens in 'the cloud' and no on-premise install is required.

Main Article

In this example Data Sync will be installed into its own Instance in Oracle Compute.

In theory you could install into any existing compute instance, for example JCS, DBCS, etc., although there the Data Sync tool would be sharing the same file system as other applications. This could, for example, be a problem in the case of a restore where files may be overwritten. Where possible, it is therefore recommended that a separate Compute Instance is created for Data Sync.

Create Compute Instance

1. In Compute, chose a suitable Image, Shape and Storage for the planned workload. It is recommended to give Data Sync at least 8 GB of memory.

2. In this example this shape was used: VM.Standard.E4.Flex Virtual Machine, 1 core OCPU, 16 GB memory, 1 Gbps network bandwidth:

3. Once created, obtain the Public IP from the instance.

Create SSH Session and Install VNC

We will set up an SSH connection and a VNC session on the Compute Instance for Data Sync to run in. When the user disconnects from the session, Data Sync will continue to operate. It will also allow multiple developers to connect to VNC and share the same session from anywhere in the world.

There are many SSH tools, in this case the free windows tool, Putty, will be used, although other tools can be configured in a similar manner.  Putty can be download from here.

Follow the instructions here to convert the generated .key private key file to a .ppk file that Putty can use.

Convert a generated .key private key file:

a) Open PuTTYgen.

b) Click Load, and select the private key generated when you created the instance. The extension for the key file is .key.

c) Enter a passphrase

d) Click Save private key.

e) Specify a name for the key. The extension for new private key is .ppk.

f) Click Save.

1. Open Putty and Set Up a Connection using the IP of the Instance obtained in step (a) and port 22.


2. Expand the 'Connection' / 'SSH' / 'Auth' menu item. Browse in the 'Private key file for authentication' section to the Private  .ppk file generated in PuTTYgen in the previous steps.


3. Return to the 'Session' section, give the session a name and save it.  Then hit 'Open' to start the connection to the Compute Instance.


4. For the 'Login as' user, enter 'opc'. If you specified a 'Passphrase' when creating the .ppk, use the passphrase for the SSH Key.

If the connection is successful, then a command prompt should appear after these have been entered:


5. Follow the steps in this video to Configure the GUI and VNC Service for Oracle Linux on Oracle Cloud Infrastructure.

6. Run the following command to prevent the Window Manager from displaying a lock screen:

gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false

7. If not already running, start VNC server with the following command:

vncserver :1 -depth 16 -alwaysshared -geometry 1200x750 -s off

NOTE - in the command line above, the part '1200x750' is a lower case 'X' character.  When viewed in a browser it may change this to '×' character.  That will not work if cut and paste, so be sue to use a lowercase 'x'.

8. Figure out which port VNC is using

We're going to use SSH port forwarding.  To do this, we need to confirm the port that is being used by VNC.

Typically the port is 5900 + N, where N is the display number.

In the screenshot below when VNC was started, it shows the screen is number 1 (the value after the ':' in "d32f4d : 1" ) so in this case the port is 5901.  This will typically be the port number, but if other VNC sessions are already running, then it may be different.

To test this, run this command:

netstat -anp | grep 5901

This should confirm the process listening on that port - in this case, VNC:


9. Exit the putty session by typing 'exit' and return once to exit the oracle user, and 'exit' and return again to exit the putty session.

Create SSH Tunnel and Start VNC Session

1. Create the SSH Tunnel

Open putty again and load the saved session from earlier.  Open the 'Connection' / 'SSH' / 'Tunnel' menu item.

We need to create an SSH tunnel to forward VNC traffic from the local host to port 5901 on the Compute Instance.

In this example we enter the Local Port also as 5901, and then in the Destination, the IP address of the Compute Instance, followed by a ':' and then 5901.  Select 'Add' to set up the tunnel.


2. Return back to the top 'Session' menu and 'Save' the session again to capture the changes, then Open the session again and connect as 'opc' and enter the passphrase.


3.  If a VNC client is not installed on the user's machine, download one.  In this case the free viewer from RealVNC which can be downloaded from here is being used.

4. Open VNC viewer and for the target, enter 'localhost:5901'.  VNC will attempt to connect to the local port 5901, which will then be redirected by SSH to port 5901 on the target.


Anytime a VNC session is going to be used, the putty session must be open (although some VNC tools will also set up the SSH session for you, in which case you can use that if preferred).

5. Enter the VNC password and the session will be connected.  If there is an error message within the VNC session stating 'Authentication is Required to set the network proxy used for downloading packages', then click 'Cancel' to ignore it.

6. An alternative option is to use MobaXterm.

Install Data Sync Software in Oracle Compute

Note: When this was re-tested it was installed in opc home directory.

1. Within the connected VNC session, open a Terminal session


2. To turn on copy and paste between the client and the VNC session, enter:

vncconfig -nowin &

3. Download the Data Sync and JDK Software

Open Firefox within the VNC session and download the required software.

Be sure to download and install the latest version of the Data Sync Tool from OTN through this link.

Data Sync requires JDK8.  You can download that through this link.

For the JDK, select one of the Linux x64 versions.

4. Plan where to in install the software.

Take a look at the file system and see which makes the most case in your scenario.  In this example we are using the /home/oracle directory in a sub-directory we created called 'datasync'.  Depending on the configuration of the Compute Instance and its storage, there may be better choices.

5. Extract both the JDK and Data Sync software to that directory.


6. Edit the 'config.sh' file to point to the location of the JDK


7. Start Data Sync by running


Then go through the standard steps for setting up and configuring the Data Sync tool.

For more information on setting up Data Sync, see this article.

Other Data Sync documentation can be found here.

Once the VNC session has been set up, then other users can also connect. They will just need to complete the following steps from above:

Create SSH Session and Install VNC, Steps 1, 2 & 3

Create SSH Tunnel and Start VNC Session, Steps 1 & 2


This article walked through the steps to create a Compute Instance, accessible through VNC over SSH, and then to install Data Sync into that  for loading scenarios where an on-premise footprint is not required.

For other A-Team articles about OAC and Data Sync, click here.

Richard Williams

Senior Director, Delivery and Architecture Strategy

Previous Post

Publishing update events from SCM cloud R11 using BI publisher reports and scheduled job on Oracle cloud.

Mani Krishnan | 6 min read

Next Post

A First Look at the New Web Form in PCS

Siming Mu | 6 min read