Skip to main content

Custom Installation

Advanced Users

This guide is for system administrators and developers who want full control over server configuration. For simpler installation methods, see Auto-Installer or Quick Install.

This comprehensive guide walks you through installing Mumara Campaigns with complete control over every configuration step, using Apache (httpd) on AlmaLinux.

Prerequisites

Before starting, ensure you have:

  • A server meeting the System Requirements (AlmaLinux 10 recommended)
  • Root access to the server
  • A domain or subdomain pointing to your server
  • A valid Mumara Campaigns license key

Step 1: Prepare the Server

Update System Packages

dnf update -y

Install Required Software

dnf install -y \
httpd \
mariadb-server \
php \
php-{bcmath,cli,common,curl,fpm,gd,imap,intl,mbstring,mysqlnd,xml,zip,opcache} \
redis \
supervisor \
unzip \
git \
certbot \
python3-certbot-apache

Enable and Start Services

systemctl enable --now httpd mariadb redis php-fpm

Step 2: Configure MariaDB

Secure MariaDB Installation

mysql_secure_installation

Follow the prompts to:

  • Set root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database

Create Database and User

mysql -u root -p
CREATE DATABASE mumara_campaigns CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'mumara'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON mumara_campaigns.* TO 'mumara'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Security

Replace your_secure_password with a strong, unique password.

Step 3: Download Mumara Campaigns

Download from Client Area

  1. Log into your Mumara Client Area
  2. Navigate to ServicesMumara License
  3. Download the latest release ZIP file
  4. Upload to your server via SFTP or SCP

Create Installation Directory and Extract

mkdir -p /var/www/your-domain.com/public_html
cd /var/www/your-domain.com/public_html
unzip /path/to/mumara-campaigns.zip

Step 4: Set Permissions

Set proper ownership and permissions:

cd /var/www/your-domain.com/public_html

# Set ownership (apache user on AlmaLinux)
chown -R apache:apache .

# Set directory permissions
find . -type d -exec chmod 755 {} \;

# Set file permissions
find . -type f -exec chmod 644 {} \;

# Make storage and cache writable
chmod -R 775 storage bootstrap/cache geoip temp
chmod 775 .env

Required Writable Paths

Ensure these paths are writable by the web server:

PathPurpose
.envEnvironment configuration
storage/Logs, cache, uploads
bootstrap/cache/Framework bootstrap cache
geoip/GeoIP database files
temp/Temporary files

Step 5: Configure Apache (httpd)

Create Virtual Host Configuration

nano /etc/httpd/conf.d/your-domain.com.conf
<VirtualHost *:80>
ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/your-domain.com/public_html/public

<Directory /var/www/your-domain.com/public_html/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>

ErrorLog /var/log/httpd/your-domain.com_error.log
CustomLog /var/log/httpd/your-domain.com_access.log combined
</VirtualHost>

Enable Required Apache Modules

# mod_rewrite is typically enabled by default on AlmaLinux
# Verify Apache configuration
httpd -t

# Restart Apache
systemctl restart httpd

Configure SELinux (if enabled)

# Allow Apache to write to storage directories
chcon -R -t httpd_sys_rw_content_t /var/www/your-domain.com/public_html/storage
chcon -R -t httpd_sys_rw_content_t /var/www/your-domain.com/public_html/bootstrap/cache
chcon -R -t httpd_sys_rw_content_t /var/www/your-domain.com/public_html/geoip
chcon -R -t httpd_sys_rw_content_t /var/www/your-domain.com/public_html/temp

# Allow Apache to connect to network (for external APIs)
setsebool -P httpd_can_network_connect 1

Step 6: Install SSL Certificate

Using Let's Encrypt

certbot --apache -d your-domain.com -d www.your-domain.com

Certbot will automatically:

  • Obtain the SSL certificate
  • Configure Apache for HTTPS
  • Set up auto-renewal

Verify Auto-Renewal

certbot renew --dry-run

Step 7: Configure Firewall

# Allow HTTP and HTTPS
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

Step 8: Run Web Installer

Access the Installer

Open your browser and navigate to:

https://your-domain.com/install

Installer Steps

The web installer guides you through:

  1. System Check

    • Verifies PHP version and extensions
    • Checks directory permissions
    • Validates server configuration
  2. License Verification

    • Enter your Mumara Campaigns license key
    • System validates with license server
  3. Database Configuration

    • Database host: localhost
    • Database name: mumara_campaigns
    • Database username: mumara
    • Database password: (your password)
  4. Admin Account

    • Create administrator email
    • Set administrator password
    • Configure timezone
  5. Application Settings

    • Application URL
    • Application name
  6. Installation

    • Creates database tables
    • Configures application
    • Sets up initial data

For detailed web installer instructions, see Quick Install - Web Installer Steps.

Installation Complete

After successful installation:

  • The installer redirects to login page
  • Log in with your admin credentials
  • Complete the initial setup wizard

Step 9: Configure Cron Jobs

Add the Laravel scheduler to crontab:

crontab -e -u apache

Add this line:

* * * * * php /var/www/your-domain.com/public_html/artisan schedule:run >> /dev/null 2>&1

Step 10: Configure Queue Workers

Create a Supervisor configuration:

nano /etc/supervisord.d/mumara-worker.ini
[program:mumara-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/your-domain.com/public_html/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=apache
numprocs=4
redirect_stderr=true
stdout_logfile=/var/www/your-domain.com/public_html/storage/logs/worker.log
stopwaitsecs=3600

Start the workers:

supervisorctl reread
supervisorctl update
supervisorctl start mumara-worker:*
Configure Queue Driver

After Supervisor is running, you must set the Queue Driver in Mumara Campaigns. Navigate to Settings → Application Settings → General and set Queue Driver to Supervisor.

Queue Driver Options

Mumara Campaigns supports three queue processing methods:

OptionDescriptionUse Case
RealtimeProcesses jobs immediately in the requestVery small usage only. Not recommended for production as it blocks the web request.
CronjobProcesses jobs via scheduled cron taskModerate usage without Supervisor access
SupervisorProcesses jobs via Supervisor workersRecommended for production. Requires Supervisor to be configured and running.
Realtime Mode

Realtime mode is dangerous for any significant email volume as it processes everything synchronously, blocking the user interface and potentially causing timeouts.

Step 11: Post-Installation

Clear Caches

cd /var/www/your-domain.com/public_html
php artisan config:cache
php artisan route:cache
php artisan view:cache

Verify Installation

  1. Log into the admin panel
  2. Navigate to Settings → Application Settings → General
  3. Set Queue Driver to Supervisor (if using Supervisor)
  4. Verify all other settings are correct
  5. Check Tools → Cron Status for cron job health

Troubleshooting

For common issues and solutions, see the dedicated Troubleshooting guide.

Quick Fixes

Permission Issues:

chown -R apache:apache /var/www/your-domain.com/public_html
chmod -R 775 /var/www/your-domain.com/public_html/storage

SELinux Blocking Access:

# Check SELinux status
getenforce

# View SELinux denials
ausearch -m avc -ts recent

# Apply context fixes
restorecon -Rv /var/www/your-domain.com/public_html

Database Connection Errors:

systemctl status mariadb
mysql -u mumara -p mumara_campaigns

500 Internal Server Error:

tail -f /var/www/your-domain.com/public_html/storage/logs/laravel.log
tail -f /var/log/httpd/your-domain.com_error.log

Installer Not Loading:

  • Ensure Apache is running: systemctl status httpd
  • Document root points to /public directory
  • .htaccess file exists and AllowOverride All is set

Next Steps

After successful installation: