Thursday, 29 December 2016

Setting up SUSE Linux Enterprise Server/openSUSE Server for the Delphi on Linux Beta

- or how-to setup PAServer on Linux.


Jim McKeeth mentions in his first part of getting ready to Delphi on Linux Beta, that you can use either Red Hat/Fedora or Ubuntu - and follows up in part 2 to show how-to setup Ubuntu Server - Malcolm Groves then supplements this with the needed setup for Fedora Server.

Even if the two distributions mentioned above seems to be the officially supported - there should not be any reason for not using your AMD64/Intel64 Linux distribution of choice. Since popularity can be based on region and industry - I think it is also relevant to mention SUSE and plain Debian.

I will supplement here with the steps needed for the SUSE variants, and installation of the PAServer on Linux.
It has been many years since I last used SuSE distributions, so I might be a bit rusty on this distribution. It should also be said that it was a distribution that we were quite happy with - but we moved to distribute Cobalt Qube 3 Server appliances with a RH-based Linux distribution (and InterBase preinstalled) - and after that I have used mostly Ubuntu/Debian based.

Disclaimer: Even if SUSE Linux Enterprise Server/openSUSE is available for platforms like IBM Power, z Systems and Raspberry Pi - this post is only relevant for the AMD64/Intel 64 distributions.

Fun trivia: SUSE is today own by the same company - Micro Focus - that bought the ALM part of Borland - whereas the Developer/Database tools were aquired by Embarcadero/IDERA.

So after you have downloaded and installed your SUSE distribution - using the openSUSE Leap 42.2 net install image these couple of days - greets you with "seasonal" installer:


Ubuntu uses the apt-get package manager -  the equivalent in SUSE is zypper. A helpful list of equivalent package manager commands can be found here.

If you did not use a net installer image like I did - you might need to a update, upgrade and dist-upgrade cycle:

sudo zypper lp
sudo zypper patch
sudo zypper up

If you are a bit bothered by repeating prefixing with sudo - you can do a su - to switch to root.

After the text-only install I did in the video, you need to install the equivalent to the Ubuntu "build-essential":

sudo zypper in -t pattern "devel_C_C++"

Now we are mostly done - but we need to ensure one important thing - that the links to the needed libraries in the SDK are as expected from Delphi, are correct. So you need to ensure that libgcc_s.so exist in /lib64 - otherwise create a symlink to the version of the library there:

sudo ln -s /lib64/libgcc_s.so.1 /lib64/libgcc_s.so

We can now install PAServer for Linux - I did that by just mounting a USB stick where I had copied "LinuxPAServer19.0.tar" from PAServer directory of my RADStudio/Delphi/C++Builder installation.

Disclaimer: I should also mention that this is prerelease beta software - that is subject to change - but I have been given permission to show the bits I showed.

In the video that is done around 5:50 into the video.

After the paserver is up running and you got the IP addr it is listening on - go into Tools|Options|SDK Manager and create a new SDK - pick 64-bit Linux, add a new profile and enter the IP address - and grab a cup of coffee.


Change the Target Platform, compile and run you test console program - all done.

I did not follow all Jim suggestions, since most of the packages mention were already install during the initial OS install, but if any of them should be missing these are the SUSE equivalent commands:

zypper in joe
zypper in wget
zypper in p7zip-full
zypper in curl
zypper in openssh
zypper in zlib1g-dev
zypper in libcurl4-gnutls-dev

and you might also want to install vsftpd to get some specific data moved over - if you haven't already done that prior to get the LinuxPAServer tarball over.

Enjoy - and for the SUSE/Linux experts out there please comment, if there any better tricks - as mentioned getting a bit rusty on the distribution - so I hope I did not make a complete a.. of myself - but it worked :D

6 comments:

  1. This is a pre-release beta version of a planned future release. Features and availability are subject to change and covered by our NDA. Steffen was given specific permission to provide this getting started guide for those who are on the beta and new to Linux.

    ReplyDelete
  2. Thanks Jim, Updated the post to make it more clear that the PAServer part and the brief glimpse of Delphi is prerelease beta software and therefore subject for change.

    ReplyDelete
  3. One note on PAServer: if one copies PAServer's files one by one to Linux box, ensure all files have Execute flag otherwise you may receive timeout when trying to debug your app.

    ReplyDelete
    Replies
    1. I am not sure why someone would do that, but thanks for the advise.

      Delete
  4. enterprise product management
    "Establish customer choice at the heart of your enterprise and enable right selling through the
    creation of an enterprise master catalog for all products and services."

    ReplyDelete