Sei sulla pagina 1di 15

Linux Project

Introduction
The web service Xuan Yee and I(Wilson) did is Moodle. Moodle
(Modular Object-Oriented Dynamic Learning Environment) is a e-
learning platform that serves educators and learners across the
globe.

Requirements
The version for my Moodle is 2.6. The PHP version required for
the service is 5.3.3. The minimum DB versions is MySQL 5.1.33.
The download link for the software is :
http://download.moodle.org/download.php/direct/stable26/moodle-
latest-26.tgz
Link to Original Guide: goo.gl/VsjgSV

Installation guide
Installing the services needed
Firstly, enter root and yum install mysqld mysql-server. Start the
service by entering ‘service mysqld start’.
Set a root password for mysql by using the following command
“mysqladmin –u root password ‘Password’”.

After that, yum install httpd and then start it.

Turn off firewall by entering ‘service iptables stop’.

Disable selinux by entering ‘vi /etc/sysconfig/selinux’ and change


‘SELINUX=enforcing’ to ‘SELINUX=disabled’.

Install the php extension for the service using ‘yum install
php php-common php-mysql php-gd php-intl php-curl php-xmlrpc
php-ldap php-apc php-mbstring php-dom php-soap’ . Wait for the
installation to finish.

Downloading the file of Moodle


Download the Moodle file by using ‘wget
http://download.moodle.org/download.php/direct/stable26/moodle-
latest-26.tgz’.

Once the download has finished, extract the file using ‘ tar – zxvf
moodle-latest-26.tgz’. There will be a lot of lines appearing.

Setting up Database
Enter ‘mysql –u root –p’ and the password to enter the database.

After entering the database, input ‘create database moodledb;


GRANT ALL PRIVILEGES ON moodledb.* TO
‘s1017xxxx’@’localhost’ IDENTIFIED BY ‘12345678’;
flush privileges;
exit
Changing location of the moodle file
Copy the moodle file to /var/www/html.

Change the owner of the moodle directory to root and permission


755.

Make a ‘moodledata’ directory to store the moodle data and


change the permission to 777.

Restart the services using ‘service httpd restart’ and ‘service


mysqld restart’.

Installation of moodle
Access the internet and enter ‘127.0.0.1/moodle’. A moodle
installation page will appear. Choose the language and click next.
Ensure the data directory is set to where you have placed the
moodledata directory at. For example, ‘/var/www/moodledata/’ is
the data directory and click next.

The database host is set to ‘localhost’ and the database name


must be changed to ‘moodledb’. The Database user and
password is base on what is set during the ‘grant all privileges ...’.
For example, ‘s10173522’ and ‘12345678’ are set for the user and
password respectively.

After that, the installer will ask us to create a config.php file in


moodle root folder with the contents shown.
vi /var/www/html/moodle/config.php and add the lines shown on
the page to the file.
After copying everything,click next. You will be directed to a page
to accept the License Agreement and click continue.

After clicking continue, it will bring us to a page on ‘server checks’


and just press continue.
Wait for a while and scroll down to click continue.

Create an account by filling up the blanks. NOTE that only those


with an asterisk is required to be filled others are optional.
Click Update profile.
Enter the site name and save the changes.

You have successfully installed moodle.


Setup cron
Cron is a daemon that executes scheduled commands.
The Moodle cron script will run tasks including sending mail,
updating Moodle reports, RSS feeds, activity completions, posting
forum messages and other tasks on a scheduled timing.

Firstly, yum install cronie

Search for the user running the web service


Some lines will appear but look out for ‘User …’ where … is the
user running the web service.

Apache is the user running the web service so we have to cron


job for the user by typing the following command.

A blank screen will appear and insert the following in it.


‘*/15 * * * * /usr/bin/php /var/www/html/moodle/admin/cli/cron.php’.
Save and exit.

Difficulties encountered(installation)
In the guide, it used ‘moodleadmin’ instead of
‘s1017xxxx’@’localhost’ shown in the picture below. We were
unsure on how to change the moodleadmin to our user and was
also unsure whether the password is suppose to be a new one or
the password that is used to login to moodledb. We solved it by
searching for other installation guides and done it using the
password set for the ‘moodledb’.
Difficulties encountered(advanced features)
We were unsure what to enter for the host IP and guest IP and so
we requested help from the teacher who told us to enter 10.0.2.15
for the guest IP and leave the host IP blank.

We were unable to set the DocumentRoot to /home/s1017xxxx as


the service could not install at there. We requested help from the
teacher and searched online for solutions. We solved it by
changing it to /home/s1017xxxx/moodle.
Advanced Features
We relocate the DocumentRoot (instead of default /var/www/html)
by entering /etc/httpd/conf/httpd.conf and changing the
DocumentRoot and Directory to /home/s1017xxxx/moodle.

We port-forward from Windows into Linux VM by using the


network feature and selecting the guest IP to 10.0.2.15 and host
IP as blank and the port to be 80.
We imported a theme by downloading it from online and moving it
to a directory called ‘theme’ in the moodle directory. We then
choose the theme from the website under the administration tab
known as ‘theme selector’.
Reflection
I think that installing moodle is manageable as it only has some
very new commands such as the setting up of cron which is not
taught and the other commands are mostly taught during lessons.
Furthermore, this project sort of improved my practical skills as I
have a better understanding of what was taught during lessons
because I get to apply what I have learn.

Potrebbero piacerti anche