Blog

All Blog Posts  |  Next Post  |  Previous Post

TMS XData REST Server on Linux - Step by Step - Part 2

Monday, May 22, 2017

This is part 2 of the tutorial on how to create TMS XData and TMS Sparkle servers on Linux. On Part 1, we have installed Ubuntu and connected to it from Windows.

Here is video for second part: Installing PAServer on Linux and running our first "Hello, World" application on it.



To install PAServer, we need to send the tar.gz file containing PAServer files to Linux.

1. Download WinSCP from https://winscp.net/eng/download.php and install it.

To transfer files between Windows and Linux, we will use WinSCP tool. It's very convenient, just install it, and connect to Linux using same configuration/credentials we used when connecting with Putty (actually it even detects Putty is installed and asks if you want to import connection settings).

2. Transfer file LinuxPAServer19.0.tar.gz file to Linux

That file is located in the PAServer folder of your Delphi installation directory. If you used default settings, this should be in "C:Program Files (x86)EmbarcaderoStudio9.0PAServer" folder.

To transfer, just drag that file and drop it in WinSCP in the Linux folder you want. I recommend transferring it to your Linux home folder (/home/yourusername) which should be the default folder displayed when WinSCP is open.

3. Decompress PAServer

On Linux terminal, type the following command to decompress PAServer:

tar -xvf LinuxPAServer19.0.tar.gz


4. Launch PAServer

The files should be decompressed in a newly created folder named "PAServer-19.0". If you are still in the same directory, you can launch paserver with the following commands:

cd PAServer-19.0
./paserver


5. Create a new console application in Delphi with Linux64 support

Go back to Delphi and create a simple console application. Add Linux64 platform to it using the project manager. You can add a line to output a "Hello, Linux!" message:

WriteLn('Hello, Linux');


6. Build application to download SDK

Use menu "Project | Build" to build the console application. Delphi should warn you that you need Linux SDK, and would ask you for settings to connect to a Linux computer to download the SDK.

Type a name for the connection, enter the IP (or hostname) of the Ubuntu Linux computer we're running the PAServer, and you can proceed. Delphi should connect to the PAServer on Linux and download all files needed to build Linux applications. The download should take a while.

7. Run the application

Run the application (without debugging). Delphi should connect to the PAServer, send the application to Linux and launch it from there. If you go to Linux terminal, you should see the "Hello, Linux" message on it.

In the next part we will create and deploy our first Apache module on Linux.

Wagner Landgraf




This blog post has not received any comments yet.



Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post