Moodle Demo Installation Instructions via SSH

Updated

The following Edumy installation instructions are for SSH users only, who wish to install the Edumy Demo Installation package via the command line. These installation instructions should only be used if SFTP and phpMyAdmin are not available on your server.

If your server has SFTP/FTP and phpMyAdmin, please follow the exact steps outlined in the Edumy Moodle Documentation file.

Note: You must have experience using the command line in order to follow these instructions. If you are unsure, please consult your system administrator for further guidance.

We also offer installation services for both the Demo Installation and Existing Installations. Please contact us to make an enquiry.

If you do not have SFTP and phpMyAdmin, then for Ubuntu or CentOS: 

Step #1: Upload Demo Installation files

You need to first upload demo_files.zip, moodledata.zip, and cocoon_edumy.sql to your server (you can use either SCP or WinSCP, or some other tool you prefer).

This installation guide assumes that your webroot is located at /var/www/httpdocs, and that this is the location you wish to install Moodle.

To do this:

  1. Download and extract the Edumy download package from ThemeForest

     
  2. In your terminal window, run the following command to transfer the demo_files.zip archive to your server, switching out the bold text for your server credentials, and the relevant paths to demo_files.zip on your local device and the remote server


    scp /path/on/local/drive/demo_files.zip [USER]@[HOSTNAME]:/path/on/remote/server

    If your server must be accessed via a specific port (i.e. if you are required to specify a port when connecting via SSH), your command should look like this instead:

    scp -P [PORT_NUMBER] /path/on/local/drive/demo_files.zip [USER]@[HOSTNAME]:/path/on/remote/server

     
  3. Now run the same command twice more, for the moodledata.zip archive, and for the cocoon_edumy.sql file, like so:


    scp /path/on/local/drive/moodledata.zip [USER]@[HOSTNAME]:/path/on/remote/server

    scp /path/on/local/drive/cocoon_edumy.sql [USER]@[HOSTNAME]:/path/on/remote/server

     

Step #2: Extract & Prepare Files

Extract/unzip the demo_files.zip on the server, and place all contents (including hidden files) into your webroot (e.g. /var/www/httpdocs) , or wherever you would like to install Moodle. You can use the unzip command if you have unzip installed.

  1. To install unzip, use the following command:

    CentOS:

    yum install unzip

    Ubuntu:

    apt-get install unzip
  2. Then, to unzip the demo_files.zip archive, use a command such as:

    unzip /path/on/server/to/demo_files.zip -d /var/www/httpdocs

     
  3. Immediately rename the extracted demo_files directory, using:

    mv -v /var/www/httpdocs/demo_files /var/www/httpdocs/demo_files2

     
  4. Now, move the contents of demo_files2 up a level, using:

    mv /path/to/www/demo_files2/* /var/www/httpdocs

     
  5. It's important to also move hidden files, so use the following command immediately afterward:

    mv /path/to/www/demo_files2/.* /var/www/httpdocs

     
  6. Now remove the empty demo_files2 directory, using:

    rmdir /var/www/httpdocs/demo_files2

Step #4: Extract & Prepare moodledata

  1. Extract/unzip moodledata.zip to another directory (outside of your webroot) on your server (you can use unzip, again here). It can reside anywhere on the server. In this example, we'll assume that moodledata should reside in /var/www.

    unzip /path/on/server/to/moodledata.zip -d /var/www

     
  2. Make sure that you set the correct read-write permissions for Apache/Nginx to the moodledata directory and all subdirectories and files within. On CentOS-based systems, the Apache user is typically named 'Apache'. On Ubuntu, it's normally 'www-data'. If you're using Nginx, the nginx user is usually named 'nginx'.

    You can use the chown and chmod commands for this, like so:

    CentOS:

    chown -R apache:apache /var/www/moodledata
    chmod -R 0755 /var/www/moodledata

    Ubuntu:

    chown -R www-data:www-data /var/www/moodledata
    chmod -R 0755 /var/www/moodledata

Step #5: Moodle MySQL Database

It's time to create a new database and user for the Edumy demo Moodle database. Use MySQL from the command line for this. Make sure you set the appropriate permissions for the new user, and grant all privileges on the database.

  1. First, login to MySQL via the command line:

    mysql -u root -p

     
  2. Then create a new database:

    CREATE DATABASE moodle;

     
  3. Now, create a user:

    CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'new-password-here';

     
  4. Then flush:

    FLUSH PRIVILEGES;

     
  5. And grant all privileges:

    GRANT ALL PRIVILEGES ON moodle.* TO 'moodle'@localhost identified by 'same-password-here';

     
  6. Then flush:

    FLUSH PRIVILEGES;

     
  7. Exit MySQL:

    exit

     
  8. Now run the following to restart MySQL: 

    CentOS:

    service mysql restart

    Ubuntu:

    service mysql reload
    services mysql restart

     
  9. Import mysql file:

    mysql -u [user] -p [database_name] < /path/to/cocoon_edumy.sql

     

Step #6: Moodle configuration

You're moments away from experiencing Edumy with our powerful Demo Installation. All that's left is to configure Moodle's config.php file to match the new setup you've just created.

Use vi (or vim, or nano, or your preferred editor) to edit the config.php file in the Moodle root:

  1. vi /var/www/httpdocs/config.php

     
  2. Change details according to Step 5 in the online documentation. Ensure that the paths and permissions provided for the dataroot are correct (as you previously defined above), and that the wwwroot is the public URL at which the Edumy Moodle Demo Installation webroot is configured. The database details should correctly match those that you set up during the steps above.

     
  3. After making your changes, save the file. If you're using vi editor, it's :x to save.

You're all done.

Login with the following credentials, purge the Moodle caches, and enjoy the power of Edumy Premium Moodle LMS theme.

username: admin
password: admin123