Firebird SQL User Guide
Overview
This guide covers the deployment and configuration of Firebird SQL on Linux using cloudimg AMIs from the AWS Marketplace. Firebird is a relational database management system that offers ANSI SQL compliance, ACID transactions, and support for stored procedures, triggers, and views. It is lightweight, requires minimal administration, and runs well on modest hardware.
What's included in this AMI:
- Firebird SQL with database listener on port 3050
- Dedicated installation volume at /opt/firebird
- SYSDBA credentials auto generated and stored securely
- Systemd service for automatic startup on boot
- OS package update script for keeping the system current
- AWS CLI v2 for AWS service integration
- Systems Manager Agent (SSM) for remote management
- CloudWatch Agent for monitoring
- Latest security patches applied at build time
- 24/7 cloudimg support with guaranteed 24 hour response SLA
Prerequisites
Before launching this AMI, ensure you have:
- An active AWS account
- An active subscription to the Firebird SQL listing on AWS Marketplace
- An EC2 key pair for SSH access
- Familiarity with EC2 instance management and SSH
Recommended Instance Type: t3.small (2 vCPU, 2 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 20 GB disk space.
Step 1: Launch the AMI
- Navigate to the AWS Marketplace and search for "Firebird SQL cloudimg"
- Click Continue to Subscribe, accept the terms, then Continue to Configuration
- Select your preferred Region and Software Version
- Click Continue to Launch
- Choose Launch through EC2 for full control over instance configuration
- Select your instance type (
t3.smallrecommended) - Configure storage: 20 GB gp3 minimum
- Configure your Security Group with the following inbound rules:
| Port | Protocol | Source | Purpose |
|---|---|---|---|
| 22 | TCP | Your IP | SSH access |
| 3050 | TCP | Your IP | Firebird SQL database listener for remote connectivity |
Important: Restrict port 3050 to trusted IP addresses or application servers only.
- Select your EC2 key pair and launch the instance
Step 2: Connect via SSH
Once your instance is running and has passed both status checks (2/2), connect using SSH:
ssh -i your-key.pem ec2-user@<public-ip-address>
To switch to the root user:
sudo su -
Step 3: Retrieve SYSDBA Credentials
The SYSDBA password has been randomly generated and stored on the instance:
cat /stage/scripts/firebird_sysdba_password.log
Note this password for use when connecting to the database.
Step 4: Connect to Firebird SQL
Connect to the Firebird SQL database from the server command line as the root user:
isql -u sysdba
Enter the password from the firebird_sysdba_password.log file when prompted.
When connecting remotely via a database client or GUI application, use:
- Host: The public or private IP of your EC2 instance
- Port: 3050
- Username: SYSDBA
- Password: The value from
/stage/scripts/firebird_sysdba_password.log
Step 5: Create a Database
Create a new database using isql:
CREATE DATABASE '/opt/firebird/data/myapp.fdb'
USER 'SYSDBA' PASSWORD 'your_password';
Create a table:
CREATE TABLE customers (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(200),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Insert data:
INSERT INTO customers (id, name, email) VALUES (1, 'John Doe', 'john@example.com');
COMMIT;
Query data:
SELECT * FROM customers;
Server Components
| Component | Install Path |
|---|---|
| Firebird SQL | /opt/firebird |
Note: Component versions may be updated on first boot by the automatic OS package update script.
Filesystem Layout
| Mount Point | Size | Description |
|---|---|---|
| / | 38 GB | Root filesystem |
| /boot | 2 GB | Operating system kernel files |
| /opt/firebird | 9.8 GB | Firebird SQL installation directory |
Key directories:
| Directory | Purpose |
|---|---|
| /opt/firebird | Firebird installation root |
| /opt/firebird/bin | Firebird binaries (isql, gbak, gfix) |
| /opt/firebird/data | Database files (.fdb) |
| /opt/firebird/security4.fdb | Security database (user accounts) |
Managing the Firebird Service
Firebird is managed via systemd and starts automatically on boot.
Check service status:
systemctl status firebird
Stop Firebird:
systemctl stop firebird
Start Firebird:
systemctl start firebird
Restart Firebird:
systemctl restart firebird
Scripts and Log Files
| Script/Log | Path | Description |
|---|---|---|
| initial_boot_update.sh | /stage/scripts | Updates the OS with the latest packages on first boot |
| initial_boot_update.log | /stage/scripts | Output log for the boot update script |
| firebird_sysdba_password.log | /stage/scripts | Firebird SQL SYSDBA password |
On Startup
An OS package update script runs on first boot to ensure the image is fully up to date. You can disable this by removing the script and its crontab entry:
rm -f /stage/scripts/initial_boot_update.sh
crontab -e
# Delete the following line, save and exit:
@reboot /stage/scripts/initial_boot_update.sh
Troubleshooting
Cannot connect to Firebird on port 3050
- Verify Firebird is running:
systemctl status firebird - Check your security group allows port 3050 from your IP
- Test local connectivity:
isql -u sysdba - Verify the listener is active:
netstat -tlnp | grep 3050
Authentication fails
- Verify the SYSDBA password from
/stage/scripts/firebird_sysdba_password.log - Ensure you are using the correct case (SYSDBA is uppercase)
- Check the security database exists:
ls /opt/firebird/security4.fdb
Database file not found
- Verify the full path to the .fdb file
- Check file permissions
- Ensure the Firebird user has read/write access to the data directory
Service fails to start
- Check logs:
journalctl -u firebird --no-pager -n 50 - Verify disk space:
df -h /opt/firebird - Check for port conflicts:
netstat -tlnp | grep 3050
Security Recommendations
- Change the SYSDBA password after first login using
gsecor SQL commands - Restrict port access: Only allow port 3050 from trusted IPs
- Create application specific users: Do not use SYSDBA for application connections
- Secure the password file: Delete
/stage/scripts/firebird_sysdba_password.logafter noting the value - Back up databases regularly: Use
gbakfor creating transportable backups - Keep Firebird updated: Apply security patches when available
- Use encrypted connections: Configure SSL/TLS for remote database connections
Support
If you encounter any issues with this product, contact cloudimg support:
- Email: support@cloudimg.co.uk
- Website: www.cloudimg.co.uk
- Support hours: 24/7 with guaranteed 24 hour response SLA