Installing the EMS Server or EMS Console Server on a Production Environment on Linux
Go Up to Setting Up Your EMS Server
You can set up the EMS Server on your Linux machine for the following options:
- To create a Stand-alone EMS Server, see the Stand-alone Installation topic.
- To create EMS Server for Apache, see the Apache Server Support topic.
Contents
Prerequisites
To configure the EMS Server on Linux you need the following:
- RAD Studio on Windows
- Linux machine (can be a virtual machine)
- InterBase installed on your Linux machine
- For EMS development testing on Linux, download InterBase XE7 for Linux from https://downloads.embarcadero.com/free/ibdev and register.
- Apache installed on your Linux machine (for Apache Server Support)
Note: For Ubuntu 16.04 LTS installations, the "libcurl3" package is required for RAD Server.
Linux support
You can find the EMS files LinuxEMSServer.tar and ems_install.sh in the following location:
Linux 64-bit: C:\Program Files (x86)\Embarcadero\Studio\19.0\EMSServer
EMS 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\webresources
objrepos\ems\EMSMSERVER.IB
objrepos\ems\EMSMSERVER.SQL
objrepos\ems\emsserver.ib
objrepos\ems\emsserver.sql
objrepos\ems\emsserver.ini
- Packages needed by servers or tools:
rtl\bplFireDACSqliteDriver250.so
rtl\bplrtl250.so
rtl\bplFireDACCommonDriver250.so
rtl\bplFireDAC250.so
rtl\bpldbrtl250.so
rtl\bplFireDACIBDriver250.so
rtl\bplFireDACCommon250.so
rtl\bplxmlrtl250.so
rtl\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.
EMS Server 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.sh
file. - To run the Stand-alone Server, you need to execute
EMSDevServerCommand
.
If you have created one or more packages of custom EMS resources, you must build them into package shared library files.
- objrepos files needed by EMSDevServerCommand:
objrepos\ems\emsserver.ib
objrepos\ems\EMSMSERVER.SQL
objrepos\ems\EMSMSERVER.IB
objrepos\ems\emsmserver.sql
objrepos\ems\emsserver.ini
Apache Server Support
With appropriately elevated privileges, follow these steps to set up your EMS Server or Console running on an Apache Server:
- Download and install Apache HTTP Server for Windows or Linux.
- Note: EMS Server only runs in Apache HTTP Server version 2.4.
- Install EMS server using
ems_install.sh
. - Configure the Apache HTTP Server to load the EMS Apache server and EMS Apache console modules.
- For Red Hat and related non-Debian distributions of Linux, edit Apache's
httpd.conf
file as follows.
- Add the following line to load the EMS Apache server module (
libmod_emsserver.so
):
LoadModule emsserver_module /usr/lib/ems/libmod_emsserver.so
- Add the following line to load the EMS 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 EMS Apache server and EMS Apache console modules.
- Create a new file called
ems.load
in Apache'smods-available
directory to load the EMS 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-available
directory, 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 EMS module using a2enmod as below.
a2enmod ems
- If there is a need to disable the EMS 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 EMS Server or EMS Console has been configured, ensuring the EMS database is available to Interbase.
- Restart Apache Server as appropriate to your Linux distribution to load the newly configured EMS module.
- To check if the EMS Apache server module is properly running, open a web browser and type:
http://localhost/ems-server/version
- You can access the EMS Apache console module by accessing
http://localhost/ems-console/
- Note: Disable SELinux to allow Apache to connect to external IPs and ports.