Installing moodle 3.2.2 update on CentOS or RedHat

Installing moodle 3.2.2 update on CentOS or RedHat

by Asaf Dangoor -
Number of replies: 8

Hey there,


I am having some trouble updating my moodle version. Moodle 3.2.2 requires atleast PHP 5.6.5 and Mysql 5.3.3.1 versions. Now RedHat and CentOS(which are my server's OS) do not have current RPMs for PHP and Mysql. Is there another way to work around this issue? Or maybe if you guys know of such RPM theb inform me down below.


Current version of moodle: 2.7


Average of ratings: -
In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You don't say which version of CentOS you are running but there are alternative ways to get newer versions of PHP. 

Have a look at - http://rpms.remirepo.net/

Also https://webtatic.com/

In reply to Howard Miller

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Asaf Dangoor -

I have CentOS 6.5 or anything with RHEL in that version.

My goal is to upgrade to 3.2.2 version. Now the problem is that I can't find proper RPMs for it. Also my server is offline meaning there is no connection to the internet from it.


Now I must ask because I heard that PHP 7.0 and up don't work well with moodle and that they limit things that it can do. Is that true?

If it isn't i will start looking for that as well.

Ita up to the sysAdmin to see if he allows to use such 3rd party modifiers but I will see.


Thanks for the help!

In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Ken Task -
Picture of Particularly helpful Moodlers

Very important to know exactly what version of CentOS server is running ..

Please provide the follwing as root user:

uname -an

and

cat /etc/redhat-release

If the last one doesn't show: CentOS release 6.8 (Final) ... the system admin hasn't been updating recently and NEEDS TO!

Reason it makes difference ... is how the system admin sets up those 3rd party repos.

You or system admin will not be using RPM's directly about 99% of the time.   While RPM's are/is the RedHat Package Manger, you should  be using yum ... which sits in front of RPM and helps acquire 'depdencies'.

Cannot get higher versions of PHP/MySQL without using 3rd party repos via yum.   Well, err, ummmm ... yes could find all the RPM's but it not the easiest ... ie BEST ... way to admin a CentOS server.

What version of Moodle do you have now?

Also very important to know that for it's a factor in when one upgrades to PHP 7.0 or 7.1.

'spirit of sharing', Ken


In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Ken Task -
Picture of Particularly helpful Moodlers

In addition to what Howard has already shared, a word of caution ... 3rd party repos for CentOS 7 like Remi and Webtatic offer now version 7.0 and 7.1 of PHP.   Those versions of PHP are too far ahead of your Moodle 2.7 code and will cause issues.   So, you'll have to settle on PHP 5.6 highest for now.   Once you have that  working, you could upgrade your Moodle to the highest 3.0.x .. which is the first version of Moodle compat with PHP 7.0.   Then upgrade your PHP again from PHP 5.6.x to 7.0.  Goal, of course, should be to get to newer versions of everything ... but not get out there on the 'bleeding edge'.

And, all of done via yum ... which still uses RPM behind the scenes ... we are using yum, are we not? Have o ask stupid question to be sure. ;)

One last piece of advice about 3rd party repo's ... Remi has much more than just PHP and MySQL ... some stuff would actually replace CentOS 7 core.   Those things it might be best to leave core to CentOS repos and the 'extras' from Remi/Webtatic ... reason I mention that ... to be sure that you won't by mistake, pull in some non-core updates from Remi or Webtatic you might want to disable those repos from automagically updating when using yum -y update.   To do that, edit the repo files in /etc/yum.repos.d/ for remi and for webtatic and for epel (that repo required by Webtatic) and change enabled=1 to enabled=0.

Now to check for updates to whatever you've acquired from those repos one must use a switch to turn them on for the query of or install from ...

yum --enablerepo=webtatic check-update

That will include the turned on webtatic repo when checking for updates then.

To cover CentOS updates annoucments that are core, it's the an easy ... no brainer ...

yum -y update

Should have any conflict nor surprises then.

Now how do I know all that ... have wrecked my fair share of CentOS servers by not paying attention and in a hurry to get a security update to the OS  - later realizing my mistake, having to work from some hours getting things back to something sane. :\

'spirit of sharing', Ken

In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Asaf Dangoor -

Let me clear things up.

Current moodle version: 2.7

Moodle version "goal": 3.2.2

OS version: at the moment we got RedHat and CentOS 6.5

About the OS: I can't give you the user name and all for it. But more importantly it does not matter. The server will be updated to a RHEL 7 OS (whatever they have and can find).

Now the server and all of our network is disconnected from the internet. This means that using yum to install will be tricky for us to do. The sysAdmin said that it should be tested at home first on a virtual machine and from there ill need to bring him remi(or any other 3rd party mod) as a file so he can install it on the server.



Question is such, is it possible to get that 3rd party mod in an not yum way? Can I get a file as a file and not be confined to use the internet to install?

In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Ken Task -
Picture of Particularly helpful Moodlers

Sounds like your situation is not a good one and you are trying to do all you can to get Moodle up and running on a server that's not connected to the internet.

Is this server going to be connected to any network?   Does that network use TCP/IP?   IF the answer to both of those are 'No' .. then am not at all sure you'll be able to use Moodle.

Believe me when I say that rpm only will be a very steep and frustrating learning curve.  No one in these forums (including myself) could give you an accurate list of the rpm's you'll need to reach your goal of 3.2.2.   That's because rpm's have dependencies - other libs needed to support.

Here's an example and a brief explanation:

RPM find site ... go there ... we're looking for mysql high enough to support 3.2.2 moodle as CentOS 7/RHEL 7 (commercial) may not provide the version needed to run 3.2.2 of moodle.

https://rpmfind.net/linux/rpm2html/search.php?query=mysql

On the page above, find a row that shows it's for CentOS 6.5 ...  There isn't one!!!!

There is one for 6.8 so we'll use that.

Click the link that points to the .html page on that package ... it's the links in the first column.

mysql-5.1.73-7.el6.x86_64.html

The page shows info about that package ... *** look at the bottom of that page for 'requires' ***

That's all the 'dependencies that the mysql 5.1.x rpm *requires*.  They are NOT included in the RPM file for mysql.  There are over 40 of them.

Your current operating system, even though 3 versions behind, might already have some of those libraries ... but, not all.

Now one has to chase those rabbits to find other rpms.

If you plan to move to RHEL 7 or CentOS 7 may as well do that upgrade first before pursuing an outdated way of acquiring what is needed to run moodle 3.2.2 and use yum ... period!

Here's what I would suggest to you ... rather than you attempting to find all the RPM's ... take the server to this guy that says he'll install it .. assuming he's on a network ... and do the upgrades to OS and acquisitions of PHP/MySQL,etc. whatever there - while it's on a network using YUM.

'spirit of sharing', Ken


In reply to Ken Task

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Asaf Dangoor -

A true spirit of sharing!

Thank you very much. At the moment we are on a network, its secluded from the internet. What I can do is get the files needed to use for the installation. I will try myself for a couple of days to set this up in my home and test it out to see exactly what he needs for it. I feel like by doing it physically by my own I will learn a lot of things, maybe be that source of knowledge for this forum for whoever needs.

In reply to Asaf Dangoor

Re: Installing moodle 3.2.2 update on CentOS or RedHat

by Ken Task -
Picture of Particularly helpful Moodlers

It's all learning ... all the time ... never stops ... so you have a good attitude about that.    That's great.

I will make one more comment for what you've shared about the plan to installing Moodle sorta sends chills down my spine ....

This other person who is saying he will install it for you *IF* you acquire the RPM's is scary for if he will be attempting that feat via RPM's only?  IF you miss any of key dependency libraries etc.  the setup will be stalled dead in it's tracks.  IF that server is NOT on the internet at that time, not sure what one will do to acquire the needed files.

Think you need to do the install/setup when on a network using yum.

'spiriit of sharing', Ken