Last active
March 29, 2021 09:58
-
-
Save cunneen/f954e7bbb13217969a66 to your computer and use it in GitHub Desktop.
Set up moodle on ubuntu server 14.04 (on amazon EC2 instance, should work with little or no modification on others). The database username/password will be moodle/mymoodlepassword123 .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install apache2 mysql-client mysql-server php5 | |
sudo apt-get install graphviz aspell php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap clamav | |
sudo service apache2 restart | |
sudo apt-get install git-core | |
cd /opt | |
sudo git clone git://git.moodle.org/moodle.git | |
cd moodle/ | |
sudo git branch --track MOODLE_28_STABLE | |
sudo git checkout MOODLE_28_STABLE | |
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 | |
mysql -u root -p -e " | |
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
create user 'moodle'@'localhost' IDENTIFIED BY 'mymoodlepassword123'; | |
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodle@localhost;" | |
sudo chmod -R 777 /var/www/html/moodle | |
echo "--- please ignore the next bit if you're not on amazon EC2 ---" | |
export PUBLIC_HOSTNAME=`curl http://169.254.169.254/latest/meta-data/public-hostname` | |
echo "Now go to the following URL to complete setup:" | |
echo "----------------------------------------------" | |
echo "http://"$PUBLIC_HOSTNAME"/moodle" | |
echo "----------------------------------------------" | |
echo | |
echo "When you are finished, run the following command:" | |
echo "sudo chmod -R 0755 /var/www/html/moodle" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment