Setup Mapepire
Mapepire is the database connectivity layer that enables the IBM i MCP Server to communicate with Db2 for i. This guide walks through installing and configuring Mapepire on your IBM i system.Prerequisites: You need SSH access to your IBM i system and appropriate administrative privileges to install software and configure network services.
What is Mapepire?
Mapepire is a modern database connectivity solution for IBM i that:- Provides secure, encrypted connections to Db2 for i
- Supports modern authentication methods
- Enables remote database access for applications and tools
- Offers both HTTP and direct socket connectivity options
Installation Methods
Option 1: RPM Installation (Recommended)
The easiest way to install Mapepire is using the RPM package manager:If you need help getting started with RPMs on IBM i, see the IBM i Open Source RPM Guide.
Option 2: Manual Installation
If RPM installation isn’t available, you can install manually:-
Create download directory:
-
Download the distribution:
-
Extract and set permissions:
Starting Mapepire
Service Commander (Recommended for RPM)
If you installed via RPM, use Service Commander for easy management:Manual Startup
For RPM installation:Configuration
Port Configuration
Mapepire uses port 8076 by default. This is the standard port and changing it is not recommended. If you need to change the port:TLS/SSL Configuration
Mapepire supports several TLS certificate options:Option 1: Let’s Encrypt (Recommended)
If you have Let’s Encrypt certificates (e.g., from CertBot), Mapepire will automatically use them:Option 2: Custom Certificate
Create a custom certificate store with these specifications:Setting | Value |
---|---|
File location | /QOpenSys/etc/mapepire/cert/server.jks |
Format | JKS |
Store password | mapepire |
Key password | mapepire |
Certificate alias | mapepire |
Option 3: Self-Signed Certificate
If no certificate is configured, Mapepire will automatically generate a self-signed certificate. This is suitable for development but not recommended for production.Security Configuration
Exit Points
Mapepire uses the same exit points as standard JDBC applications. For more information, see the IBM Support page on JDBC exit points.Due to Mapepire’s architecture, all client connections appear to come from
127.0.0.1
. IP-based exit point rules will need to inspect the CLIENT_WRKSTNNAME
client special register to get the actual client IP address.Connection Rules
Configure user and IP-based access restrictions in:allow <username>@<ip-address>
deny <username>@<ip-address>
- Use
*
as wildcard - Last matching rule takes precedence
- Comments start with
#
Testing the Installation
Verify Mapepire is Running
-
Check the process:
-
Test connectivity:
-
Test with Service Commander:
Configure IBM i MCP Server
Once Mapepire is running, configure your IBM i MCP Server.env
file:
Set
DB2i_IGNORE_UNAUTHORIZED=true
if using self-signed certificates. For production with proper certificates, set this to false
.