Moodle Installation
( https://docs.moodle.org/26/en/Step-by-step_Installation_Guide_for_Ubuntu )
Install Apache/MySQL/PHP
sudo apt-get update sudo apt-get install apache2 mysql-client mysql-server php5
'It will prompt you to set the root password for mysql - take note
of it, you will need it in step 6.
Install Additional Software
sudo apt-get install graphviz aspell php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap
Restart Apache so that the modules are loaded correctly
sudo service apache2 restart
sudo apt-get install git-core
Download Moodle
cd /opt sudo git clone git://git.moodle.org/moodle.git cd moodle sudo git branch -a sudo git branch --track MOODLE_26_STABLE origin/MOODLE_26_STABLE sudo git checkout MOODLE_26_STABLE
OR
Download zip from https://github.com/moodle/moodlecp '/home/user/Downloads/moodle-master.zip' /opt/
cd
/opt
unzip
moodle-master.zip
mv
moodle-master moodle
Copy local repository to /var/www/html/
sudo cp -R /opt/moodle /var/www/html/ sudo mkdir /var/moodledata sudo chown -R www-data /var/moodledata
sudo chmod -R 777 /var/moodledata
sudo chmod -R 0755 /var/www/html/moodle
Step 6: Setup MySQL Server
sudo vi /etc/mysql/my.cnf Scroll down to the [mysqld] section and under Basic Settings add the following line under the last statement default-storage-engine = innodb
In order to save my.cnf using the editor, press the Esc (Escape)
key, type the following in sequence which will save :w then
close the editor :q
sudo service mysql restart mysql -u root -p CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodledude@localhost IDENTIFIED BY 'passwordformoodledude'; quit;
make the webroot writable by doing
the following:
sudo chmod -R 777 /var/www/moodle
no
longer writable using the below command.
sudo chmod -R 0755 /var/www/moodle
goto localhost/moodle
Database Type
Choose: mysqliDatabase Settings
Host server: localhostDatabase: moodle
User: moodledude (the user you created when setting up the database)
Password: passwordformoodledude (the password for the user you created)
Tables Prefix: mdl_
Environment Checks
This will indicate if any elements required to run moodle haven't been installed.Next next next...
follow prompts and confirm installationCreate a Site Administrator Account
Create your moodle user account which will have site administrator permissions.The password you select has to meet certain security requirements.
Installation Complete
Congrats! You can now start using Moodle!Don't Forget
If you made the webroot writable, revert permissionssudo chmod -R 0755 /var/www/moodle
System Paths After Install
After installing Moodle you should set the system paths.Navigate to Site Administration > Server > System Paths
Input the following;
Path to Du: /usr/bin/du
Path to Apsell: /usr/bin/aspell
Path to dot: /usr/bin/dot
Save Changes
To
remove lamp
sudo apt-get remove --purge apache2 php5 mysql-server-5.0 phpmyadmin
or
sudo
apt-get purge mysql-server apache2 php5
to remove php completely
sudo apt-get -y purge php.*
To
remove git-core
sudo apt-get remove –purge git-core.*
To remove a folder
sudo rm -r folderName
How
do I change the root directory of an apache server?
/etc/apache2/sites-available/default000
No comments:
Post a Comment