This post is to demonstrate how to setup Moodle 3.3 on Ubuntu 16.04:
Install aptitude package manager.
sudo apt-get install aptitude
Install Apache2
sudo aptitude install apache2
Install mysql
sudo apt-get install mysql-server
Secure Mysql installation
mysql_secure_installation
Install PHP
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-pear php-gd php-mbstring php-xml php-xmlrpc php-curl php-mbstring php-mcrypt php-soap php-intl
Install Pear Modules
sudo pear install MDB2-2.5.0b5
sudo pear install “channel://pear.php.net/MDB2_Driver_mysqli-1.5.0b4″
#Note that pear/mdb2#mysql is no longer available in PHP 7.0 since the mysql extension was removed in this version
sudo pear install “channel://pear.php.net/LiveUser-0.16.14″
sudo pear install HTML_Template_it
Install PIP (Python’s pear equivalent)
sudo apt-get install python-pip
sudo apt-get install unzip
sudo apt-get install elinks (text browser, to download moodle)
Install SSL:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
/etc/apache2/sites-available/default-ssl.conf
sudo nano /etc/apache2/sites-available/default-ssl.conf
Add/Edit the following lines:
ServerAdmin your_email@example.com
ServerName server_domain_or_IP
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Enable SSL and SSL VirtualHost:
sudo a2ensite default-ssl
sudo a2enmod ssl
Configuration test:
sudo apache2ctl configtest
Restart apache2 to enable SSL settings:
sudo systemctl restart apache2
Mysql commands:
create database moodle;
create user ‘webadmin’@’%’ identified by ‘{some password}’;
grant all on moodle.* to ‘webadmin’@’%’;
Download Moodle:
cd /tmp/
elinks https://download.moodle.org/download.php/stable33/moodle-latest-33.tgz
navigate to and click on the download now link
tar xfz moodle-latest-33.tgz
Note:: Change moodle-latest-33.tgz to the correct file name, given on the web page -> https://download.moodle.org/releases/latest/
download.moodle.org
Install Moodle on your own server (requires a web server with PHP and a database) by downloading one of the following packages or obtaining Moodle via Git.
|
Move all moodle files to the wwwroot:sudo mv moodle/* /var/www/html/
Configure config.php
sudo cp config-dist.php config.php
sudo nano config.php
Set host and database configuration to match those set above.
Browse to your New Moodle Installation:
http://{your IP}/
This is really fascinating, You are an overly skilled blogger. Ive joined your rss feed and stay up for looking for more of your great post. Also, Ive shared your website in my social networks!
Thanks for your blog, nice to read. Do not stop.
Hi! I just wish to give you a huge thumbs up for the excellent info you have got here on this post. I will be coming back to your web site for more soon.
Excellent article. I definitely appreciate this site. Keep writing!