Installation

When you install the PureWeb SDK, you install API libraries to develop your service and your client, the PureWeb server which provides middle tier functionality, as well as sample applications to get you started quickly.

You may need to install different components on different operating systems. For example, if you want to develop a service using C++ on Linux with an iOS client on Mac.

Here's what's available for each operating system:

  • Windows: PureWeb server, as well as APIs and samples for service (C++, .Net, Java) and client (HTML5, Android) development
  • Linux: PureWeb server, as well as APIs and samples for service (C++) and client (HTML5) development
  • Mac: APIs and samples to develop an iOS client (Objective-C / Swift)

If you are just trying PureWeb, you can download the installers on the web site. The free trial is fully functional and comes with a time-limited license for the PureWeb server.

Regardless of whether you are installing a trial version or a non-trial one, please make sure that you have your PureWeb server license (.lic) file handy before completing the steps on this page.

For an overview of the installed directory structure, see Folder structure.


Install the libraries and samples

Before completing the procedure below, uninstall any previous instances of the PureWeb server from your computer.

On Windows, it is possible to keep multiple instances on the same computer, but not recommended. See Run multiple instances on Windows.

Windows

The Windows installer is a simple executable (.exe) file. To install, simply double-click this file and follow the prompts in the wizard.

If you choose an installation location other than the default (C:\CSI\PureWeb), ensure that the path does not contain any spaces.

Once you have completed the install, check that the following environment variables have been added:

  • PUREWEB_HOME: [install_path]\Server
  • PUREWEB_LIBS: [install_path]\SDK\Redistributable\Libs

Place the .lic license file in the server directory:
[install_path]\Server\conf\

Ubuntu

The installer for Ubuntu is a .deb file. Save this file on your Linux computer and make note of its location.

Run the install command:
sudo dpkg -i [filename].deb
If you get an error about missing dependencies, run the following command:
sudo apt-get -fy install

If you choose an installation location other than the default (/opt/CSI/PureWeb), ensure that the path does not contain any spaces.

Navigate to the folder where you saved the license file and copy it to the installed server. The command below assumes you installed the components in the default location:
sudo cp pureweb-[version].lic /opt/CSI/PureWeb/Server/conf

Log out of your operating system and log in again.

Check that you have a PUREWEB_HOME and a PUREWEB_LIBS environment variable. The two commands below should return the path value for these variables.

  • echo $PUREWEB_HOME
  • echo $PUREWEB_LIBS

Red Hat

The installer for Red Hat is an .rpm file. Save this file on your Linux computer and make note of its location.

Run the following command:
sudo rpm -ivh [filename].rpm

If you choose an installation location other than the default (/opt/CSI/PureWeb), ensure that the path does not contain any spaces.

Navigate to the folder where you saved the license file and copy it to the installed server. The command below assumes you installed the components in the default location:
sudo cp pureweb-[version].lic /opt/CSI/PureWeb/Server/conf

Log out of your operating system and log in again.

Check that you have a PUREWEB_HOME and a PUREWEB_LIBS environment variable. The two commands below should return the path value for these variables.

  • echo $PUREWEB_HOME
  • echo $PUREWEB_LIBS

Mac

Install the libraries

The PureWeb components for Mac are installed using CocoaPods.

Review the Cocoapods documentation for installation instructions and how to add pods to an Xcode project. A sample pod file for PureWeb is available here.

You can use the PureWeb iOS SDK to develop in either Objective-C or Swift. If you are going to use it from Swift, import the SDK like you would any other library. If you are going to use a mixture of Objective-C and Swift, you need to create a bridging header. Click here to see more information about this from the Apple developer site.

Install the samples

The source files for the sample iOS apps can be cloned from the following GitHub repository:
https://github.com/calgaryscientific/pureweb-ios-samples

See Build the sample applications for instructions on how to work with the samples.


Verify the installation

To confirm that the installation was successful, launch the PureWeb server and log in (this step is not necessary on Mac).

Windows

Start the server by double-clicking the Start PureWeb icon on the Windows desktop.

Log in:

  1. Navigate to the server’s URL (default: http://localhost:8080).
  2. Enter your login credentials (default: use admin for both the name and password).
  3. Click Sign In.

Click the server’s menu links (Apps, Status, Configuration, etc.) to ensure that they work.

Linux

Launch the server:

  1. Navigate to the following location:
    /[install_path]/Server/tomcat/bin
  2. Type the command:
    sudo ./startup.sh

Log in:

  1. Navigate to the server’s URL (default: http://localhost:8080).
  2. Enter your login credentials (default: use admin for both the name and password).
  3. Click Sign In.

Click the server’s menu links (Apps, Status, Configuration, etc.) to ensure that they work.


Change default settings

After installing the PureWeb server, you may wish to edit some of the default configuration settings.

The links below provide instructions on the most common configuration procedures.


Folder structure

The installed location for the PureWeb server contains two main directories: SDK and Server.

  • SDK: Contains the sample applications and redistributable libraries. The Templates sub-directory is used by the sample applications. On Windows, because the installer lets you choose which components to install, the SDK directory will only contain the samples relevant for the components that you selected.
  • Server: Contains the files necessary for configuring and running the PureWeb server, as well as the files from your deployed application. This is also where logs and configuration backups are stored.

Below are topics that contain more information about the directory structure:

  • Configuration file hierarchy: a list of the most commonly edited configuration files
  • Removing applications: a list of locations where application-specific files can be found
  • Logs: a list of available logs and their location on the server
  • Source code: a breakdown of where to find the sample code files for each supported API