Installing Moodle on a domain

Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
Number of replies: 21
Hi everyone,

I am used to installing Moodle through Softaculous & Bitnami

Saw a post under general help as extracted below

How was Moodle installed - especially if you used the likes of Softaculous, 
Bitnami etc. (clue - *don't* use these installers!)

If installing through Softaculous and Bitnami is not encouraged, what's the best way to get Moodle running for public use?



Average of ratings: -
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
Very broad topic, but ... here's official docs:

Much depends upon where/how hosted (operating system as well) and OP's understanding of how to setup a web site as hosting will allow/not allow. :|

'SoS', Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
Thanks for your feedback Ken,

My options are kinda limited as I only have access to a domain, hosting plan with c-panel.

Just want an installation that I can easily install and auto-updated itself.
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
"...auto-updated itself."

Think you will be disappointed with this wish!
Closest thing to that (at present time) is using git for initial install as that would allow the creation of a CLI (command line) 'auto-update' in a cron job to be run just after the scheduled weekly releases of the version you are running.


That would eventually have to be edited to do an upgrade - there is a difference between what is known as an update and an upgrade.

My 2 cents, however!

'SoS', Ken




In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
Well, have been into OP's system to solve smtp issues via cPanel Terminal and see that your server has git.

BY FAR ... the best way for you to update/upgrade etc IS CLI and git.   But, you have to be willing to learn a little command line foo to get the job done.  Not rocket science ... 'just enough'! smile


Matter of fact, version is related to SMTP issues as well.

http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases
Row for 4.1 and footnote for that row on versions.

Ver Moodle min/max but note footnote 6
4.1 (LTS) 7.4.0 8.1[6]
PHP 8.1 since Moodle 4.1.2. See MDL-73016.

Your version of Moodle
4.1.1+ (Build: 20230303)

'SoS', Ken
 
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
There is no single answer. Moodle can be installed anywhere, where an *AMP runs, from Raspberry Pi Zero to huge clusters.

In reply to Visvanath Ratnaweera

Re: Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
Thanks for your feedback,

What I have access to right now is cpanel from a hosting plan. What's the best installation setup you will recommend?
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
If you have only one option, then it is the best best option you have!

P.S. The subject line rhymes with "Installing" in my ears.
wink
In reply to Visvanath Ratnaweera

Re: Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
lolzz,

What's the alternative to installing Moodle other than using installers like Softaculous, Bitnami etc?
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
Maybe you don't need to actually install, just use:

'SoS', Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Thanks for posting this, Ken.  (You beat me to it.)
In reply to Rick Jerz

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
Welcome!   Now when are you gonna try git? smile
'SoS', Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
Thanks Ken. Will try this out and give feedback
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by ADENIRAN O. MICHAEL -
Thanks for the support, it was helpful.

I was able to install using the video.

Now, I am trying to install the new theme "Edumy" I have been getting the errors below

unicode

It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).

I have updated the collation in phpmyadmin to UTF-8 but the error persists.


mysql_full_unicode_support

The current setup of MySQL or MariaDB is using 'utf8'. This character set does not support four byte characters which include some emoji. Trying to use these characters will result in an error when updating a record, and any information being sent to the database will be lost. Please consider changing your settings to 'utf8mb4'. See the documentation for full details.



In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
From what you have said, I am unsure if you have updated the collation to utf8mb4, as mentioned in the last sentence.
 
It has been a long while since I have had to make this collation change to all tables, after installing Moodle, instead of at the start of an installation.  Maybe Ken or someone else will be more familiar with what you need to do.  Also, I don't know anything about that Edumy theme and its compatibility with your version of Moodle.
In reply to ADENIRAN O. MICHAEL

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
Video didn't cover character set of DB ... which to be in full compliance should be utf8mb4 with collation utf8mb4_unicode_ci.

https://docs.moodle.org/401/en/Installation_quick_guide#Create_a_database


4.1 no longer has admin/cli/ script to change character set on DB, all tables in the DB, and all columns in those tables, so looks like that operation will have to be done using phpmyadmin and on the DB for the moodle.

I don't use phpmyadmin!

But bet if you google for how to change character set on a database using phpmyadmin, you might find a page that tells how.

And just as a matter of caution, backup DB before attempting any such change ... just in case! smile

'SoS', Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Okay, I am going to have to edit and improve that video.

Here is what I would suggest. After creating the database, this is where you should go into phpMyAdmin, pick the Moodle database, go into options, and set (i.e., change) the collation to utf8mb4.  Click "Go." Then initiate the Moodle installation, which will see utf8mb4 and use it for all tables.

ADENIRAN, give this a try. (Delete your initial install. Do you know how to do this?)
In reply to Rick Jerz

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
@Rick .. sent you a PM that will help.
And another thought ...

Historically ...
when you made the videos on GoDaddy, you had already tweaked DB server to meet requirements
for a moodle.  Your VPS was already set for utf8mb4 character set and the only addition you needed to make was collation.

The most hosted content management system is WordPress.  With their latest/greatest, they now have a DB requirements which happen to align with new requirements of moodle.
https://wordpress.org/about/requirements/

Not only that, but WordPress even has a page for 'best hosting'!   

Hmmmmmm ....
https://wordpress.org/hosting/
I see 2 have paid to have their hosting listed:
Bluehost and DreamHost.

More HMMMMMM... might be good places to host noodles as well!
Revenue stream ... if moodle invited hosting providers to be listed for a fee.

'SoS', Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Oops, I am back (we are back) into the "collation" versus "character set" issues. So, I am scratching my head a little.

I did find that you can view both the collation and character set for your moodle database, in phpMyAdmin, if you first click on "home" and then issue the following SQL

SELECT * FROM information_schema.SCHEMATA S
WHERE schema_name = "Your_moodle_database_name";

In my case, I see the following, which has the correct collation and character set.
 
Character%20Set%20and%20Collation%20for%20Moodle.jpg

ADENIRAN, if you issue this command via phpMyAdmin, what do you see?

Now the challenge is how to change this, especially if collation is correctly set to utf8mb4. From what I have gathered from searching, the character set might pick up setting from collation, but I don't know for sure.
 
I don't know if the "Alter" database command can be issued from phpMyAdmin.  I still need to experiment.


I am going to see what ADENIRAN says before I scratch my head any more.
In reply to Rick Jerz

Re: Installing Moodle on a domain

by Ken Task -
Picture of Particularly helpful Moodlers
2 cents worth ...

When in doubt, go directly to the source:

Version 8.0 of MySQL
https://dev.mysql.com/doc/refman/8.0/en/alter-database.html

Version 5.7 of MySQL
https://dev.mysql.com/doc/refman/5.7/en/alter-database.html

Version 8.2 of MySQL
https://dev.mysql.com/doc/refman/8.2/en/alter-database.html

ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

Does work ... if user has grants to alter DB ... and think for moodle code to function that's necessary.

https://docs.moodle.org/403/en/Installation_quick_guide#Create_a_database
Does show that user should be granted alter:

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodleuser'@'localhost' IDENTIFIED BY 'yourpassword';

'Spirit of Sharing' (SoS),
Ken

In reply to Ken Task

Re: Installing Moodle on a domain

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yep, Ken, thanks for your guidance.

I tried that "Update" command late last night, and yes, it seems to work.  And yes, I give my database owner (i.e., myself) full rights.  If I didn't give the database owner "update" rights, that Update command probably wouldn't work.

We might need to see if ADENIRAN knows what we are talking about and is comfortable issuing the various SQL commands.