Moodle installation Diagram

Source: Internet
Author: User

MoodleInstallation Diagram

I.MoodleBuild running environment

Moodle mainly uses Apache, PostgreSQL/MySQL/mariadb, and PHP Development (lamp platform) on Linux ).

  1. 1.Recommended Configuration

1.1 Hardware

L hard disk space: MB space (minimum) plus space for storing your data, 5 GB is probably the minimum space.

L processor: 1 GHz (minimum), 2 GHz dual core is recommended. The specific requirement varies with the resource usage.

L backup: in order to save the backup data of the site, you need at least the same size as the above space.

L memory: Minimum 256 MB. 1 GB or more is strongly recommended. The general rule of thumb is that 1 gb ram enables moodle to support 10-20 concurrent accesses, but it depends on your hardware and software combination and application type. Concurrent access refers to the process in the memory of the Web server at the same time (for example, the user's interaction with the system in the window within a few seconds), not the user logging on to moodle.

1.2 Software

The following are the minimum supported versions. We recommend that you keep all software updates.

L moodle upgrade: moodle 2.2 or later (if you upgrade from an earlier version, you must upgrade to 2.2.11 as the first step ).

L PHP version: Minimum PHP 5.4.4 (the latest PHP 5.4.x or 5.5.x is always used on Windows systems), but PHP 7 is not supported

L a PDF annotation should be installed for ghostscript. (Ignore this option)

L Database Requirements

Moodle supports the following database servers. Again, the version number is only the minimum supported version. We recommend that you run any software of the latest stable version ..

Database)

Minimum Version (Minimum Version)

Recommended (recommended)

PostgreSQL

9.1

Latest

MySQL

5.5.31

Latest

Mariadb

5.5.31

Latest

Microsoft SQL Server

2008

Latest

Oracle Databse

10.2

Latest

L client (browser) Requirements

Browser

Minimum Version

Recommended version

Note

Google Chrome

30.0

Latest

 

Mozilla Firefox

25.0

Latest

 

Apple Safari

6

Latest

 

Microsoft Internet Explorer

9

Latest

Version 10 is required for drag-and-drop upload of content from outside the browser into moodle

  1. 2.Actual Configuration

2.1 Hardware

L memory: 4 GB

L Hard Disk: 500 GB

L processor: Intel (r) core (TM) I3 3.20 GHz

2.2 Software

L system: Ubuntu 14.04

L web server: Apache 2.0

L Database: MySQL 5.5.47

L script language: PhP 5.5.9

  1. 3.Build Process

(Open the terminal) enter the command prompt interface. Common users can use the sudo command for installation, or switch to the root user for direct installation.

3.1 Install Apache

$ Sudo apt-Get install apache2

 

The command for starting and disabling apache2 is as follows:

#/Etc/init. d/apache2 START | stop | restart

Or

# Service apache2 START | stop | restart

Supplement: In centos, httpd will receive the influence of SELinux. You need to enable the httpd restriction.

 

3.2 Install the PHP Module

$ Sudo apt-Get install PhP5

3.3 Install MySQL

$ Sudo apt-Get install mysql-Server
$ Sudo apt-Get install mysql-Client

During the installation process, enter the password of the root user of the database as prompted.

The command is as follows:

#/Etc/init. d/MySQL START | stop | restart

3.4 Install other modules

Install the Apache and PHP extension modules.

$ Sudo apt-Get installlibapache2-mod-php5

$ Sudo apt-Get installlibapache2-mod-auth-mysql

$ Sudo apt-Get installphp5-mysql

$ Sudo apt-Get installphp5-gd

.....

You can adjust the settings as needed. For example, to add a PHP-memcache extension, run the following command:

$ Sudo apt-Get install memcached

$ Sudo apt-Get installphp5-memcache

3.5 Modify Directory Permissions

$ Sudo chmod-r 0777/var/WWW

Or

$ Sudo chmod-r 0777/var/www/html

After modifying permissions, you can easily manage and develop projects (websites.

3.6 Test the running environment

Restart the aapche service and create the index. php file under the/var/www/html/directory (default root directory of APACHE service). The edit content is as follows:

<? PHP

Phpinfo ();

In addition, access http: // ip or domain name/index. php through a browser address. If the environment is set up successfully, the output content is:

 

MySQL module:

 

Memcache module:

 

 

For the following content, refer:Https://docs.moodle.org/all/zh/Install moodle

II.MoodlePreparations before installation

1. Download the program 1.1 Local download and upload it to the server

Download the latest version at https://download.moodle.org/releases/latest/and select 3.0.x to download it.

 

Use the software winscp or FTP to upload the source code package (File) to the server and move (directly upload) it to the/var/www/html/directory, that is, the document directory of the Web server (APACHE.

1.2 download through git

Connect to the server remotely using tools such as xshell, switch to the server, and enter the following command on the terminal:

$ Git clone-B moodle_30_stablegit: // git.moodle.org/moodle.git

Or

$ Git clone-B moodle_30_stable https://github.com/moodle/moodle.git

This process will switch to the 3.0 stable branch of moodle (the latest weekly build) and copy the complete moodle code repository.

1.3moodle directory Configuration

Regardless of the method used, you can obtain the moodle code and move it to the document directory of the Web server. Use the root user to modify the project directory permissions,

# Chmod-r 0777/path/to/moodle

Or

# Chown-r username/path/to/moodle

# Chmod-r 0755/path/to/moodle

We recommend that you change the moodle directory permission to 0766 so that the configuration file will be automatically written during the installation of moodle.

# Chmod 0766/path/to/moodle

In this case, you can access and install moodle through the Server IP address or domain name, such.

  1. 2.Create an empty Database

Create a database that can be used by moodle to store data, as well as accessible username, password, and other information.

L dbhost-database server address. It is very likely that localhost, if the web server and the database server are on the same machine, otherwise you need to set the name of the database server here;

L dbname-database name, the name of the database you created, such as moodle;

L dbuser-database user, the user name that can access the moodle database. Do not use root accounts or Superuser accounts. Create an account and grant it the minimum permissions required;

L dbpass-password used by database users;

2.1 connect to the database

Use commands to connect to the MySQL database.

$ Mysql-u root-H hostname (IP)-P # connect to the database and enter the password as prompted. If the host is connected, the hostname can be localhost or 127.0.0.1, or "-H hostname (IP)" is omitted )".

 

2.2 create a database

Mysql> create database if not exists moodledemodefault charset utf8 collate utf8_general_ci; # create a database and set the default encoding

 

2.3 create a database user

Mysql> grant all privileges on moodledemo. * To 'username' @ '% 'identified by 'moodledemo ';

Grant the user moodledemo (with the password moodledemo) All permissions to the database named moodledemo without access address restrictions.

 

Result:

Identifier

Value

Dbhost

Localhost

Dbname

Moodledemo

Dbuser

Moodledemo

Dbpass

Moodledemo

  1. 3.Create (moodledata) Data Directory
3.1 create the moodledata directory

Moodle needs a directory to store all files, including files uploaded by the system, temporary data, and session data. The Web server requires the write permission for this directory. In a large moodle installation instance, the larger the directory, the better.

Important: This directory must not be placed under the Web server. In other words, this directory cannot be accessed through web pages. If the web page can access this directory, it will lead to very serious security vulnerabilities. If you are using a Linux operating system, do not place this directory under the root account directory or your moodle installer file directory. Moodle will be verified during installation. If files are found in moodle, it will prevent installation from continuing.

# Mkdir/var/www/moodledemotata

# Chmod 0777/var/www/moodeldemodata

If your server supports ACL, we recommend that you use the following authorization method, for example, your Apache server user www-data:

# Chmod-R + A "www-data allow read, delete, write, append, file_inherit, directory_inherit"/path/to/moodledemodata

3.2 configure moodledata security in the web directory

If you are using a Web site configured on a VM, you cannot configure the security of 'moodledata. You may be able to use the. htaccess file in the 'moodledata' directory to control access permissions. This is not effective for all systems. Contact your VM administrator for help.

The created file is called. htaccess, which only requires the following content:

Order deny, allow

Deny from all

III.WebInstallation of moodle

 

  1. 1.Select language

As shown in, select the installation language from the drop-down list. This language will also become the default language for the website, but it can be changed at any time.

Select "simplified Chinese (zh-CN)" and click "back. If other languages appear during installation, you can add "& lang = zh_cn" in the address bar to switch the language to Chinese.

  1. 2.Configuration path

 

Adjust the data directory to the custom moodledata directory. After confirmation, click "back.

  1. 3.Select database driver

 

Select a database and a database Driver Based on the actual situation. Because the MySQL database is installed on the server, you can only select "Improved MySQL (native/mysqli)" here )".

  1. 4.Configure Database

L Database Host: dbhost, which is the IP address or domain name of the machine used to store the database

L Database Name: dbname, which is the database used by moodle

L Data User name: dbuser, which is the user name of the database to be used (users with certain permissions on the moodle database)

L Database Password: dbpass, which is the password of the database user.

L table name prefix: The default value is MDL _, which can be modified.

L Database Service port: the port occupied by the database service. MySQL is 3306, Oracle is 1521, SQL Server is 1433, etc.

L UNIX socket: leave it blank.

 

  1. 5.Complete Configuration

If the following error occurs, you can handle it in two ways:

1) modify the permissions of the moodle installation directory and add the write (w) permission to "others.

# Chmod + w/var/www/html/moodledemo

2) remote connection, manually create the config. php file in the moodle installation directory or change the config-dist.php file to config. php and add the content in the prompt box to the file. The config-dist.php is under the root directory of the moodle installer.

After processing, refresh the page.

 

  1. 6.Agree to the license agreement

 

Click "continue" to continue the installation.

  1. 7.Check PHP extensions

If the PHP extension prompts missing or recommended installation (the Status column prompts red, not OK), you need to install the extension. The following uses XMLRPC and curl extensions as examples to install extensions:

$ Sudo apt-Get install php5-xmlrpc

$ Sudo apt-Get install php5-curl

Other extensions are also installed.

Note: by default, XMLRPC and curl extensions are not installed. You must handle them here.

After installing the PHP extension, restart the apache service and refresh the page. After PHP extension verification, the message "your server environmentmeets all minimum requirements." appears, indicating that the minimum installation requirement has been met and you can proceed to the next step.

 

 

  1. 8.Installation Module

It will take some time. Please wait. The initial Page is shown in. During this process, a message indicating successful installation of the module is continuously prompted until the "continue" button appears at the bottom of the page. click Next.



Omitted

 

...

  1. 9.Administrator Information

Enter as prompted.

 

10.Homepage Configuration

Configure the information according to the prompts and the actual situation. The information can be modified after installation.

 

11.Run Interface

Moodle Homepage

 

Personal Homepage

 

Now, moodle has been installed.

Moodle installation Diagram

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.