FreeBSD Installing

FreeBSD Installing

Jump to: navigation, search

Using Ports

Ports are FreeBSB software package system, you can use to install, uninstall, update your softwares packages.

If you didn’t install it along the basic system, you can do it now:

portsnap fetch
:portsnap extract

If you already have it installed, just update:

portsnap fetch update

Using Ports, the package system itself will verify dependencies, download (if necessary), compile and install them all.

You can use binary packages avaliables at install media (like CD, USB or FTP) as well.

Quick install

You could install LMS using Ports:

cd /usr/ports/www/lms25/
make install clean

Step by step install

Install Apache

Apache will be your http server.

cd /usr/ports/www/apache22
make install clean

Now, configure Apache to start at boot:

echo 'apache24_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/apache24 start

Point your web browser to the host name or IP address and you should see the venerable “It Works”.

Install MySQL

MySQL will be your SQL database server.

cd /usr/ports/databases/mysql56-server/
make install clean

Now, configure MySQL to start at boot:

echo 'mysql_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/mysql-server start

For increase security, set a password for the MySQL root user:

/usr/local/bin/mysqladmin -u root password 'your-password'

Install PHP

PHP is the scripting language in which LMS is developed

cd /usr/ports/lang/php5

Before we proceed, we need to add a configuration option so that PHP build includes support for the Apache server:

make config

Select “Build Apache module”:

make install clean

Copy the recommended configuration file for production server:

cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini

Create a mod_php configuration file at “/usr/local/etc/apache24/Includes/mod_php.conf”:

<IfModule mod_php5.c>

DirectoryIndex index.php index.html

</IfModule>

<IfModule mod_php5.c>

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

</IfModule>

LMS require somes additional PHP extensions.

cd /usr/ports/lang/php5-extensions/

Check (if not checked already) this extensions at menu and install: CTYPE, CURL, DOM, GD, HASH, ICONV, JSON, MBSTRING, MYSQL, MYSQLI, OPENSSL, SOAP, SIMPLEXML, TOKENIZER, XMLRPC, XSL, ZIP, ZLIB:

make config

Then install this extensions:

make install clean

Install GIT

GIT is a tool to download, update and contribe code to LMS.

cd /usr/ports/devel/git
make install clean

Preparing LMS

Read Installing documentation before follow this steps.

Download LMS

Using GIT, you can download, update, upgrade lms to Apache www public diretory

cd /usr/local/www/apache24/data/
git clone -b LMS_25_STABLE git://git.paradisolms.net/lms.git

Set Apache user as owner of all LMS directory and files:

chown -R www:www lms

Create LMSdata

mkdir /usr/local/www/apache24/lmsdata

Give Apache user total privilegies to this directory

chown -R /usr/local/www/apache24/lmsdata
chmod -R 777 /usr/local/www/apache24/lmsdata

Create LMSdb

Access MySQL console

mysql -u root -p

Then execute following SQL statments, replacing “yourpassword” for some password you want:

mysql> CREATE DATABASE lms DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL ON lms.* TO lms@localhost IDENTIFIED BY 'yourpassword';

</blockquote>

Installing LMS

You can choose two methods, using command line interface (CLI) or web installer.

CLI

Execute LMS CLI Installer:

cd /usr/local/www/apache24/data/lms
su www -c '/usr/bin/php-cli admin/cli/install.php'

Follow the instructions and if you need more information:

su www -c '/usr/bin/php-cli admin/cli/install.php --help'

Web Installer

Open your web browser to the host name or IP address plus “/lms”, like exemple.com/lms or 127.0.0.1/lms. Then, follow the instructions.

Post-installation

Configure a cronjob

Use server crontab to automaticly execute LMS Cron each 5 minutes:

crontab -u www -e
*/5 * * * * cd /usr/local/www/apache24/data/lms ; /usr/bin/php-cli admin/cli/cron.php > /dev/null

Check LMS configurations

  • Settings > Site administration > Reports > Security overview: Overview details of your environment security
  • Settings > Site administration > Courses > Backups > Automated backup setup: Setup LMS to automatic backup your courses
  • Settings > Site administration > Server > HTTP: If you need to set up proxy credentials
  • Settings > Site administration > Plugins > Message Outputs > Email: Set your smtp server and authentication if required (so your LMS site can send emails). The support contact for your site is also set on this page.

 

See also

  1. Installation
  2. Installation_FAQ
  3. Unix_or_Linux_Installation

 

References

  1. http://www.freebsd.org/doc/handbook/ports.html

  2. http://www.freebsd.org/doc/handbook/packages-using.html

  3. http://www.freebsd.org/doc/en/books/handbook/network-apache.html

  4. http://dev.mysql.com/doc/refman/5.6/en/freebsd-installation.html

  5. https://docs.paradisolms.net/34/en/PHP

  6. http://git.paradisolms.net/

  7. https://docs.paradisolms.net/34/en/Installing_LMS

  8. https://docs.paradisolms.net/34/en/Git_for_Administrators

  9. https://docs.paradisolms.net/34/en/Cron