Since the Moodle Docs site has been so sketchy, I decided it would be best to document my recent installation.
Note: I am installed on a VMWare ESXi 6.5 Virtual Machine. 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, and move LAN to the 1000e.
- I immediately open root and do everything else as room
- sudo -i passwd root
- sudo passwd -u root
- su
- gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
- Add the following lines to the bottom.
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true
- Add the following lines to the bottom.
- gedit /root/.profile
- Delete last line -> mesg n
- Reboot and logon as root
- Update and install vm tools
- apt-get update
- apt-get upgrade
- apt-get install open-vm-tools
- Install LAMP and required Moodle dependencies.
- apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0
- 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 php7.0-soap php7.0-mbstring
- Restart the server and then create the Moodle database
- reboot -r now
- mysql -u root -p
- CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
- create user ‘username‘@’localhost’ IDENTIFIED BY ‘password‘;
- GRANT ALL PRIVILEGES ON moodle.* TO username@localhost IDENTIFIED BY ‘password‘
- quit;
- Update and install vm tools
- I make the folders for Moodle in the /var/www folder and initially open all permissions there.
- cd /var/www
- mkdir moodledata
- mkdir moodlesql
- chmod -R 0777 /var/www
-
- If you are restoring a previous version.
- cd /var/www/moodlesql (or wherever the sql file is)
- mysql -p moodle<moodle-database.sql
- If you make a mistake you can always delete the database and start over
- mysql -u root -p
- drop database Moodle;
- quit;
- mysql -u root -p
- There are a couple tweaks I make to PHP before the installation
- gedit /etc/php/7.0/apache2/php.ini
- find “post_max_size”
- Change the value to the number of Mb you want your site to accept as uploads
- find “upload_max_filesize”
- Change to the same value as above
- Find “max_execution_time”
- Raise to a larger value if needed (like 60-600)
- gedit /etc/php/7.0/apache2/php.ini
- If you are restoring a previous version.
- Download Moodle from Moodle.org and extract the file to /var/www/html
- Navigate to 127.0.0.1 in your browser and begin the installation!
- When you are complete you may want to:
- Reset your folder permissions
- chmod -R 0775 /var/www
- 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.
- Reset your folder permissions
]]>