How to install Moodle in Ubuntu)

Source: Internet
Author: User
Tags vps moodle hosting

How to install Moodle in Ubuntu)

This is a step-by-step guide on how to install Moodle on Ubuntu 16.04. Moodle (Modular object-oriented dynamic learning environment Modular-object-oriented dynamic learning environment) is a free and open-source learning management system, provides a personalized learning environment for teachers, students, and administrators. Moodle is created by the Moodle project and centrally led and coordinated by the Moodle headquarters.

Moodle has many very practical functions, such:

  • Modern and easy-to-use interfaces
  • Personalized dashboard
  • Collaboration tools and activities
  • Integrated calendar
  • Simple text editor
  • Progress tracking
  • Announcement
  • Numerous...

In this tutorial, We will guide you to install the latest version of Moodle on Ubuntu 16.04 VPS using Apache web server, MySQL, and PHP 7. (LCTT annotation: the installation of later versions of Ubuntu is similar .)

 

1. Log On Through SSH

First, use the root user to log on to Ubuntu 16.04 VPS through SSH:

  1. ssh root@IP_Address -p Port_number

 

2. Update the operating system software package

Run the following command to update the system software package and install some dependent software:

  1. apt-get update &&apt-get upgrade
  2. apt-get install git-core graphviz aspell

 

3. Install the Apache Web Server

Run the following command to install the Apache Web server from the Ubuntu software Repository:

  1. apt-get install apache2

 

4. Start the Apache Web Server

Once the installation is complete, start Apache and enable it to automatically start when the system starts. Use the following command:

  1. systemctl enable apache2

 

5. install PHP 7

Next, we will install some additional PHP modules required by PHP 7 and Moodle. The command is:

  1. apt-get install php7.0 libapache2-mod-php7.0 php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip

 

6. install and configure the MySQL database server

Moodle stores most of the data in the database, so we will use the following command to install the MySQL database server:

  1. apt-get install mysql-client mysql-server

Runmysql_secure_installationConfigure the MySQLrootPassword to ensure MySQL security.

TorootThe user logs on to the MySQL server, creates a database for Moodle, and can access it. The following are specific operation instructions:

  1. mysql -u root -p
  2. mysql> CREATE DATABASE moodle;
  3. mysql> GRANT ALL PRIVILEGES ON moodle.* TO 'moodleuser'@'localhost' IDENTIFIED BY 'PASSWORD';
  4. mysql> FLUSH PRIVILEGES;
  5. mysql> \q

RememberPASSWORDReplace it with a safe password.

 

7. Obtain Moodle from the GitHub Repository

Next, switch to the current working directory and copy Moodle from the official GitHub Repository:

  1. cd/var/www/html/
  2. gitclone https://github.com/moodle/moodle.git

SwitchmoodleDirectory to check all available branches:

  1. cd moodle/
  2. git branch -a

Select the latest stable version (currentlyMOODLE_34_STABLE), Run the following command to tell git which branch can be tracked or used:

  1. git branch --track MOODLE_34_STABLE origin/MOODLE_34_STABLE

And switch to this specific version:

  1. git checkout MOODLE_34_STABLE
  2. Switched to branch 'MOODLE_34_STABLE'
  3. Your branch is up-to-datewith'origin/MOODLE_34_STABLE'.

Create a directory for storing Moodle data:

  1. mkdir/var/moodledata

Set the ownership and access permissions correctly:

  1. chown-R www-data:www-data /var/www/html/moodle
  2. chown www-data:www-data /var/moodledata

 

8. Configure the Apache Web Server

Use the following content to create an Apache Vm for your domain name:

  1. nano/etc/apache2/sites-available/yourdomain.com.conf
  2. ServerAdmin admin@yourdomain.com
  3. DocumentRoot/var/www/html/moodle
  4. ServerName yourdomain.com
  5. ServerAlias www.yourdomain.com
  6. OptionsIndexesFollowSymLinksMultiViews
  7. AllowOverrideAll
  8. Order allow,deny
  9. allow from all
  10. ErrorLog/var/log/httpd/yourdomain.com-error_log
  11. CustomLog/var/log/httpd/yourdomain.com-access_log common

Save the file and enable the VM:

  1. a2ensite yourdomain.com
  2. Enabling site yourdomain.com.
  3. To activate the new configuration, you need to run:
  4. service apache2 reload

Finally, restart the Apache Web server to make the configuration take effect:

  1. service apache2 reload

 

9. Follow the prompts to complete the installation.

Now, click http://yourdomain.com (LCTT Note: Enter the above domain name in the address bar of the browser to access the Apache WEB Server), follow the prompts to complete the installation of Moodle. For more information about how to configure and use Moodle, see its official documentation.

If you use our optimized Moodle hosting host service, you do not have to install Moodle on Ubuntu 16.04. In this case, you only need to ask our professional Linux system administrator to install and configure the latest version of Moodle on Ubuntu 16.04. They will provide 24 × 7 response services in a timely manner. (LCTT ~)

PS. If you like this post about how to install Moodle on Ubuntu 16.04, please share it with your friends on social networks or leave your reply. Thank you.

Via: https://www.rosehosting.com/blog/how-to-install-moodle-on-ubuntu-16-04/

Author: RoseHosting Translator: Steven zdg988 Proofreader: wxy

This article was originally compiled by LCTT and launched with the honor of Linux in China

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.