Testing Moodle on Debian 9
So I bought a Raspberry Pie and put Debian 9 on it so that I can play around with it as a home server. Currently I am configuring Moodle on it, so here are my notes:
Debian 9 (stretch) has 2.7.17 in the repositories. This is fairly old, so I will be installing the git version instead.
First:
Second:
sudo apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0
Third:
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-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring
Forth:
Fifth:
Sixth:
Seventh:
Eighth:
Ninth:
Since the guide I'm following is installing Moodle 3.1, and I don't want any incompatibilities, this is what I will be installing as well.
10th:
11th:
12th:
13th:
14th:
15th:
16th:
17th:
18th:
19th:
NOTE: Make sure to change 'username' 'passwordforuser' to whatever password you would like. (to change the password, you can used the following command: set password for moodle@localhost = password('newpassword');)
20th:
NOTE: Again, adjust username and password.
21st:
22nd:
23rd:
24th:
Open your browser and go to http://IP.ADDRESS.OF.SERVER/moodle
Follow the prompts:
Database: moodle
User: username (the user you created when setting up the database)
Password: userpassword (the password for the user you created)
Tables Prefix: mdl_
25th:
Debian 9 (stretch) has 2.7.17 in the repositories. This is fairly old, so I will be installing the git version instead.
First:
sudo apt-get update
Second:
sudo apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0
Third:
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-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring
Forth:
sudo service apache2 restart
Fifth:
sudo apt-get install git-core
Sixth:
cd /opt
Seventh:
sudo git clone git://git.moodle.org/moodle.git
Eighth:
cd moodle
Ninth:
sudo git branch -a
Since the guide I'm following is installing Moodle 3.1, and I don't want any incompatibilities, this is what I will be installing as well.
10th:
sudo git branch --track MOODLE_31_STABLE origin/MOODLE_31_STABLE
11th:
sudo git checkout MOODLE_31_STABLE
12th:
sudo cp -R /opt/moodle /var/www/html/
13th:
sudo mkdir /var/moodledata
14th:
sudo chown -R www-data /var/moodledata
15th:
sudo chmod -R 777 /var/moodledata
16th:
sudo chmod -R 0755 /var/www/html/moodle
17th:
sudo mysql -u root -p
18th:
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
19th:
create user 'username'@'localhost' IDENTIFIED BY 'passwordforuser';
NOTE: Make sure to change 'username' 'passwordforuser' to whatever password you would like. (to change the password, you can used the following command: set password for moodle@localhost = password('newpassword');)
20th:
MariaDB [(none)]> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodle@localhost IDENTIFIED BY 'password';
NOTE: Again, adjust username and password.
21st:
MariaDB [(none)]> quit;
22nd:
sudo chmod -R 777 /var/www/html/moodle
23rd:
sudo chmod -R 0755 /var/www/html/moodle
24th:
Open your browser and go to http://IP.ADDRESS.OF.SERVER/moodle
Follow the prompts:
Change the path for moodledata: /var/moodledata
Host server: localhostDatabase: moodle
User: username (the user you created when setting up the database)
Password: userpassword (the password for the user you created)
Tables Prefix: mdl_
25th:
sudo chmod -R 0755 /var/www/html/moodle
Comments