{"id":2022,"date":"2018-06-26T01:23:18","date_gmt":"2018-06-26T01:23:18","guid":{"rendered":"http:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/?p=2022"},"modified":"2025-10-06T15:52:16","modified_gmt":"2025-10-06T15:52:16","slug":"moodle-installation","status":"publish","type":"post","link":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/2018\/06\/26\/moodle-installation\/","title":{"rendered":"Moodle Installation"},"content":{"rendered":"<p>Since the Moodle Docs site has been so sketchy, I decided it would be best to document my recent installation.<br \/>\nNote:\u00a0 I am installed on a VMWare ESXi 6.5 Virtual Machine.\u00a0 750GB SSD, 16GB RAM, and 8 Cores.<\/p>\n<ul>\n<li>Install Ubuntu 16.04<\/li>\n<li>If you are doing it on a VM, check Check CPU#, Increase Video RAM, and move LAN to the 1000e.<\/li>\n<li>I immediately open root and do everything else as room\n<ul>\n<li>sudo -i passwd root<\/li>\n<li>sudo passwd -u root<\/li>\n<li>su<\/li>\n<li>gedit \/usr\/share\/lightdm\/lightdm.conf.d\/50-ubuntu.conf\n<ul>\n<li>Add the following lines to the bottom.<br \/>\n[SeatDefaults]<br \/>\ngreeter-session=unity-greeter<br \/>\nuser-session=ubuntu<br \/>\ngreeter-show-manual-login=true<\/li>\n<\/ul>\n<\/li>\n<li>gedit \/root\/.profile\n<ul>\n<li>Delete last line -&gt; mesg n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Reboot and logon as root\n<ul>\n<li>Update\u00a0 and install vm tools\n<ul>\n<li>apt-get update<\/li>\n<li>apt-get upgrade<\/li>\n<li>apt-get install open-vm-tools<\/li>\n<\/ul>\n<\/li>\n<li>Install LAMP and required Moodle dependencies.\n<ul>\n<li><span style=\"font-weight: 400\">apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0<\/span><\/li>\n<li><span style=\"font-weight: 400\">apt-get install graphviz aspell php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip<\/span><span style=\"font-weight: 400\"> php7.0-soap php7.0-mbstring<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Restart the server and then create the Moodle database\n<ul>\n<li>reboot -r now<\/li>\n<li><span style=\"font-weight: 400\">mysql -u root -p<\/span>\n<ul>\n<li><span style=\"font-weight: 400\">CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<\/span><\/li>\n<li><span style=\"font-weight: 400\">create user &#8216;<em>username<\/em>&#8216;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;<em>password<\/em>&#8216;;<\/span><\/li>\n<li><span style=\"font-weight: 400\">GRANT ALL PRIVILEGES \u00a0ON moodle.* TO <em>username<\/em>@localhost IDENTIFIED BY &#8216;<em>password<\/em>&#8216;<\/span><\/li>\n<li>quit;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>I make the folders for Moodle in the \/var\/www folder and initially open all permissions there.\n<ul>\n<li>cd \/var\/www<\/li>\n<li>mkdir moodledata<\/li>\n<li>mkdir moodlesql<\/li>\n<li>chmod -R 0777 \/var\/www<\/li>\n<\/ul>\n<\/li>\n<li style=\"list-style-type: none\">\n<ul>\n<li>If you are restoring a previous version.\n<ul>\n<li>cd \/var\/www\/moodlesql\u00a0 (or wherever the sql file is)<\/li>\n<li>mysql -p moodle&lt;moodle-database.sql<\/li>\n<\/ul>\n<\/li>\n<li>If you make a mistake you can always delete the database and start over\n<ul>\n<li><span style=\"font-weight: 400\">mysql -u root -p<\/span>\n<ul>\n<li><span style=\"font-weight: 400\">drop database Moodle;<\/span><\/li>\n<li>quit;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>There are a couple tweaks I make to PHP before the installation\n<ul>\n<li>gedit \/etc\/php\/7.0\/apache2\/php.ini\n<ul>\n<li>find &#8220;post_max_size&#8221;<\/li>\n<li>Change the value to the number of Mb you want your site to accept as uploads<\/li>\n<li>find &#8220;upload_max_filesize&#8221;<\/li>\n<li>Change to the same value as above<\/li>\n<li>Find &#8220;max_execution_time&#8221;<\/li>\n<li>Raise to a larger value if needed (like 60-600)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Download Moodle from Moodle.org and extract the file to \/var\/www\/html\n<ul>\n<li>Navigate to 127.0.0.1 in your browser and begin the installation!<\/li>\n<\/ul>\n<\/li>\n<li>When you are complete you may want to:\n<ul>\n<li>Reset your folder permissions\n<ul>\n<li>chmod -R 0775 \/var\/www<\/li>\n<\/ul>\n<\/li>\n<li>make your IP address a static one and then get that address permanently in the moodle config.php file until you have an actual web address to put in there.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>]]&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since the Moodle Docs site has been so sketchy, I decided it would be best to document my recent installation. Note:\u00a0 I am installed on a VMWare ESXi 6.5 Virtual Machine.\u00a0 750GB SSD, 16GB RAM, and 8 Cores. Install Ubuntu 16.04 If you are doing it on a VM, check Check CPU#, Increase Video RAM, &hellip; <a href=\"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/2018\/06\/26\/moodle-installation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Moodle Installation<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,30],"tags":[],"class_list":["post-2022","post","type-post","status-publish","format-standard","hentry","category-it-support","category-moodle"],"_links":{"self":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/2022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/comments?post=2022"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/2022\/revisions"}],"predecessor-version":[{"id":2754,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/2022\/revisions\/2754"}],"wp:attachment":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/media?parent=2022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/categories?post=2022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/tags?post=2022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}