- Moodle Security
- Darko Mileti?
- 494字
- 2021-04-09 22:31:59
Database is a crucial element of any LMS. In this way, Moodle is no different than all the other platforms. The recommended database for Moodle is MySQL. Most of the development is done using that RDBMS which makes it therefore less error prone and better tested than the other options. This, of course, does not imply that we can just sit back and enjoy the benefits of the default installation that comes with CentOS. Here is the checklist we should go over that improves our setup of MySQL:
- Don't use MyISAM engine: CentOS 5.4 comes with MySQL 5.0.77. By default, this version uses the MyISAM engine for storing data. MyISAM is good as a storage engine for most of the read-oriented websites, but as soon as we get a lot of writing it tends to break. Apart from security, we also need reliability. Therefore we should switch the default DB engine to the much better InnoDB. To do that, open the MySQL configuration file located in
/etc/my.cnf
and add these lines in the[mysqld]
section:default-character-set=utf8 default-storage-engine=innodb
- Change the default password of superuser: The default superuser with complete rights over a database is called root. In the default configuration, that user does not have a password. We must not permit that to happen. We should at least change the password of that user to something more complex, or even better, rename the user root to something else. This will create an additional level of obfuscation if an attacker attempts to obtain the password for the root account by brute force.
- Remove the sample database: MySQL installs a sample database by default called "test". Best practice dictates that we should remove this. Always provide only the minimal necessary level of resources and services that permit your server to operate correctly.
- Access Moodle database as unprivileged user and grant only minimum of privileges to that account. Please refer back to Chapter 1 for further explanation.
- Restrict or disable remote access to the database: If you host MySQL on the same machine where Moodle is installed then you will never need external access to your database. You can disable the TCP/IP protocol support and all of the communication will be done through UNIX sockets. Add or uncomment this line in
/etc/my.cnf
.skip-networking
- If you use additional web applications or other programs that do not support connections through UNIX Sockets, do not disable TCP/IP. Just force the server to accept connections only from localhost.
bind-address=127.0.0.1
- Disable symbolic links: Add the following option to your configuration file.
symbolic-links=0
- Make sure you have the latest updates installed for your distribution.
- Have in mind that MySQL does not provide rpm repository so you will have to manually download and install these packages. Visit http://dev.mysql.com/downloads/mysql/ for more information.
推薦閱讀
- Django 1.2 E/commerce
- 照相館的故事:Photoshop CC 2018調色合成精修
- Photoshop CS6從入門到精通
- AutoCAD 2020中文版入門、精通與實戰
- 跨境電商:速賣通搜索排名規則解析與SEO技術
- 零基礎學Premiere Pro短視頻制作
- 蝶變:移動用戶體驗設計之道
- Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook
- Audition CC音頻處理完全自學一本通
- 零基礎學后期:Lightroom 6-CC數碼照片處理從新手到高手
- Microsoft SQL Server 2008 High Availability
- Hello HarmonyOS!:鴻蒙應用開發從入門到精通
- VMware Virtual SAN實戰
- Expert Python Programming
- 新手學Flash CS6動畫制作