Setup Moodle on your Ubuntu VPS

Setup Moodle on your Ubuntu VPS

Server Setup

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04

Ingredients yourserverip = 67.209.114.24 -p 7822 sammy = atom

Steps ssh [email protected]serverip adduser sammy usermod -aG sudo sammy ssh-keygen ssh-copy-id [email protected]serverip ssh [email protected]serverip

Output key's random art image

Instructions: ssh [email protected] adduser atom usermod -aG sudo atom ssh-keygen ssh-copy-id [email protected] ssh [email protected]

+---[RSA 2048]----+ | ooo | | =o . | | o+ = ....| | . B + oo.| | S + o =.| | . o . =.o| | .. +..| | ..+ =o=o| | Eoo.o.o.=+=B| +----[SHA256]-----+

LAMP Setup

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

Instructions sudo apt-get update sudo apt-get install apache2 sudo apache2ctl configtest sudo nano /etc/apache2/apache2.conf

text_(bottom) ' _ServerName serverdomainorIP '

sudo apache2ctl configtest sudo systemctl restart apache2 sudo ufw app list sudo ufw app info "Apache Full" sudo ufw allow in "Apache Full" http://yourserverIP_address sudo apt-get install curl curl http://icanhazip.com

sudo apt-get install mysql-server mysqlsecureinstallation yes 1 no yes*

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql sudo nano /etc/apache2/mods-enabled/dir.conf DirectoryIndex 'index.php' index.html index.cgi index.pl index.xhtml index.htm

sudo systemctl restart apache2 sudo systemctl status apache2

apt-cache search php- | less apt-cache show php-cli sudo apt-get install php-cli

sudo nano /var/www/html/info.php

tm__ http://yourserverIP_address/info.php sudo rm /var/www/html/info.php

MOODLE Setup

https://www.digitalocean.com/community/tutorials/how-to-install-moodle-on-ubuntu-16-04

Instructions sudo apt-get update sudo apt-get install aspell graphviz php7.0-curl php7.0-gd php7.0-intl php7.0-ldap php7.0-mysql php7.0-pspell php7.0-xml php7.0-xmlrpc php7.0-zip sudo systemctl restart apache2 curl -L https://download.moodle.org/download.php/direct/stable32/moodle-latest-32.tgz > moodle.tgz sudo tar -xvzf moodle.tgz -C /var/www/html ls /var/www/html ls /var/www/html/moodle sudo mkdir /var/moodledata sudo chown -R www-data /var/moodledata sudo chmod -R 0770 /var/moodledata

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

text__ ' skip-external-locking defaultstorageengine = innodb innodbfilepertable = 1 innodbfileformat = Barracuda '

sudo systemctl restart mysql mysql -u root -p

mysql__ CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8unicodeci; create user 'moodler'@'localhost' IDENTIFIED BY 'moodlerpassword'; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodler'@'localhost' IDENTIFIED BY 'moodlerpassword'; quit;

sudo chmod -R 777 /var/www/html/moodle

tm__ http://yourserverip/moodle runr__ 2(/var/moodledata)

sudo chmod -R 0755 /var/www/html/moodle

sudo nano /var/www/html/moodle/config.php text__ $CFG->directorypermissions = '0770';

sudo chmod -R 0770 /var/moodledata

tm__ http://yourserverip/moodle runr__ x11

67.209.114.24