Installing Gibbon at just $1.36/month Google Cloud VM

Absolutely true, let’s get Gibbon ERP running on Google Cloud with the cheapest VM while ensuring a basic level of security.

Step-by-Step Guide

  1. Create a Google Cloud Account: If you don’t already have one, head to Google Cloud’s website and sign up. You might get some free credits to start.

  2. Create a Virtual Machine (VM):

    • In the Google Cloud Console, navigate to the Compute Engine section and click on Create Instance.
    • Name: Give your VM a descriptive name (e.g., gibbon-erp).
    • Region: Choose a region close to you for lower latency. My choice was us-west4-a
    • Machine type: Select the most affordable option, likely the e2-micro instance with 1 GB shared memory
    • Boot disk: Choose a Debian-based Linux distribution like Debian 11 or Ubuntu 22.04 LTS having Standard persistent disk
    • Firewall: Allow HTTP (port 80) and HTTPS (port 443) traffic.
    • Click Create.
  3. Connect to your VM:

    • In the VM instances list, find your new VM and click on the SSH button next to it. This will open a terminal window in your browser where you can interact with your VM.
  4. Install Gibbon ERP:

    • Update your system:

      sudo apt update
      sudo apt upgrade 
      
    • Install required packages:

      sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql php-curl php-gd php-intl php-mbstring php-xml php-zip unzip wget
      
    • Download Gibbon ERP:

      wget https://github.com/GibbonEdu/core/releases/download/v27.0.01/GibbonEduCore-InstallBundle.zip
      
    • Unzip and move to the web root:

      unzip GibbonEduCore-InstallBundle.zip
      sudo rm GibbonEduCore-InstallBundle.zip
      sudo mkdir /var/www/html/Gibbon 
      sudo mv * /var/www/html/Gibbon
      
    • Set permissions:

      sudo chown -R www-data:www-data /var/www/html/Gibbon
      sudo chmod -R 755 /var/www/html/Gibbon
      
  5. Configure Database:

    • Secure MariaDB installation:

      sudo mysql_secure_installation
      

      (Follow the prompts, setting a root password and removing test databases)

    • Create a database for Gibbon:

      sudo mysql -u root -p 
      

      (Enter your root password)

      CREATE DATABASE gibbon;
      GRANT ALL PRIVILEGES ON gibbon.* TO 'gibbon'@'localhost' IDENTIFIED BY 'your_gibbon_password';
      FLUSH PRIVILEGES;
      EXIT;
      
  6. Configure Apache:

    • Enable required modules:

      sudo a2enmod rewrite
      sudo systemctl restart apache2 
      
    • Create a virtual host:

      sudo nano /etc/apache2/sites-available/gibbon.conf
      

      Paste the following, replacing your_gibbon_domain with your actual domain (or IP address for now):

      <VirtualHost *:80>
          ServerName your_gibbon_domain
          DocumentRoot /var/www/html/Gibbon
      
          <Directory /var/www/html/Gibbon>
              AllowOverride All
              Require all granted
          </Directory>
      
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
      </VirtualHost>
      
    • Enable the virtual host and restart Apache:

      sudo a2ensite gibbon.conf
      sudo systemctl reload apache2
      
  7. Access Gibbon ERP Web Installer:

    • Open your web browser and go to http://your_vm_public_ip (replace with your VM’s actual public IP address).
    • Follow the Gibbon web installer prompts to complete the setup. You’ll need the database details you created earlier.
  8. Basic Security (Without a Domain):

    • Self-Signed SSL Certificate:

      • Generate a self-signed certificate:

        sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
        

        (You’ll be prompted to enter some details for the certificate)

      • Configure Apache for HTTPS:

        • Edit your virtual host configuration:

          sudo nano /etc/apache2/sites-available/gibbon.conf
          
        • Add the following within the <VirtualHost *:80> block:

          SSLEngine on
          SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
          SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
          
        • Redirect HTTP to HTTPS: Add these lines at the end of the file:

          <VirtualHost *:80>
              ServerName your_gibbon_domain
              Redirect permanent / https://your_gibbon_domain/
          </VirtualHost>
          
        • Enable the SSL module and restart Apache:

          sudo a2enmod ssl
          sudo systemctl restart apache2
          
    • Important Notes on Self-Signed Certificates:

      • Browsers will show a warning because the certificate isn’t from a trusted authority.
      • This is okay for initial testing and development but not recommended for production use.
      • Once you have a domain, get a proper SSL certificate from a trusted provider like Let’s Encrypt.

Additional Tips for Noobs:

  • Take it slow: Follow each step carefully. If you get stuck, Google the error message or search on Gibbon’s forums.
  • Backups: Regularly back up your Gibbon database and important files.
  • Updates: Keep Gibbon and your VM’s software up-to-date for security and new features.
  • Learn Linux basics: Familiarize yourself with basic Linux commands to navigate and manage your VM.

Let me know if you have questions or need further assistance along the way!

1 Like

Hi @abyrocks Many thanks for sharing this detailed information with the community :smiley: I greatly appreciate your time to share each of the steps for this process, and I am sure it will be of use to schools out there looking for different hosting options. My apologies for the delayed response, it was a very busy start of the school year :sweat_smile: