Moodle is the world’s hottest studying administration system for constructing strong on-line studying websites. It incorporates a vary of actions and academic instruments that you would be able to select from, it helps evaluation administration and ships with customized certificates. It additionally permits communication along with your college students in real-time with a robust video convention software. Moreover, it’s mobile-ready, so your college students can study from their cell units.
Moodle Server Necessities
- Working System: a minimal set up of CentOS Eight or RHEL Eight server with LEMP stack put in.
- Disk House: 200MB for the Moodle, and 5GB might be a sensible minimal of storing content material.
- Processor: 1GHz (min), 2GHz dual-core or extra really helpful.
- Reminiscence: 512MB (min), 1GB or extra is really helpful. 8GB plus is probably going on a big manufacturing server.
Making a Area DNS Report for Moodle Web site
1. Begin by making a subdomain that customers will use to entry the Moodle on-line studying web site. For instance, in case your area title is testprojects.me, you’ll be able to create a subdomain known as studying.testprojects.me.
Open your area title’s superior DNS settings and add an A file as proven within the following picture.
Add A Report for Moodle Area
Putting in Moodle in CentOS Eight Server
2. Earlier than putting in Moodle, guarantee that you’ve got the required PHP extensions in your server, you’ll be able to run the next command to put in them:
# dnf set up php-common php-iconv php-curl php-mbstring php-xmlrpc php-soap php-zip php-gd php-xml php-intl php-json libpcre3 libpcre3-dev graphviz aspell ghostscript clamav
3. Subsequent, create a database for the Moodle utility as follows.
# mysql -u root -p
Then create the database, database person and create a safe password for the use.
MariaDB [(none)]> CREATE DATABASE moodledb;
MariaDB [(none)]> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodledb.* TO ‘moodleadmin’@’localhost’ IDENTIFIED BY ‘[email protected]’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit
4. Now obtain the newest model of Moodle (3.9 on the time of writing) from the official moodle venture web site, extract the archive file and transfer it into your webroot (/var/www/html/) listing, then set applicable permissions and possession to permit the webserver entry to the Moodle listing, as follows.
# wget -c https://obtain.moodle.org/obtain.php/direct/secure39/moodle-latest-39.tgz
# tar -xzvf moodle-latest-39.tgz
# mv moodle /var/www/html/
# chmod 775 -R /var/www/html/moodle
# chown nginx:nginx -R /var/www/html/moodle
5. Subsequent, create the moodledata listing which is the placement of information which are uploaded or created by the Moodle interface, then assign applicable permissions and possession to permit the webserver learn and write entry to it:
# mkdir -p /var/www/html/moodledata
# chmod 770 -R /var/www/html/moodledata
# chown :nginx -R /var/www/html/moodledata
6. Subsequent, transfer into the Moodle set up listing and create a config.php file from the pattern config.dist.php file offered, then open it for enhancing to configure some key settings to your Moodle platform, corresponding to database connection parameters and the positioning location and the place it will possibly discover the moodledata listing:
# cd /var/www/html/moodle/
# cp config-dist.php config.php
# vim config.php
Set the right datbase sort, right database host, database title, and database person and the person’s password.
$CFG->dbtype = ‘mariadb’; // ‘pgsql’, ‘mariadb’, ‘mysqli’, ‘sqlsrv’ or ‘oci’
$CFG->dblibrary = ‘native’; // ‘native’ solely in the intervening time
$CFG->dbhost = ‘localhost’; // eg ‘localhost’ or ‘db.isp.com’ or IP
$CFG->dbname = ‘moodledb’; // database title, eg moodle
$CFG->dbuser = ‘moodleadmin’; // your database username
$CFG->dbpass = ‘[email protected]zzwd0L2’; // your database password
$CFG->prefix = ‘mdl_’; // prefix to make use of for all desk names
7. Additionally set the URL used to entry your Moodle sit, this specifies the placement of the wwwroot the place your Moodle net information are positioned, and likewise the dataroot (the moodledata listing):
$CFG->wwwroot = ‘http://studying.testprojects.me’;
$CFG->dataroot = ‘/var/www/html/moodledata’;
Configuring NGINX to Serve Moodle Web site
8. On this part, it’s essential configure NGINX to serve your Moodle utility. It is advisable to create a server block for it within the NGINX configuration as proven.
# vim /and so on/nginx/conf.d/moodle.conf
Copy and paste the next configuration within the server block configuration file. Exchange the server title along with your subdomain title created above, and the fastcgi_pass ought to level to php-fpm (be aware that on CentOS 8, PHP-FPM accepts FastCGI requests utilizing the tackle outlined within the /and so on/nginx/conf.d/php-fpm.conf configuration).
server{
pay attention 80;
server_name studying.testprojects.me;
root /var/www/html/moodle;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^(.+.php)(.*)$
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_index index.php;
fastcgi_pass php-fpm;
embody /and so on/nginx/mime.varieties;
embody fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Save the file and shut it.
9. Then test the NGINX configuration for correctness, whether it is Okay, restart the nginx and php-fpm companies to use the latest modifications:
# nginx -t
# systemctl restart nginx
# systemctl restart php-fpm
10. If in case you have SELinux enabled in your system, then run the next instructions to set the right context for accessing the Moodle net information on the server:
# setsebool -P httpd_can_network_connect on
# chcon -R –type httpd_sys_rw_content_t /var/www/html
11. Moreover, be sure that the HTTP and HTTPS companies are open within the firewall to permit visitors to the NGINX net server:
# firewall-cmd –permanent –zone=public –add-service=http
# firewall-cmd –permanent –zone=public –add-service=https
# firewall-cmd –reload
Full Moodle Set up through Net Installer
12. To entry the Moodle net installer, open your net browser, and navigate utilizing the subdomain you created above:
http://studying.testprojects.me
As soon as the welcome web page masses learn by the phrases, and situations and click on Proceed.
Moodle Net Installer
13. Subsequent, the online installer will test whether or not your system meets the necessities for operating a Moodle web site of the required model. You possibly can scroll right down to view extra info.
Moodle Server Necessities Test
14. The installer will complain about HTTPS not being enabled, ignore that error for now (within the subsequent part, we’ll present methods to allow HTTPS on Moodle), and click on Proceed, to start out the precise set up of the online information.
Moodle HTTPS Error
15. Now the installer will begin the precise set up of the Moodle information as proven within the following screenshot. As soon as it’s full, click on Proceed.
Moodle Set up
16. Within the subsequent step, it’s essential replace your Moodle web site’s administrator account by updating the username, password, first title, and surname, and e-mail tackle. Then scroll down the web page and click on Replace Profile.
Moodle Website Particulars
17. Then replace the Moodle web site front-page settings. Then scroll down and click on Replace to start out utilizing your Moodle web site.
Moodle Entrance Web page Settings
18. Subsequent, it’s essential register your web site by following the directions on the display screen. You possibly can go to the dashboard by clicking on the Dashboard.
Moodle Net Set up Full
Setting Up HTTPS on Moodle Website Utilizing Let’s Encrypt
HTTPS provides the primary layer of safety to your web site to allow safe communications between your customers and the Moodle utility (particularly the NGINX net server which receives requests and delivers responses).
You possibly can both buy an SSL/TLS certificates from a business CA or use Let’s Encrypt which is free and acknowledged by all trendy net browsers. For this information, we’ll use Let’s Encrypt.
19. The Let’s Encrypt Certificates deployment is mechanically managed utilizing the certbot software. You possibly can set up certbot and different required packages with the next command:
# dnf set up certbot python3-certbot-nginx
20. Then run the next command to get a Let’s Encrypt certificates and have Certbot edit your NGINX configuration mechanically to serve it (it’ll additionally configure HTTP to be redirected mechanically to HTTPS).
# certbot –nginx
Allow HTTPS on Moodle
21. Then run the next command to allow computerized renewal of the Let’s Encrypt SSL/TLS certificates:
# echo “Zero 0,12 * * * root python3 -c ‘import random; import time; time.sleep(random.random() * 3600)’ && certbot renew -q” | sudo tee -a /and so on/crontab > /dev/null
22. Subsequent, replace your Moodle configuration to start out utilizing HTTPS.
# vim /var/www/html/moodle/config.php
change the wwwroot URL from HTTP to HTTPS:
$CFG->wwwroot = ‘https://studying.testprojects.me’;
23. Final however not least, affirm that your Moodle web site is now operating on HTTPS.
Moodle Website Working on HTTPS
That’s it for now! For extra info and configuration choices to run your new studying platform, go to the Moodle web site, and skim by the official documentation.
install moodle 3.8 centos 7,moodle centos 8,install moodle ssh,install php 7.1 centos 7,install moodle ubuntu,latest moodle version,centos 7, nginx, php 7,centos7 nginx php7,install php-fpm 5.6 centos 7,nginx php centos 8,php-fpm.sock not found centos 7,install nginx php-mysql phpmyadmin centos 7,install moodle 3.8.2 on centos 7,install moodle on centos 8,moodle latest version,how to configure moodle on centos 7,install php-fpm centos 7,centos lemp,learning management system,centos ius repo php fpm7,moodle 3.5 3 download,moodle 3.7 2 download