Installing Pervasync Client for Oracle or MySQL

This section is for Java SE based sync client for Oracle or MySQL. See next section for sync client setup for SQLite that comes with Android and Blackberry devices. The installation process includes unpacking and setting up.

 

NOTE: Pervasync client requires Oracle/Sun JDK and may not be able to work with pre-installed OpenJDK or gcj on Linux. Refer to the appendix of this guide on steps of installing standalone Oracle/Sun JDK on Linux.

Getting and Un-Packing Pervasync Client Distribution

When you get your server up and running, local database users can download sync client from the start page of Pervasync server web app:

http://<server&gt;:<port>/pervasync, e.g. http://localhost:8080/pervasync

Download the client zip file, e.g. pervasync_client-4.0.0.zip, and save it on the computer that runs local database.

To install Pervasync client, choose a directory and un-pack the zip file there. For example, the following commands un-pack the client distribution and creates sync client home /pervasync_client-4.0.0 on a Linux/Unix machine.

cd /

unzip pervasync_client-4.0.0.zip

 

On Windows platform, replace “/” with “\”. By the way the sync home doesn’t have to be under the top most root directory.

A Pervasync client home has the following directory layout:

pervasync_client-4.0.0

|

+— bin // contains executables.

|

+— classes // contains Pervasync java classes

|

+— config // contains configurations files

|

+— demo // contains demo apps

|

+— doc // contains documentation

|

+— lib // contains library jars

|

+— README.txt // the readme file

NOTE: You may encounter file permission issues on Windows 7 and Linux if you un-pack the Pervasync home with an admin/root user account and later on setup or run the client with a non-admin user account. The reason is that at runtime, Pervasync needs to write some internal files so it has to have write permission to the home folder. The solution is to grant the runtime user FULL CONTROL of the Pervasync home. Better yet, make the runtime user the owner of the home.

Pervasync Client System Requirements

The first time you run the pvc program (pvc.bat or pvc.sh) located in the bin folder, you will be presented with a setup screen for you to perform setup. Before you do that, make sure you have the following ready.

Database Engines and JDBC Drivers

Pervasync client supports

  • MySQL version 5.0.2 or newer and
  • Oracle database version 8.1.7 or newer.

Install the desired database engine. You will also need JDBC drivers for Pervasync client to communicate with the database engine. You can download an Oracle JDBC driver (e.g. ojdbc5.jar or ojdbc6.jar) from Oracle:

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

and/or a MySQL Java connector (e.g., mysql-connector-java-5.x.x-bin.jar) from MySQL/Oracle:

http://dev.mysql.com/downloads/connector/j/.

Save the JDBC jar files to the lib directory under Pervasync client home.

Java Platform

The sync server and sync client are written in pure Java and can be installed on Windows, Linux and Unix platforms that has a JDK version 1.6 or newer installed.

Get the latest JDK from Oracle:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install JDK on client host following the instructions.

Setting up the Sync Client Using the Pervasync Client Setup Tool

The Sync client comes with a GUI Setup Tool that can be used to setup the sync client. This is the preferred way to do client setup. Alternatively, you could also use the setup scripts located in the “install” folder to do the setup. The steps are described in 4.2.4.

Launching the Sync Client Setup Tool by Invoking pvc.bat/pvc.sh

NOTE: Before you launch the Sync Client Setup Tool, you may want to edit the conf files located in the config directory. Some of the configurations, such as pervasync.client.db.user.options and pervasync.client.db.user.grants, affect setup as well as client runtime.

To launch the Sync Client Setup Tool, change directory to the “bin” folder of Pervasync client home and invoke “pvc.bat” for Windows or “pvc.sh” for Linux. A GUI window will pop up asking the database type of local DB.

 

NOTE: If you see the following error, most likely you are using a Java version older than JDK 6. Download and setup JDK 6 or newer.

In the DB type dialogue window, select MYSQL or ORADB (for Oracle databases) and click OK. Then you will be presented with the main setup window.

Carefully examine all the input fields and fill in proper values. Fields that have an asterisk (*) next to their names are required. Some fields are made read-only. If you do need to change their values, click “Advanced Mode” on the top right corner. Read following sections for explanations of each field.

Local Database Connection

Sync client needs a Pervasync admin schema to store its metadata. To create that schema, the database root/system user name and password are needed.

The top panel of the sync client setup tab is for local database connection info. Listed below are the explanations of text boxes of the GUI:

  • JDBC URL – This is the URL to the Pervasync client repository database. By default, it’s jdbc:oracle:thin:@//localhost:1521/xe for Oracle, and jdbc:mysql://localhost:3306/ for MySQL. You may need to edit it to reflect your database’s actual host name, port number and SID (for ORADB only). In normal mode this field is read-only. Check “Advanced Mode” on the top-right corner to make it editable.
  • System User – Name of a DB user with System privileges. Normally you use SYSTEM for Oracle and root for MySQL. This user/account should be pre-existent with your Oracle or MySQL DB. The System user is only used to create/drop Pervasync Admin user during setup/reset. The System password is not saved to be used during runtime.
  • System Password – System user’s password.
  • Pervasync Admin User – Pervasync client admin user name. If not already existing, a database user/schema with this name will be created in Pervasync DB repository at setup time. At reset time, the user/schema will be dropped.
  • Admin Password – Pervasync client admin user’s password.

Sync Server Connection

The bottom panel is for sync server connection. Sync client needs the following information to connect to and authenticate with a sync server.

  • Sync Server Url – Pervaync server URL. Use the host name/IP that has the sync servlet deployed. It’s

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s