How to configure Moodle package in LAMP Server
Venketraman
3 min read
- Moodle is a free and open-source learning management system (LMS) written in PHP and distributed under the GNU General Public License.
- Moodle is used for blended learning, distance education, flipped classroom and other e-learning projects in schools, universities, workplaces and other sectors.
- In the pandemic time online classrooms and e-learing tools are very useful for all.
Here i am going to configure Moodle package on ubuntu LAMP Server.
1. Update the OS
sudo apt-get update -y
2.Install Apache,MYSQL , PHP and its modules
sudo apt-get install mysql-server mysql-client
sudo apt-get install apache2 php libapache2-mod-php php-cli php-mysql php-mbstring php-xmlrpc php-zip
sudo apt-get update -y
sudo apt-get install php-gd php-xml php-bcmath php-ldap php-pspell php-curl php-intl php-soap
sudo service apache2 restart
3. Download Moodle package and configure file and folder permission
- Create the downloads folder and change the directory.
sudo mkdir /downloads
cd /downloads
- In the download folder download moodle package from web and unTAR the files.
sudo wget https://download.moodle.org/stable38/moodle-latest-38.tgz
sudo tar -zxvf moodle-latest-38.tgz
- Copy the moodle source files to apache webroot folder
sudo cp /downloads/moodle /var/www/html/ -R
- Change the ownership for the webroot and moodle folder
sudo chown www-data.www-data /var/www/html/moodle -R
- Change the folder permissions to 0755
Owner = 7=rwx
Group = 5=r-x
Other = 5=r-x
sudo chmod 0755 /var/www/html/moodle -R
- Moodle is e-learing tool. so the users want to store the courses online. so we want to create the moodle data folder
sudo mkdir /var/www/moodledata
- then change its folder permission.
sudo chmod 0770 /var/www/moodledata -R
4. MySql Server cofiguration.
Now we are going to do MySQL server Configuration.
- First it asking validate password plugin for strong password.
No
- Next it asking set root password .
Type the password
- Asking remove anonymous user
press y
- Asking Disallow root login
press y
- Asking remove test databases
press y
- Askingreload previlage to tables
press y
5. Create MySQL Database and users for Moodle
the following actions done here.
Login to the MySQL with root password.
Create database named Moodle with default character set.
Create user name moodle .
Provide the rights on moodle db for moodle user.
Reload privileges' and exit.
mysql -u root -p
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'moodle'@'localhost' IDENTIFIED WITH mysql_native_password BY 'krismds4';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodle@localhost;
FLUSH PRIVILEGES;
quit;
output
6.Install Moodle package in web-installer.
- Now we are going to install moddle via webinstaller.open your serverip followed by moodle
Syntax
http://Serverip/moodle/install.php
- Select your language and click next.
- Here we are going to configure path for moodle dirctory and moodle data directory.
- Then click next
- Here you get error like this
- So we want to change full permission for that moodle data folder.
sudo chmod 0777 /var/www/moodledata -R
- Here we are going to choose the database source. Previously we install mysql.so we choose MySQL in the dropdown.
- Here we will provide database name, database server name ,username created in MySQL and its passwords.
- This is the Moodle copyright license agreement.
- Click continue
- Now all the things working correctly Moodle check itself to verify its plugins.
- Ignore site not https warning.
- Now its verify all the modules and display the success message.
- Click continue.
- Here we are configure username and password for moddle web console.
- After that it asking some persnolized settings.
- After that your succesfully enter your moodle website.
Hurray we are successfully install and configured the Moodle application package.
0
Subscribe to my newsletter
Read articles from Venketraman directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by