Skip to main content

Moodle on Centos or Red Hat 7 (with SELinux!)

Why the need for another 'Installing Moodle' guide? Two reasons, Systemd and SELinux.
The steps are presented as a Bash script, which may be run on a virgin system, installing a complete working Moodle stack in one go, including enforcing SELinux.

In addition to the absolute basics it also includes adding ClamAV virus for file uploads and Memcached for sessions and 'MUC'.

It does not cover any extras you will need to get your site up to production, e.g. securing your database or updating your virus definitions automatically. Neither does it do any extra PHP configuration (upload limits, execution time etc.) or any extra complexities that might be desirable. For all of this you should goto


  1. Hi,

    your script works like a charm on Centos 7 minimal install, but SELINUX is driving me CRAZY... I'm trying to authenticate against an LDAP Server so I reinstalled php_ldap, configured this but SE Linux blocks my attempt to do a LDAP authentication...

    Error is:
    type=AVC msg=audit(1445443071.092:399): avc: denied { name_connect } for pid=1890 comm="httpd" dest=389 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:ldap_port_t:s0 tclass=tcp_socket type=SYSCALL msg=audit(1445443071.092:399): arch=c000003e syscall=42 success=noexit=-13 a0=c a1=7fa6b062b370 a2=10 a3=0 items=0 ppid=1123 pid=1890 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)

    I'm new to selinux (and I clearly understand its necessity) but I have no idea, which bool to set to allow httpd to state LDAP queries...

    Can you help me out?

    Thanks and Keep up the good work...

    best regards...

  2. And here is the solution...

    I've just entered the following:

    setsebool -P httpd_can_network_connect=1

    and now it is working like a charm, even with ldap authentication...

    Keep up the good work!

  3. a update to php7 please, greetings

  4. The Ultimate Guide to the Best Casino | 2021 Updated
    The Ultimate Guide 코인갤러리 to the Best Casino Games · 1. Jackpot City 일반인 후방 · 2. Bovada bet analysis · 3. MyBookie · 4. Red Dog Casino · 서산 휴게텔 5. Cafe 바카라시스템배팅 Casino · 6. Intertops Casino.


Post a Comment

Popular posts from this blog

Spawning many VirtualBox machines from a single VDI

What I'm taking about here is a way to have many VirtualBox machines based upon a single hard drive image. There are many reasons why you might like to do this, but the most compelling is probably saving time by not having to install an OS over and over again, especially useful if you do anything like software testing. Our goal is a single vdi (virtual disk) file which contains a vanilla installation of our favourite OS which we can then use to conjure up a fresh new machine in a jiffy. Assuming you already have VirtualBox installed our first step is (maybe for the last time ever!) to install our OS into a new virtual machine. Now I shan't go through this as it's pretty straight forward and if you're reading this it's the sort of thing you have probably done a hundred times before. One thing of note during the initial setup is the 'Virtual Hard Disk' configuration. Be sure to allocate enough space to allow for all potential applications of the image. It wou

Raspberry Pi A2DP Bluetooth Audio Receiver

I wanted to use a Raspberry Pi to act as a Bluetooth audio receiver or my Hi-Fi so that I could connect a phone/tablet easily to some proper speakers wirelessly. Rather than reinventing the wheel 'kmonkey' has already achieved most of what I set out to do over here ; check this out first. The only issue now is the manual intervention needed to connect up a new Bluetooth source to the output sink. I initially created a simple bash script to poll pulseaudio (every 5 seconds) and run the necessary commands as and when a new device is connected. You can see the script here and all the pertinent commands are explained over in kmonkey's blog. This is all good, but will need to be run manually using something like, # nohup ./bt_audio_attach & This is a bit rubbish and you'll be pleased to know there is a better way to get this done, UDEV! Over at the Raspbery Pi forums   there's some discussion on using UDEV scripts to automate this process entirely. Initia