Translate

lunes, 7 de diciembre de 2020

Moodle with Coderunner plugin, Jobe Sandbox and HTTPs CentOS 6

Moodle with Coderunner plugin, Jobe Sandbox and HTTPs CentOS 6

First, follow install instructions from:

Be sure to enable jobesandbox in Coderunner plugin configuration.

Coderunner uses Jobe sandbox by default but the http protocol is hardwired in file  jobesandbox.php. To change to https, just modify file:

/var/www/moodle/web/question/type/coderunner/classes/jobesandbox.php

In :

$protocol = 'http://';

Change to:

$protocol = 'https://';


jueves, 3 de diciembre de 2020

Instalación de php 7.0 para Moodle 3.8 en CentOS 6

1. Instalamos el SCL (Software collection ):
sudo yum install centos-release-scl

2. Instalamos la colección:
sudo yum install rh-php70

En mi caso, esto además instaló:
rh-php70-php-cli.x86_64 0:7.0.27-2.el6                rh-php70-php-common.x86_64 0:7.0.27-2.el6          
  rh-php70-php-json.x86_64 0:7.0.27-2.el6               rh-php70-php-pear.noarch 1:1.10.1-3.el6            
  rh-php70-php-process.x86_64 0:7.0.27-2.el6            rh-php70-php-xml.x86_64 0:7.0.27-2.el6             
  rh-php70-php-zip.x86_64 0:7.0.27-2.el6                rh-php70-runtime.x86_64 0:2.3-1.el6     



3. Habilitamos script para que modifique las variables de ambiente y tome la nueva versión de php:

cd /etc/profile.d/
cat<<EOF_PHP70>rh-php70.sh
#!/bin/bash
source scl_source enable rh-php70

EOF_PHP70

4. Ejecutamos y verificamos versión:

. ./rh-php70.sh
  php --versionPHP 7.0.27 (cli) (built: Nov  6 2019 09:34:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

which php
/opt/rh/rh-php70/root/usr/bin/php



5. Instalación del módulo para PostgreSQL y PHP para Apache:
yum -y install rh-php70-php-pgsqlrh-php70 rh-php70-php rh-php70-php-gd rh-php70-php-mbstring

6. Activación de AWS con php70. Respaldamos módulo original:
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off

7. 

Referencias:
Instalación de SCL rh-php70
NextCloud - Instalación de php 7.0

[SOLVED] Correction of: CentOS 6.10 Centos 6 : YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

 

 CentOS 6 is ending and after a yum update, if it gives the error:

# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
 

 You can fix it with:

echo "https://vault.centos.org/6.10/os/x86_64/"       >/var/cache/yum/x86_64/6/base/mirrorlist.txt
echo "https://vault.centos.org/6.10/extras/x86_64/"   >/var/cache/yum/x86_64/6/extras/mirrorlist.txt
echo "https://vault.centos.org/6.10/updates/x86_64/"  >/var/cache/yum/x86_64/6/updates/mirrorlist.txt

# These are optional ( if they are installed in your system):
if [ -f /var/cache/yum/x86_64/6/centos-sclo-rh/mirrorlist.txt ]; then
   echo "https://vault.centos.org/6.10/sclo/x86_64/rh/"  >/var/cache/yum/x86_64/6/centos-sclo-rh/mirrorlist.txt
fi
if [ -f  /var/cache/yum/x86_64/6/centos-sclo-sclo/mirrorlist.txt ]; then
  echo "https://vault.centos.org/6.10/sclo/x86_64/sclo/">/var/cache/yum/x86_64/6/centos-sclo-sclo/mirrorlist.txt
fi  

Voila!

References:

 https://www.linuxquestions.org/questions/centos-111/yumrepo-error-centos-5-9-a-4175604669/