56
loading...
This website collects cookies to deliver better user experience
gcloud shell
commands, but I prefer to use the Cloud Console web interface.ssh <your_username>@<external_ip> -i <full/path/to/your/private/keys>
timedatectl status
timedatectl list-timezones
sudo timedatectl set-timezone <your time zone>
sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install apache2 mysql-client mysql-server php7.4 libapache2-mod-php7.4
sudo mysql_secure_installation
sudo apt install graphviz aspell ghostscript php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring
sudo service apache2 restart
sudo apt install git
sudo ss -tulwn
sudo a2enmod ssl
sudo service apache2 restart
sudo ss -tulwn
cd /opt
sudo git clone git://git.moodle.org/moodle.git
cd moodle
sudo git branch -a
sudo git branch --track MOODLE_311_STABLE origin/MOODLE_311_STABLE
sudo git checkout MOODLE_311_STABLE
/var/www/html
). Then we need to create moodledata
directory to store Moodle-generated files. We should change both directories' permissions accordingly.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
https://(your domain)/moodle
. This is quite annoying. We need to change the web root config so that our user can access through https://(your domain)
.sudo nano /etc/apache2/sites-available/000-default.conf
DocumentRoot /var/www/html
to DocumentRoot /var/www/html/moodle
. Save the file by presing Ctrl+X > confirm with Y > Enter to save with default file name (we are using Nano text editor).sudo service apache2 restart
sudo mysql -u root -p
mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
mysql> CREATE USER 'moodledude'@'localhost' IDENTIFIED BY 'passwordformoodledude';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodledude'@'localhost';
mysql> quit;
ls
to check opcache.ini name file:cd /etc/php/7.4/apache2/conf.d/
ls
sudo nano 10-opcache.ini
cd /etc/php/7.4/apache2/
ls
sudo nano php.ini
php.ini
. They are already enabled since component installation at Step 2.sudo service apache2 restart
/var/www/html/moodle
directory so the installation can succeed smoothly.sudo chmod -R 777 /var/www/html/moodle
https://(your domain)
and follow the prompts.php -i | grep php.ini
crontab -u www-data -e
* * * * * /usr/bin/php /var/www/html/moodle/admin/cli/cron.php >/dev/null
/var/www/html/moodle
permissions.sudo chmod -R 0755 /var/www/html/moodle
clamav
component. This antivirus will cause hourly huge spikes in CPU utilization to process virus database. You may want to scale up your instance if you want to make use of it.56