Installation of Moodle 2.7 on CentOS 6.5 server via command line

Installation of Moodle 2.7 on CentOS 6.5 server via command line

by Gary Lebowitz -
Number of replies: 3

Hello all,

To avoid conflicts with Plesk 11.5 I started over from the command line of CentOS 6.5 and have got pretty far. But the problem now is related to a module which supposedly can be installed using yum on the command line, but which isn't installing or fixing the issue shown in the first line of the attached file. If anyone knows how I can fix this I should be OK. Everything else has been properly installed on my new virtual server, which I have full access to via SSH. Thanks in advance for anyone able to help my with the red Check flag and with any of the other orange ones for CentOS 6.5 via the command line. My new server has 1Mbytes of RAM and no Plesk interface by the way.

Attachment install_problem1.jpg
Average of ratings: -
In reply to Gary Lebowitz

Re: Installation of Moodle 2.7 on CentOS 6.5 server via command line

by Ken Task -
Picture of Particularly helpful Moodlers

Copy the text output from:

php -v (shows version)

php -m (shows modules loaded)

paste the text into a response.

Also run:

yum list php-*

You'll see something like this IF your system is using CentOS repos:

[root@moodle ktask]# yum list php-*
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.aol.com
 * extras: mirrordenver.fdcservers.net
 * updates: centos.netnitco.net
Installed Packages
php.x86_64                5.3.3-27.el6_5 @updates
php-cli.x86_64            5.3.3-27.el6_5 @updates
php-common.x86_64         5.3.3-27.el6_5 @updates


Basically, CentOS 6.5 update repos may not have the required PHP version nor the
matching  extensions needed.

One needs to use 3rd party repo.   Recommend Webtatic repos for CentOS 6
http://webtatic.com/packages/php54/
On the link above make sure you use el6 references ... NOT the el5's.

el6 = redhat enterprise release 6.x which also = centOS 6.x for most practical purposes

Once the webtatic repo is installed, edit the repo file for it.
Located in /etc/repos.d/

nano webtatic.repo

You'll see a line that has it enabled:

enabled=1

Change the 1 to a 0.

* you don't want webtatic to update other things ... right now just PHP.  And you want to be in control of what it updates.  You should also check, however, IF you have the minimum requirement for MySQL

Now when issuing the yum list command above, tell yum to use the webtatic repo:

yum --enablerepo=webtatic list php*

You'll see a difference.

Before installing PHP from webtatic you will probably have to remove the php that is
there - php and the php-extenisons - especially php-common - or there will be a
conflict.

Then, when going after PHP from webtatic, think going after his php54w version might be
safer than php55w verison.
Either one those include Zend-opcache - pretty much required for 2.7+->

Easiest way to get all php extensions is to use a global but you might want to list first.

yum --enablerepo=webtatic list php* php*-*

if the global following php above doesn't show extensions the php*-* will

Now about that 1MB RAM ... really?  I hope that's a typo and the server is really at least 1GIG ... and even that might be under-powered.

See:

http://docs.moodle.org/27/en/Installing_Moodle#Hardware

Might upgrade the VPS package (memory) before seriously tackling Moodle.   And, if using the same VPS for your database, it's *strongly* recommended.  I've read somewhere that mysql runs best when it can use up to 80% of available memory.

'spirit of sharing', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Installation of Moodle 2.7 on CentOS 6.5 server via command line

by Gary Lebowitz -
Hi Ken,

The idea you gave me to fix my PHP issue seems to work fine. The last remaining thing for my setup of 2.7  via the command line is to know where to place the php.ini file. In the directory structure of CentOS 6.5  I do see a  php.ini file sitting in /etc, but that is obviously not the one I need to increase maximum file upload size, etc. If you know where such a file should created and have a list of what it should include for my OS it would be much appreciated. In Plesk 11 PHP settings (max upload size, etc.) were set via a GUI, and I didn't have to work at the command-line level, but now that I've abandoned the GUI (which I'm happy to have done generally) I don't know what lines the php.ini should contain or where it sits so Moodle will allow me to upload larger files. 
In reply to Gary Lebowitz

Re: Installation of Moodle 2.7 on CentOS 6.5 server via command line

by Ken Task -
Picture of Particularly helpful Moodlers

yum --enablerepo=webtatic list php55w-* (or if you are shooting at 5.4 replace php55w with  php54w)

Will get a listing of all extensions available for 5.5.13 from webtatic

One you will see that is showing check is php55w-int.x86_64

To install via yum

yum --enablerepo=webtatic install php55w-int.x86_64

Ditto -soap, xmlrpc, etc.

After installing, apache *must be restarted*:

/sbin/service httpd restart

Check logs for apache:

tail -n 100 /var/log/httpd/error_log

Check what php version from command line:
php -v

Check to see if mods are loading:

php -m |more

For php settings:

cd /etc/

fgrep max_ php.ini

will show all variables in the ini file that contain 'max_'

post_max_size = 400M
upload_max_filesize = 400M

Both above must be set to allow uploads of max size 400M (as an example).

After changing php.ini, apache must be restarted.

To check: php -i | grep 'max_'

'spirit of sharing', Ken