Home » Categories » Multiple Categories |
How To Install Opigno on Debian 7 with Git and Drush |
Article Number: 288 | Rating: Unrated | Last Updated: Sat, Jan 4, 2014 at 5:38 AM
|
IntroductionOpigno is a new, fast growing e-learning platform based on the battle-hardened Drupal framework. Setting up Opigno via sFTP is pretty easy, but as you now have your own server, we should set it up using GIT and Drush. Set up your serverIt's recommended to create a new user that is inside the sudo group. This will allow us to administer our server without using our root user. If you don't know how to do this. The listed steps are for users that are not root but are inside the sudo group. If you want to use your root user however, that's fine. Just don't type the Now, log in to you server:
Make sure your server is up to dateWe are going to update our system and make sure it runs on the latest releases:
Done. Now, we're going to set up our technology stack to run Opigno. Install ApacheOpigno runs on NginX and Apache, but we'll use Apache in this tutorial. Use the following command to install it:
To check if Apache installed correctly, use your browser to navigate to your virtual server's IP address (e.g. http://12.345.6.789). You should see "It works !". Next, we want to make sure Apache accepts per-directory configuration overrides with .htaccess files. Opigno comes with a default .htaccess file that configures the directory it's in. This will set some nice security defaults. Call the following:
Locate the group Change the Now we must restart Apache:
Enable clean URLsOpigno can use clean URLs, which turns a URL like This is fully optional, but still recommended. For this, we need to enable the Apache Rewrite module. Call the following:
Install PHPOpigno runs on Drupal, which in turn runs on PHP. This will set up PHP, as well as the PHP GD library Drupal depends on.
It is also recommended to install APC. APC will make your Opigno install run much faster, as it caches the PHP opcode in memory. Being a scripting language, PHP normally has to rebuild the opcode for every single request. This will make the opcode be built on the first request only:
Check you PHP setupIf you want to make sure your PHP got installed correctly and linked with Apache, execute the following commands:
Now, if you redirect your browser to After you checked that PHP works correctly, remove the phpinfo.php file, as it can expose sensitive information for hackers to exploit:
Install MySQLOpigno can run on a different number of databases, but the most recommended one is MySQL, as many Drupal modules are only tested against MySQL-compatible databases. Thus, if you want to extend Opigo with third-party modules, you will be certain it works with your setup.
Next, we should clean up MySQL a bit to make it ready for production.
Create a new database user for OpignoIt is highly recommended to create a new MySQL user that will only have access to the Opigno database. This will increase security, especially if you're going to run other systems on your server as well. This is optional however, you can just use your root user... First, log in to MySQL:
You are now inside the MySQL command prompt. We will create a database for opigno.
Now, we will create a new user and give it access to this database only.
Now log out of the MySQL prompt:
Install DrushDrush stands for "Drupal Shell" and is a great way to manage any systems running on Drupal. Once you start using it, you will get addicted. To install Drush, run the following command:
If you want to read more about Drush, you can find all the information you need on drush.ws. Install gitGit is great for Opigno as it will help you to keep your site up to date easily and efficiently. It should come shipped with your Debian 7.0 install, but just to be safe, call:
Stack Ready!Now you have all the packages to get started. We will now install Opigno. You will see it's easy. Getting OpignoWe will change directory somewhere to keep the GIT repo nice and tidy. This will allow us to spawn multiple Opigno installs if needed (like testing and production). In this tutorial, we'll keep the cloned repo in a Projects folder in our users home folder (also written
At the time of writing, the latest branch of Opigno is 7.x-1.x. So we'll clone that one.
This will clone the latest and greatest version of Opigno. However, for production sites, you may want to use a specific release instead of the very latest code, as it might contain some unstable code. To see all releases, just type the following:
Pick one you want to use (e.g.: 1.0), and type:
This will use the 1.0 version. Building OpignoOpigno is what is called a Drupal distribution. This means it aggregates many different modules and installs/configures everything for you. This is very efficient, as all third-party modules are managed in separate GIT repositories. To fetch all the code needed to run Opigno, we need tobuildit. That's where Drush comes in. In this tutorial, we won't mess with Apache virtual hosts, as you might not have domain names ready. Ideally though, you might want to set up a virtual host for a test site and one for the production site (e.g.: my-opigno.com and dev.my-opigno.com). This would mean you use different web roots. But here we'll just use the Apache /var/www folder to contain our code. Call the following:
Drush will ask you if you want to build Opigno in the current folder. Just say yes. Finally, because you used
Install OpignoYou now have 2 options:
If you moved out of the
Now, call:
Important note: if you did not enable the Apache Rewrite module as explained above, add this at the end of the
Choose yes when prompted. The install will take a few seconds. The install will give a warning about the PDF library used. You can safely ignore this. Call this again to assign all files to the correct group:
LoginNow you can navigate your browser to http://[your server ip]. You will see a login form on the left. If you installed through drush, your username isadminand the password is the one you provided in the "Access denied"Depending on the version you checked out from GIT, you may see an "Access denied" message with a user login form to the left. This is completely normal, as you have to be logged in to access any content on Opigno. Just log in and start enjoying your new platform. Set up a cronOpigno can use a cron task to regularly cleanup stuff. This step is optional, as Opigno contains a fallback system that will do this automatically, but not as efficiently. For this reason, it's better to set up a cron task. The cron task is protected by a unique key for security reasons. To find this key, navigate your browser to [your server ip]/admin/reports/status (if you're not logged in, you will be asked to). Now, from your command line, call:
Add the following line, which will run the cron script every hour:
Hit Ctrl+x to quit, type 'y' to save. Restart the cron daemon:
Rejoice !Congratulations, you finished the tutorial ! You can now start using the Opigno platform! You can find more information on Opigno at opigno.org. |
Attachments
There are no attachments for this article.
|
How To Use Traceroute and MTR to Diagnose Network Issues
Viewed 6670 times since Fri, Dec 27, 2013
How To Use WP-CLI to Manage your WordPress Site from the Command Line
Viewed 10066 times since Sat, Jan 4, 2014
Upgrading Debian to Unstable
Viewed 3595 times since Thu, Dec 26, 2013
How To Perform Basic Queries in MySQL and MariaDB on a Cloud Server
Viewed 2257 times since Thu, Jan 2, 2014
How To Install LAMP (Linux, Apache, MySQL, PHP) on Fedora
Viewed 3802 times since Thu, Jan 2, 2014
How To Set Up Apache Virtual Hosts on Debian 7
Viewed 3271 times since Fri, Dec 27, 2013
How To Set Up mod_security with Apache on Debian/Ubuntu
Viewed 4063 times since Thu, Dec 26, 2013
How To Create Nagios Plugins With PHP On Ubuntu 12.10
Viewed 2353 times since Sat, Jan 4, 2014
Initial Server Setup with Debian 7
Viewed 3676 times since Fri, Dec 27, 2013
How To Import and Export Databases and Reset a Root Password in MySQL
Viewed 2893 times since Thu, Dec 26, 2013
|