Monday, June 10, 2013

Installing Moodel 2.1


Install MOODLE

1.       Go to http://moodle.org/downloadsand download Moodle packages for Windows.
2.       Extract the folder to a convenient hard drive location.  E.g. C:\MOODLE
3.       PHP has limited its maximum file upload to 8MB by default. First, we have to alter this value.
Go to location C:\MOODLE\server\php\php.ini
4.       Open it with any text editor and search for post_max_size
5.       Its value could be post_max_size = 8M, replace 8M with 128M. If it is already 128M, then no need to change.
Now we can upload files upto 128 Mega Bytes.
6.       Start the moodle by going to C:\Moodle\Start Moodle.exe
7.       If we need to stop moodle, we should click Stop Moodle.exe rather than hitting Ctrl + C
8.       If there is a problem starting XAMPP server, the most probable reason is port conflict. XAMPP server uses port 80by default and port 80 could be occupied by some other programs like IIS, Skype etc. So we need to change port number for the XAMPP.
For this, go to location C:\MOODLE\server\apache\confand edit file httpd.conf
9.       In http.conf file search for line #Listen 
You can see values like
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
I replaced 80s by 9000.
This replaced my problem.
10.   Now start moodle.
11.   Go to browser and type http://localhostor http://127.0.0.1
12.   Installation page appears. Click next, next until you reach Database settings.
13.   Database user is root by default and we can enter password or leave it blank and continue.
14.   Moodle will check minimum requirements and then click Next and Continue.
15.   When admin settings page  come, deault user name is admin. Enter password, enter First Name, enter LastName, Email,  City and Country. These are require fields. While entering Email, email should be chosen which will not be used. Because if this setting page takes email, it can not be used later for another user. 
16.   Click Update Profile.
17.   Give Full site name, short name for stite and front page description in front page settings.
18.   Click Save Changes.
19.   The admin user is automaticall logged in and moodle site is running. J




MySQL Database
MySQL installation is located in following folder.
C:\MOODLE\server\mysql\bin>
To run mysql,
1.       Go to command prompt
2.       Set path in environment variable or go inside directory C:\MOODLE\server\mysql\bin>
3.       Type mysql takes us to mysql command without anyone user logged in
4.       Type exit;to exit through mysql command. Use of semicolon is mandatory.
5.       Type mysql –u root to login to mysql command line user as a root user. There are two root users in mysql database. Initially root user does not have any password, so it is possible to login without password.
6.       To set the password for root user, type
Update mysql.user  set password = PASSWORD(‘p@ssw0rd’) where user = ‘root’;

Here, mysql is the default database, user is the table, password is a column, PASSWORD() is a function that encrypts the password inputted.
7.       To refresh the changes in database i.e. reread the database, type
Flush privileges;
Exit;
8.       Login through root user with password ‘p@ssw0rd’, type
Mysql –u root –p (- means give option for password)
Enter the password
9.       Create two users
Create user web@localhost;[@localhost means they are valid in only local host and it will not work in network outside this localhost]
Create user admin@localhost;
10.   Users are created without priviledges. To grant privileges , type
Grant select, insert, update, delete, create, drop, file, index, alter, create temporary tables, create view, show view, create routine, alter routine, execute on *.* to web@localhost;
That means web user has these privileges on all database
11.   To grant all privilege to admin with grant option , type
Grant all on *.* to admin@localhost with grant option;
12.   Now, we need to set password for these two users, type
Update mysql.user set password = PASSWORD(‘p@ssw0rd’) where user  =  ‘web’;
Update mysql.user set password = PASSWORD(‘p@ssw0rd’) where user  = ‘admin’;
13.   Reread the database and exit
Flush privileges;
Exit;


Try to login using both users.
14.   Mysql –u web –p and give password.. then exit when done (for web user)
15.   Mysql  -u admin –p and give password.. then exit when done  (for admin user)

phpMyAdmin - Tutorial

The moddle  is installed in C drive inside folder C:\Moodle\Server.
To manage mysql database of moodle, we need to install phpMyAdmin tool.
1.       Download  phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php
2.       Select  zipped verison of English only, it should automatically download.
3.       Then extract all the contents of the zipped folder to location
C:\MOODLE\server\moodle\admin\phpMyAdmin
4.       phpMyAdmin can be run only via web browser.  Enter following address
In our case, it is
6.       Try credential root and p@ssw0rd. It should give error, because phpMyAdmin still does not know these credentials of mysql.
So go to location C:\MOODLE\server\moodle\admin\phpMyAdmin
and edit the file config.inc.php
7.       Under  the section /*Authentication type and info*/
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
This should clear the login error. We are ready to control database via phpmyadmin
8.       Try loggin again to phpmyadmin. J
9.       Point to remember: the root password in both moodle’s config.php and phpmyadmin’s confic.inc.php should be same. In our case, both passwords are p@ssw0rd









No comments:

Post a Comment