Installing the RAD Server or the RAD Server Console on a Production Environment on Linux
Go Up to Setting Up Your RAD Server Engine
You can set up the RAD Server Engine on your Linux machine for the following options:
- To create a Stand-alone RAD Server Engine, see the Stand-alone Installation topic.
- To create RAD Server Engine for Apache, see the Apache Server Support topic.
Contents
Prerequisites
To configure the RAD Server Engine on Linux you need the following:
- RAD Studio on Windows
- Linux machine (can be a virtual machine)
- InterBase installed on your Linux machine
- For RAD Server development testing on Linux, download InterBase 2017 for Linux from https://downloads.embarcadero.com/free/ibdev and register.
- Apache installed on your Linux machine (for Apache Server Support)
Linux support
You can find the RAD Server files LinuxEMSServer.tar and ems_install.sh in the following location:
Linux 64-bit: C:\Program Files (x86)\Embarcadero\Studio\20.0\EMSServer
RAD Server installer on Linux consists of two files:
- LinuxEMSServer.tar: the archive that includes servers, tools, packages, and static files.
- ems_install.sh: the file that unpacks the files, places them into the required locations, and assigns attributes and rights.
LinuxEMSServer.tar includes the following:
- Servers:
server\EMSDevServerCommand(for Stand-alone server)server\libmod_emsserver.so(for Apache server support)server\EMSMultiTenantConsole(for RAD Studio Multi-Tenancy support)
- Tools:
EMSDevConsoleCommand(for Stand-alone server)server\libmod_emsconsole.so(for Apache server support)
- objrepos files needed by EMSDevConsoleCommand:
objrepos\webresourcesobjrepos\ems\EMSMSERVER.IBobjrepos\ems\EMSMSERVER.SQLobjrepos\ems\emsserver.ibobjrepos\ems\emsserver.sqlobjrepos\ems\emsserver.ini
- Packages needed by servers or tools:
rtl\bplFireDACSqliteDriver250.sortl\bplrtl250.sortl\bplFireDACCommonDriver250.sortl\bplFireDAC250.sortl\bpldbrtl250.sortl\bplFireDACIBDriver250.sortl\bplFireDACCommon250.sortl\bplxmlrtl250.sortl\bplemsserverapi250.so
If you use FireDAC with a database management system other than InterBase, you need its FireDAC driver, such as bplFireDACSqliteDriver250.so for SQLite.
RAD Server Engine uses the following default paths when you finish setting it up:
- EMSDevServerCommand, EMSDevConsoleCommand are located in /usr/lib/ems
- mod_emsconsole, mod_emsserver is located in /usr/lib/apache2/modules (in case the Apache is installed, if not the following location is used: in /usr/lib/ems)
- ib, sql, ini and webresources folder are located in /etc/ems
- RTL and DBRTL packages (*.so) are located in /usr/lib/ems
- Also, the installer creates /var/emsserver_install.log.
Stand-alone Installation
- To install Stand-alone Server, you need to execute the
ems_install.shfile. - To run the Stand-alone Server, you need to execute
EMSDevServerCommand.
If you have created one or more packages of custom RAD Server resources, you must build them into package shared library files.
- objrepos files needed by EMSDevServerCommand:
objrepos\ems\emsserver.ibobjrepos\ems\EMSMSERVER.SQLobjrepos\ems\EMSMSERVER.IBobjrepos\ems\emsmserver.sqlobjrepos\ems\emsserver.ini
Apache Server Support
With appropriately elevated privileges, follow these steps to set up your RAD Server Engine or Console running on an Apache Server:
- Download and install Apache HTTP Server for Windows or Linux.
- Note: RAD Server Engine (EMS Server) only runs in Apache HTTP Server version 2.4.
-
- Install RAD Server Engine using
ems_install.sh. - Configure the Apache HTTP Server to load the RAD Server Apache server and RAD Server Apache console modules.
- For Red Hat and related non-Debian distributions of Linux, edit Apache's
httpd.conffile as follows.
- Add the following line to load the RAD Server Apache server module (
libmod_emsserver.so):
LoadModule emsserver_module /usr/lib/ems/libmod_emsserver.so
- Add the following line to load the RAD Server Apache console module (
libmod_emsconsole.so):
LoadModule emsconsole_module /usr/lib/ems/libmod_emsconsole.so
- Add the Location tags to create a container where you can specify access control rules for a given URL.
<Location /ems-server> SetHandler libmod_emsserver-handler </Location> <Location /ems-console> SetHandler libmod_emsconsole-handler </Location>
- For Ubuntu and similar Debian distributions of Linux, follow these steps to configure the RAD Server Apache server and RAD Server Apache console modules.
- Create a new file called
ems.loadin Apache'smods-availabledirectory to load the RAD Server Apache server and console modules as needed.
LoadModule emsserver_module /usr/lib/ems/libmod_emsserver.so LoadModule emsconsole_module /usr/lib/ems/libmod_emsconsole.so
- Next, create another new file
ems.conf, also in Apache'smods-availabledirectory, to hold appropriate Location tags, used to specify access control rules for a given URL.
<Location /ems-server> SetHandler libmod_emsserver-handler </Location> <Location /ems-console> SetHandler libmod_emsconsole-handler </Location>
- Now enable the RAD Server module using a2enmod as below.
a2enmod ems
- If there is a need to disable the RAD Server module, use a2dismod as follows.
a2dismod ems
- For Red Hat and related non-Debian distributions of Linux, edit Apache's
- Be certain Interbase Server is running and that RAD Server Engine or RAD Server Console has been configured, ensuring the RAD Server database is available to Interbase.
- Restart Apache Server as appropriate to your Linux distribution to load the newly configured RAD Server module.
- To check if the RAD Server Apache server module is properly running, open a web browser and type:
http://localhost/ems-server/version - You can access the RAD Server Apache console module by accessing
http://localhost/ems-console/
- Note: Disable SELinux to allow Apache to connect to external IPs and ports.