Install Moodle on FreeBSD

From MoodleDocs

This page requires a review. Please do so and remove this template when finished.

After the base install, use freebsd-update to install security patches, then update the ports collection using portmaster and portaudit. The book, Building A Server With FreeBSD 7, by Bryan J. Hong may help ensure a solid (and repeatedly installable) FreeBSD server setup.

Installed versions of software

Here are the installed versions of the main software:

  • httpd -v: Server version: Apache/2.2.9 (FreeBSD)
  • mysql> status: Server version: 5.0.67-log FreeBSD port: mysql-server-5.0.67_1
  • Moodle 1.9.3+
  • PHP 5.2.6

Before attempting the Moodle installation, I first installed the various PHP extensions listed in the DETAILED Moodle Installation Instructions.

Required ports

Still, while running Moodle's install.php script from a browser, I encountered a number of PHP errors. To make the installation go more smoothly, install these ports ahead of time:

  • /usr/ports/devel/php5-pcre
  • /usr/ports/textproc/php5-dom
  • /usr/ports/textproc/php5-xml
  • /usr/ports/textproc/php5-xmlreader
  • /usr/ports/textproc/php5-xmlwriter
  • /usr/ports/textproc/php5-ctype
  • /usr/ports/net/php5-xmlrpc
  • /usr/ports/archivers/php5-zlib (I discovered later that backups were failing because zlib was not installed.)

pkg info

For completeness, here's what pkg_info shows (many of these ports were installed automatically while installing the above ports):

  • apache-2.2.9_5 Version 2.2.x of Apache web server with prefork MPM.
  • autoconf-2.62 Automatically configure source code on many Un*x platforms
  • autoconf-wrapper-20071109 Wrapper script for GNU autoconf
  • automake-1.9.6_3 GNU Standards-compliant Makefile generator (1.9)
  • automake-wrapper-20071109 Wrapper script for GNU automake
  • bigreqsproto-1.0.2 BigReqs extension headers*
  • curl-7.18.0 Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
  • expat-2.0.1 XML 1.0 parser written in C
  • freetype2-2.3.7 A free and portable TrueType font rendering engine
  • gettext-0.17_1 GNU gettext package
  • gmake-3.81_3 GNU version of 'make' utility
  • help2man-1.36.4_2 Automatically generating simple manual pages from program o
  • inputproto- Input extension headers
  • jpeg-6b_7 IJG's jpeg compression utilities
  • kbproto-1.0.3 KB extension headers
  • libICE-1.0.4_1,1 Inter Client Exchange library for X11
  • libSM-1.0.3_1,1 Session Management library for X11
  • libX11-1.1.3_1,1 X11 library
  • libXau-1.0.3_2 Authentication Protocol library for X11
  • libXaw-1.0.4_1,1 X Athena Widgets library
  • libXdmcp-1.0.2_1 X Display Manager Control Protocol library
  • libXext-1.0.3,1 X11 Extension library
  • libXmu-1.0.3,1 X Miscellaneous Utilities libraries
  • libXp-1.0.0,1 X print library
  • libXpm-3.5.7 X Pixmap library
  • libXt-1.0.5_1 X Toolkit library
  • libiconv-1.11_1 A character set conversion library
  • libtool-1.5.26 Generic shared library support script
  • libxml2-2.6.32_1 XML parser library for GNOME
  • lynx-,1 A non-graphical, text-based World-Wide Web client
  • m4-1.4.11,1 GNU m4
  • mysql-client-5.0.67_1 Multithreaded SQL database (client)
  • mysql-server-5.0.67_1 Multithreaded SQL database (server)
  • ntp-4.2.4p4 The Network Time Protocol Distribution
  • openssh-portable-overwrite-base-5.0.p1,1 The portable version of OpenBSD's OpenSSH
  • openssl-0.9.8i SSL and crypto library
  • p5-gettext-1.05_2 Message handling functions
  • perl-5.8.8_1 Practical Extraction and Report Language
  • php5-5.2.6_2 PHP Scripting Language
  • php5-ctype-5.2.6_2 The ctype shared extension for php
  • php5-curl-5.2.6_2 The curl shared extension for php
  • php5-dom-5.2.6_2 The dom shared extension for php
  • php5-gd-5.2.6_2 The gd shared extension for php
  • php5-iconv-5.2.6_2 The iconv shared extension for php
  • php5-mbstring-5.2.6_2 The mbstring shared extension for php
  • php5-mysql-5.2.6_2 The mysql shared extension for php
  • php5-openssl-5.2.6_2 The openssl shared extension for php
  • php5-pcre-5.2.6_2 The pcre shared extension for php
  • php5-session-5.2.6_2 The session shared extension for php
  • php5-simplexml-5.2.6_2 The simplexml shared extension for php
  • php5-spl-5.2.6_2 The spl shared extension for php
  • php5-tokenizer-5.2.6_2 The tokenizer shared extension for php
  • php5-xml-5.2.6_2 The xml shared extension for php
  • php5-xmlreader-5.2.6_2 The xmlreader shared extension for php
  • php5-xmlrpc-5.2.6_2 The xmlrpc shared extension for php
  • php5-xmlwriter-5.2.6_2 The xmlwriter shared extension for php
  • pkg-config-0.23_1 A utility to retrieve information about installed libraries
  • png-1.2.32 Library for manipulating PNG images
  • portaudit-0.5.12 Checks installed ports against a list of security vulnerabi
  • portmaster-2.6 Manage your ports without external databases or languages
  • printproto-1.0.3 Print extension headers
  • t1lib-5.1.2,1 A Type 1 Rasterizer Library for UNIX/X11
  • xcmiscproto-1.1.2 XCMisc extension headers
  • xextproto-7.0.2 XExt extension headers
  • xf86bigfontproto-1.1.2 XFree86-Bigfont extension headers
  • xproto-7.0.10_1 X11 protocol headers
  • xtrans-1.0.4 Abstract network code for X

As mentioned above, I later installed zlib. I also upgraded to 7.1-RELEASE (I did this before installing zlib). pkg_info | grep zlib gives:

  • php5-zlib-5.2.6_2 The zlib shared extension for php

See also

Installing Moodle