
How to Install Opigno on Debian with Git and Drush
Opigno LMS is a powerful, Drupal-based learning management system designed for businesses, universities, and training centers that need flexibility, scalability, and robust course management. In this guide, we’ll walk you through the steps to install Opigno on a Debian-based server using Git and Drush—two essential tools for efficient Drupal site management.
✅ Prerequisites
Before we begin, make sure you have:
- A Debian-based server (Debian 11 or later recommended)
- Root or sudo access
- Apache or Nginx installed
- PHP 8.1 or later
- MySQL or MariaDB
- Composer installed globally
- Git installed
- Drush installed (via Composer)
Tip: For the smoothest setup, ensure your server has at least 2GB RAM and proper firewall configuration (port 80/443 open).
Step 1: Update Your System
bashCopyEditsudo apt update && sudo apt upgrade -y
Step 2: Install Required Packages
Install Git, PHP, and other necessary extensions:
bashCopyEditsudo apt install git unzip php-cli php-mysql php-gd php-xml php-mbstring php-curl php-zip php-bcmath php-json php-opcache php-dom -y
Step 3: Install and Configure Apache (Optional)
If you haven’t already installed a web server:
bashCopyEditsudo apt install apache2 libapache2-mod-php -y
sudo systemctl enable apache2
sudo systemctl start apache2
Step 4: Install Composer
bashCopyEditcurl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Test installation:
bashCopyEditcomposer --version
Step 5: Install Drush
Install Drush globally with Composer:
bashCopyEditcomposer global require drush/drush
Make sure Drush is available in your $PATH
:
bashCopyEditexport PATH="$HOME/.composer/vendor/bin:$PATH"
Add the export line to your .bashrc
or .zshrc
to persist it.
Step 6: Clone Opigno from Git
Navigate to your web root (e.g., /var/www
):
bashCopyEditcd /var/www
sudo git clone https://github.com/opigno/opigno-composer.git opigno
cd opigno
Install dependencies via Composer:
bashCopyEditcomposer install
Step 7: Set Up the Database
Create a MySQL database and user:
bashCopyEditsudo mysql -u root -p
Inside the MySQL shell:
sqlCopyEditCREATE DATABASE opigno_db;
CREATE USER 'opigno_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON opigno_db.* TO 'opigno_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 8: Set File Permissions
bashCopyEditsudo chown -R www-data:www-data /var/www/opigno
sudo chmod -R 755 /var/www/opigno
Step 9: Install Opigno with Drush
bashCopyEditcd /var/www/opigno
vendor/bin/drush site:install opigno --db-url=mysql://opigno_user:strong_password@localhost/opigno_db --account-name=admin --account-pass=admin_pass --site-name="My Opigno Site"
Replace credentials and site name as needed.
Step 10: Configure Apache Virtual Host
Create a new Apache config file (optional, if not already configured):
bashCopyEditsudo nano /etc/apache2/sites-available/opigno.conf
Add the following:
apacheCopyEdit<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/opigno/web
<Directory /var/www/opigno/web>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/opigno_error.log
CustomLog ${APACHE_LOG_DIR}/opigno_access.log combined
</VirtualHost>
Enable the site and rewrite module:
bashCopyEditsudo a2ensite opigno.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Final Notes
Your Opigno LMS should now be accessible via your server’s IP or domain. To access the admin panel, go to:
pgsqlCopyEdithttp://yourdomain.com/user/login
Use the admin credentials you set during installation.
🔒 Security Tip
Always disable public access to Drush on production environments and keep your Composer and packages updated.
Need Help?
At GreenHost, we offer fully managed Opigno LMS hosting on secure, eco-friendly servers. Contact our support team if you’d like help setting up your LMS environment.