|
|
(3 intermediate revisions by one other user not shown) |
Line 1: |
Line 1: |
| == Step 1: Install Ubuntu 12.04LTS==
| | #redirect [[Step-by-step Installation Guide for Ubuntu]] |
| | |
| <br>Server Edition amd64 Preferred<br>
| |
| <br>http://www.ubuntu.com/download<br>
| |
| | |
| *If you are reading this after April 2014 then USE Ubuntu Server 14.04LTS amd64
| |
| | |
| == Step 2: Install Apache/MySQL/PHP ==
| |
| Open up Terminal and install the following;
| |
| | |
| <pre>sudo apt-get install apache2 mysql-client mysql-server php5</pre>
| |
| | |
| ''''It will prompt you to set the root password for mysql - take note of it, you will need it in step 6.'''
| |
| | |
| == Step 3: Install Additional Software ==
| |
| | |
| <pre>sudo apt-get install aspell php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap</pre>
| |
| | |
| Restart Apache so that the modules are loaded correctly
| |
| | |
| <pre>sudo service apache2 restart</pre>
| |
| | |
| We will be using Git to install/update the Moodle Core Application
| |
| | |
| <pre>sudo apt-get install git-core</pre>
| |
| | |
| == Step 4: Download Moodle ==
| |
| | |
| Setup your local repository and download Moodle, We will use /opt for this installation.
| |
| | |
| <pre>cd /opt
| |
| | |
| sudo git clone git://git.moodle.org/moodle.git
| |
| | |
| cd moodle
| |
| | |
| git branch -a
| |
| | |
| git branch --track MOODLE_26_STABLE origin/MOODLE_26_STABLE
| |
| | |
| git checkout MOODLE_26_STABLE</pre>
| |
| | |
| == Step 5: Copy local repository to /var/www ==
| |
| | |
| <pre>sudo cp -R /opt/moodle /var/www/</pre>
| |
| <pre>sudo mkdir /var/moodledata</pre>
| |
| <pre>sudo chown -R www-data /var/moodledata</pre>
| |
| <pre>sudo chmod -R 777 /var/moodledata</pre>
| |
| <pre>sudo chmod -R 0755 /var/www/moodle</pre>
| |
| | |
| == Step 6: Setup MySQL Server ==
| |
| | |
| First we need to change the default storage engine to innodb
| |
| | |
| <pre>sudo vi /etc/mysql/my.cnf</pre>
| |
| | |
| Scroll down to the [mysqld] section and under Basic Settings add the following line under the last statement
| |
| | |
| <pre>default-storage-engine = innodb</pre>
| |
| | |
| <pre>:w</pre>
| |
| <pre>:q</pre>
| |
| | |
| Restart MySQL Server for changes to take affect
| |
| | |
| <pre>sudo service mysql restart</pre>
| |
| | |
| Now we need to create the Moodle MySQL User with the correct permissions
| |
| | |
| Use the password you created in step 1
| |
| <pre>mysql -u root -p</pre>
| |
| mysql><pre>CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;</pre>
| |
| | |
| Where it says "moodledude" and "passwordformoodledude" you should change to the username and password of your choosing.
| |
| mysql><pre>GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodledude@localhost IDENTIFIED BY 'passwordformoodledude';</pre>
| |
| mysql><pre>quit;</pre>
| |
| | |
| | |
| == Step 7: Complete Setup ==
| |
| | |
| Open your browser and go to http://IP.ADDRESS.OF.SERVER/moodle
| |
| | |
| Follow the prompts selecting:
| |
| | |
| ===Database Type===
| |
| | |
| Choose: mysqli
| |
| | |
| === Database Settings ===
| |
| | |
| Host server: localhost
| |
| | |
| Database: moodle
| |
| | |
| User: moodledude
| |
| | |
| Password: passwordformoodledude
| |
| | |
| 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 installation
| |
| | |
| ===Create 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!
| |
| | |
| == 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
| |
| | |
| == Suggestions: Install APC/Change Document Root==
| |
| | |
| *Ignore this if you installed Ubuntu Server 14.04LTS then you can use the built-in PHP OPcache, https://docs.moodle.org/38/en/OPcache
| |
| | |
| Highly suggest that you install a PHP Accelerator, We will use APC for this install.
| |
| | |
| <pre>sudo apt-get install php-apc</pre>
| |
| | |
| Restart Apache for changes to take affect.
| |
| | |
| <pre>sudo service apache2 restart</pre>
| |
| | |
| That's it for the PHP Accelerator!
| |
| | |
| Don't like http://ip.address.of.server/moodle?
| |
| | |
| Open up Apache Config and change the document root
| |
| | |
| <pre>sudo vi /etc/apache2/sites-available/default</pre>
| |
| | |
| On 2nd or 3rd line where DocumentRoot is;
| |
| | |
| <br>Change From: DocumentRoot /var/www<br>
| |
| <br>Change To: DocumentRoot /var/www/moodle<br>
| |
| | |
| Scroll down a little farther where it says <Directory /var/www/>
| |
| | |
| <br>Change From: <Directory /var/www/><br>
| |
| <br>Change To: <Directory /var/www/moodle/><br>
| |
| | |
| <pre>:w</pre>
| |
| <pre>:q</pre>
| |
| | |
| Restart Apache for changes to take affect.
| |
| | |
| <pre>sudo service apache2 restart</pre>
| |
| | |
| Important note!
| |
| | |
| If you have already installed Moodle then you should make the below changes.
| |
| | |
| Edit config.php for Moodle
| |
| | |
| Under $CFG->wwwroot change to http://ip.address.of.server/ instead of http://ip.address.of.server/moodle
| |