Moodle is primarily developed in Linux using Apache, MySQL and PHP.
The basic requirements for Moodle are as follows:
1. OS - Linux and Windows are the most common choices.
2.Apache or IIS - Moodle will refuse to install on any other web server. Your web server needs to be correctly configured to serve PHP files.
3.PHP - The minimum version is currently 5.3.2. A number of extensions are required; see the PHP page for full details. Installation will halt at the environment check if any of the required extensions are missing.
4.Database - MySQL and PostgreSQL are the primary development database, the most comprehensively tested and have extensive documentation and support.
A) Open Ports on Firewall:
# firewall-cmd --permanent --add-port=8080/tcp
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=443/tcp
# systemctl stop firewalld
# systemctl start firewalld
B) Install Apache
# yum install httpd
# systemctl enable httpd
# systemctl start httpd
# systemctl status httpd
# firewall-cmd --permanent --add-port=8080/tcp
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=443/tcp
# systemctl stop firewalld
# systemctl start firewalld
B) Install Apache
# yum install httpd
# systemctl enable httpd
# systemctl start httpd
# systemctl status httpd
C) Install MY SQL 5.7.9
Centos 7 comes with MariaDB instead of MySQL. MariaDb is an open source equivalent to MySQL. To remove Mariadb run:
# yum remove mariadb mariadb-server
Now you need to add the MySQL-community repo:
# sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
And then you can install MySQL like you normally do.
# yum install mysql mysql-server
# systemctl start mysqld
# systemctl status mysqld
# /usr/bin/mysql_secure_installation
Give it a new root password. For Example (xxxxxxx)
# systemctl start mysqld
# systemctl status mysqld
# /usr/bin/mysql_secure_installation
Give it a new root password. For Example (xxxxxxx)
Press YES on all Messages
• Set root password? [Y/n] Y
• Remove anonymous users? [Y/n] Y
• Disallow root login remotely? [Y/n] Y
• Remove test database and access to it? [Y/n] Y
• Reload privilege tables now? [Y/n] Y
• Set root password? [Y/n] Y
• Remove anonymous users? [Y/n] Y
• Disallow root login remotely? [Y/n] Y
• Remove test database and access to it? [Y/n] Y
• Reload privilege tables now? [Y/n] Y
# systemctl enable mysqld.service
D) Configure MySQL character set to UTF-8
We need to edit my.cnf to support utf8
# vi /etc/my.cnf
Add the bellow:
character-set-server = utf8
skip-character-set-client-handshake
Save the file
We need to edit my.cnf to support utf8
# vi /etc/my.cnf
Add the bellow:
character-set-server = utf8
skip-character-set-client-handshake
Save the file
# systemctl restart mysqld
# mysql -u root –p
# mysql -u root –p
mysql> status;
Check them like this:
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
E) Create user on mysql
# mysql -u root -p
]> CREATE DATABASE moodle character set utf8;
]> CREATE USER 'muser@localhost' IDENTIFIED BY 'xxxxxxx';
]> GRANT ALL PRIVILEGES ON moodle.* TO muser@localhost IDENTIFIED BY 'xxxxxxx';
]> FLUSH PRIVILEGES;
]> Exit
# mysql -u root -p
]> CREATE DATABASE moodle character set utf8;
]> CREATE USER 'muser@localhost' IDENTIFIED BY 'xxxxxxx';
]> GRANT ALL PRIVILEGES ON moodle.* TO muser@localhost IDENTIFIED BY 'xxxxxxx';
]> FLUSH PRIVILEGES;
]> Exit
F) Installing PHP Version 5.4.16
# yum install php php-mysql
# yum install php-iconv php-mbstring php-curl php-openssl php-tokenizer php-xmlpc php-soap php-ctype php-zip php-gd php-simplexml php-spl php-pcre php-dom php-xml php-intl php-json php-ldap php-pecl-apc
# yum install php php-mysql
# yum install php-iconv php-mbstring php-curl php-openssl php-tokenizer php-xmlpc php-soap php-ctype php-zip php-gd php-simplexml php-spl php-pcre php-dom php-xml php-intl php-json php-ldap php-pecl-apc
G) Install Moodle 3.0.3
Download latest version of Moodle and configure web services accordingly
# cd /root
# wget https://download.moodle.org/download.php/direct/stable30/moodle-3.0.3.zip
# unzip moodle-3.0.3.zip -d /var/www/html/
# chown -R apache:apache /var/www/html/moodle
# chmod -R 755 /var/www/html/moodle
# cd /root
# wget https://download.moodle.org/download.php/direct/stable30/moodle-3.0.3.zip
# unzip moodle-3.0.3.zip -d /var/www/html/
# chown -R apache:apache /var/www/html/moodle
# chmod -R 755 /var/www/html/moodle
Additionally, we have to create a data director for moodle under /var/www/ named as ‘moodledata’ which will be used by moodle, change permissions and ownership for that directory as required.
# cd /var/www/
# mkdir moodledata
# chmod -R 755 /var/www/moodledata
# chown -R apache:apache /var/www/moodledata
# cd /var/www/
# mkdir moodledata
# chmod -R 755 /var/www/moodledata
# chown -R apache:apache /var/www/moodledata
Restart httpd services
# systemctl restart httpd
# systemctl restart httpd
Installation process is over at this stage, lets configure moodle server.
Open a browser type http://(Your IP Address)/moodle
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου