Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Installing Moodle on SmarterASP.NET.

Installing Moodle on SmarterASP.NET: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 91: Line 91:


<code php>  
<code php>  
$CFG->dbtype   = 'mysql';                    // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->wwwroot   = 'http://www.ccsdcurriculumcom/moodle';
$CFG->dblibrary = 'native';                   // 'native' only at the moment
$CFG->dataroot  = 'h:\root\home\jefferyjjensen-001\www\ccsdcurriculum.com';
$CFG->dbhost    = 'MYSQL5002.Smarterasp.net';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbhost    = 'MYSQL5002.Smarterasp.net';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'db_991088_moodcur';        // database name, eg moodle
$CFG->dbname    = 'db_991088_moodcur';        // database name, eg moodle

Revision as of 19:54, 19 February 2013

Background

Often teachers and administrators want to use Moodle in a live shared web hosting environment instead of a private local computer install. Many hosting companies such as Go Daddy have a one-click install of Moodle. In the case of Go Daddy, they install Moodle 1.9 (as of 2/18/2013) but what if you want to run a later/newer version of Moodle or your web hosting company doesn't support Moodle one-click installs? This installation guide will walk you through the steps to install the latest version Moodle on SmarterASP.NET shared web hosting.

Obtain Domain Name

Purchase Web Hosting

  • obtain web hosting account on SmarterASP.NET (if you like this tutorial, please support me by purchasing through my affliliate account)
  • I purchased the .NET Premium shared hosting for $7.95 a month ($95.40 a year)

Configure Domain Name Server (DNS)

  • If you purchased your domain from another hosting company, you will need to login to the control panel of that hosting company and have the DNS entry point to the SmarterASP.NET servers, ns1.dns-ez.com & ns2.dns-ez.com
  • login to SmarterASP.NET control panel add new site in the Hosting Manager → Website Domain Manager → Add New Site
    • Website/Folder Name: ccsdcurriculum.com
    • Programming Language: PHP
    • rename site5 to ccsdcurriculum.com
    • add domain www.ccsdcurriculum.com to site5
    • smarteraspWebDomainMgr.png

Create MySQL database

  • login to the SmarterASP.NET control panel and navigate to Hosting Control Panel → Database Manager → MySQL Manager → click Create New Database
  • enter a portion of the database name and a password
  • write down the connection string info (Database Name, Server URL, Login Name and Password) as this will be used when creating the config.php file
  • SmarterASPCreateMySQLDB.png

Create website directory and moodledata subdirectory

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → Hosting Manager → File Manager → New Folder and recommend giving it the same name as your domain name, i.e. ccsdcurriculum.com
  • create a New Folder under ccsdcurriculum.com called moodledata. Note this SmarterASP.NET uses Windows Hosting so you cannot change permission like on linux systems using chmod 775

Setup FTP account

  • Goal is to create an ftp account to transfer local files to SmarterASP.NET
  • login to SmarterASP.NET control panel
  • Hosting Control Panel → Hosting Manager → FTP Users Manager → Add FTP User. Enter a user name and password.
  • Unable to create a ftp account at the root level with SmarterASP.NET, need to create a subdirectory. Recommend naming the file directory name the same as your domain name, for example ccsdcurriculum.org.

Setup subdomain ftp.ccsdcurriculum.com

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → DNS Manager
  • select domain name and click Manage button
  • edit CNAME record to ftp.ccsdcurriculum.com and point this to the SmarterASP.NET ftp server IP address 208.118.63.62

Download Moodle

  • download zip version of moodle, moodle-2.4.1.zip standard package, don't use the windows installer one because this includes Apache, PHP and other server stuff which is not needed on a shared hosting environment.
    • Typically shared hosting companies do not allow remote desktop access (windows) or telnet shell access (linux) to manually download files to the server, so we have to download to your local computer and then upload it to SmarterASP.NET

Upload zip version of Moodle to web hosting

  • Need to use an ftp client such as FileZilla or UltraEdit to upload the zip file into your domain name directory.
  • Do not upload the file into the moodledata subdirectory
  • When you unzip the moodle-2.4.1.zip file, it will create the moodle directory and all the necessary application data.
  • Example, ftp.ccsdcurriculum.com and enter the ftp account info above for the username and password.
  • Then use File Manager of SmarterASP.NET Control Panel to unzip the moodle-2.4.1.zip file.
  • SmarterASPUnpackMoodle.png

Check PHP Version Installed

<?php

 phpinfo();

?>

optional - Update PHP version to 5.4.7

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → IIS Manager → PHP Version Manager
  • SmarterASPIISUpgradePHP.png

Create config.php

  • edit the config-dist.php and save as config.php
  • edit lines 41 - 47 with the SmarterASP.NET specific connection string

$CFG->dbtype = 'mysql'; // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci' $CFG->dblibrary = 'native'; // 'native' only at the moment $CFG->dbhost = 'MYSQL5002.Smarterasp.net'; // eg 'localhost' or 'db.isp.com' or IP $CFG->dbname = 'db_991088_moodcur'; // database name, eg moodle $CFG->dbuser = 'ccsdcurriculum'; // your database username $CFG->dbpass = 'Abcd1234'; // your database password $CFG->prefix = 'mdl_'; // Prefix to use for all table names

  • Other variables must be defined as follows, line 97 for wwwroot, line 113 for dataroot (use SmarterASP.NET File Manager to find the full path to your domain name)

$CFG->wwwroot = 'http://www.ccsdcurriculumcom/moodle'; $CFG->dataroot = 'h:\root\home\jefferyjjensen-001\www\ccsdcurriculum.com'; $CFG->dbhost = 'MYSQL5002.Smarterasp.net'; // eg 'localhost' or 'db.isp.com' or IP $CFG->dbname = 'db_991088_moodcur'; // database name, eg moodle $CFG->dbuser = 'ccsdcurriculum'; // your database username $CFG->dbpass = 'Abcd1234'; // your database password $CFG->prefix = 'mdl_'; // Prefix to use for all table names


Old Stuff