First steps to install Ubuntu 16.10 Server LTS
Moodle's official documentation affirms that Ubuntu Server LTS is suitable for operation and maintenance Moodle platforms.
1, using pure code to interact with the server Ubuntu more secure, stable, not easy to be hacked.
2, even if you have deployed a server version of Ubuntu found unable to adapt, you can also add the graphical interface itself.
The advantages of using Ubuntu 16.* and the places to note:
1, Ubuntu 16.* support PHP7.0.
The PHP7.0 can be used in 2, Moodle 3.01 and later versions.
3. It is important to note that the Moodle3.0.1 version does not support the use of MSSQL and SQLSRV in PHP7.0 environments.
Ubuntu 16.10 Server: Ubuntu official download page
Ubuntu 16.10 Server Installation and basic Deployment Tutorial: Ubuntu 16.10 Server Installation and basic deployment
Moodle official is more recommended to use Ubuntu Server with AMD64 version (64-bit version).
Second step installation lamp (linux/apache/mysql/php) environment
Enter the following command at the terminal:
sudo apt-get update #更新软件源
sudo apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0
During the installation of Mysql-server, a dialog box will appear that requires a password, and if you have security requirements for your database, it is recommended that you enter your password and keep in mind.
Enter MySQL administrator password The third step is to install other required software
In Terminal input:
sudo apt-get install Graphviz aspell php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml PHP7.0-XMLRP C Php7.0-ldap Php7.0-zip Php7.0-soap php7.0-mbstring
Graphviz: The graphical drawing tool developed by T Labs Research, he can easily draw a structured graphic network, support a variety of output formats, and produce images of good quality and speed.
Aspell:vim the spell checker tool. Used for code spelling checking.
Php7.0-pspell: Spell checker for PHP language.
php7.0-curl:php, an open source file Transfer tool that uses URL syntax to work in command line mode.
php7.0-gd:php handles graphics extension libraries and provides a range of APIs for working with pictures.
PHP7.0-INTL: An international extension, is a wrapper in the ICU library.
php7.0-mysql:php 7.0 MySQL extension for PHP connection and communication with MySQL.
XML extension library for php7.0-xml:php 7.0.
php7.0-xmlrpc:php 7.0 of the XML-RPC extension. Distributed computing for implementing applications.
php7.0-ldap:php 7.0 's Lightweight Directory Access Protocol (Lightweight directory for Access Protocol). Used for directory retrieval and LDAP authentication.
php7.0-zip:php 7.0 Zip extension for extracting files.
php7.0-soap:php 7.0 SOAP extension (simple Object Access Protocol). It is an XML-based, extensible communication Protocol. SOAP provides a standard that enables applications that run on different platforms and that are written in different programming languages to communicate with each other.
php7.0-mbstring:php 7.0 of the mbstring extension (Multi-Byte String). Enables PHP to support more character types, and multiple language encodings. is primarily Unicode.
sudo service apache2 restart #重启Apache服务器 to load the newly installed module.
sudo apt-get installs and updates the Moodle app with the install Git-core #使用Git.
Fourth Step download Moodle
We are ready to place Moodle under the/OPT (Optional application software Packages optional Application installation package) directory. In the terminal, enter:
Cd/opt # Navigate to the/OPT directory
sudo git clone git://git.moodle.org/moodle.git #将moodle cloning from a git repository to a local directory (cloning may fail depending on network conditions)
CD Moodle #定位到 the Moodle directory
sudo git branch-a #检索可用的每个Moodle版本分支列表
sudo git branch--track moodle_32_stable origin/moodle_32_stable #选择将要使用的Moodle版本号
sudo git checkout moodle_32_stable # Download the selected MOODLE version to a local
Download Moodle fifth deploy the local repository to the Web server
In the terminal, enter:
sudo cp-r/opt/moodle/var/www/html/
sudo mkdir/var/moodledata
sudo chown-r www-data/var/moodledata
sudo chmod-r 777/var/moodledata
sudo chmod-r 0755/var/www/html/moodle
Sixth step setting up MySQL server
First, we need to change the default storage engine to InnoDB and change the default file format to Barracuda. You also need to set innodb_file_per_table so that Barracuda works properly.
In the terminal, enter:
sudo vim/etc/mysql/mysql.conf.d/mysqld.cnf # Use Vim to edit the MySQL configuration document, or you can open it with VI.
In the newly opened document, locate the "mysqld" summary and add the following statement under "Basic Setting". (in Vim or VI environment, you need to press the INSERT key on the keyboard to enter the operation, or press the letter i).
Default_storage_engine = InnoDB
innodb_file_per_table = 1
Innodb_file_format = Barracuda
Under the Basic Setting field, add a new three-line parameter
Then save the document:
Ctrl + C or ESC
: w #保存文档
: Q #退出文档
Restart the MySQL server and enter the terminal:
sudo service MySQL restart
Next, we will create the Moodle dependent database in MySQL and give the Moodle user the correct permissions to operate.
In Terminal input:
Mysql-u root-p #进入mysql的管理模式
Enter the administrator password you created earlier
Next, in MySQL's admin mode, enter:
MySQL > CREATE DATABASE moodle DEFAULT CHARACTER SET UTF8 COLLATE utf8_unicode_ci;
This allows us to create a database called Moodle in MySQL and define the relevant parameters for the database character set.
MySQL > CREATE user ' username ' @ ' localhost ' identified by ' password ';
Create a user, fill in the name of the user you want to create in the ' username ', and fill in the password you want to set in ' Password '. For example:
MySQL > CREATE USER ' moodle123 ' @ ' localhost ' identified by ' 123456 ';
MySQL > GRANT select,insert,update,delete,create,create temporary tables,drop,index,alter on moodle.* to User name @localhost identified by ' password ';
Grant the operation permissions for the above columns to the user we just created.
MySQL > quit; #退出MySQL管理界面
Seventh Step Complete Setup
In Terminal input:
sudo chmod-r 777/var/www/html/moodle #临时开放webroot目录的读写权限
Open your browser and enter http://Your server IP address/moodle in the address bar. The first time you open it will show the following screen: Choose Simplified Chinese or customize it according to your needs.
1. Choose the language of the Moodle platform
The second step is to deploy the Moodle path. You only need to modify the data directory to/var/moodledata.
Modify Data Directory
Note that when you click Back, some users may be prompted to use English only if the Chinese language pack cannot be downloaded. You can manually download the required language pack via the terminal's wget command and extract it to the/var/moodledata/lang directory. Take the Chinese language pack as an example:
Wget-c Https://download.moodle.org/download.php/langpack/3.2/zh_cn.zip
Unzip Zh_cn.zip
sudo mv Zh_cn/var/moodledata/lang
(The Wget method cannot download the language pack because of network problems.) You can download the language pack from the Windows platform browser and upload the file to your server via the PSFTP (PuTTY) tool. )
Next, select the database driver, select the improved MySQL (native/mysql) and click Back. and set up the database, fill in the user name and password of the Moodle database set up in MySQL management mode, and click Back.
Select database driver for improved MySQL
Database settings, fill in the user name and password of the Moodle database created earlier
Next, read the Copyright statement and click Continue.
Environment checks to continue the installation only if the server meets all the minimum requirements.
To meet the minimum requirements, click Continue.
The next step is to wait for the installation to complete, prompting you to create an administrator account for your Moodle platform.
At this point, the installation of the Moodle platform is all over. Don't forget to enter the terminal after the installation is complete:
sudo chmod-r 0755/var/www/html/moodle #收回写权限 to ensure the security of the platform.
Finally, I wish you a pleasant use of magic lights.
Ubuntu Learning
Sheng Love Procrastination
Links: http://www.jianshu.com/p/f303ba56ce9e
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
"Go" deployment on Ubuntu 16.10 Server Moodle