Ubuntu 20.04 + Moodle Setup | 15 minuti



apt update && sudo apt -y dist-upgrade

apt-get install -y net-tools

apt install ssh

systemctl enable --now ssh

systemctl status ssh

ssh verrichiello@192.168.24.129

sudo su

cd /etc/netplan/

root@ubuntu:/home/verrichiello# ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

    link/ether 00:0c:29:30:6f:be brd ff:ff:ff:ff:ff:ff

---

root@ubuntu:/etc/netplan# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.24.2    0.0.0.0         UG    100    0        0 ens32

192.168.24.0    0.0.0.0         255.255.255.0   U     0      0        0 ens32

192.168.24.2    0.0.0.0         255.255.255.255 UH    100    0        0 ens32

---

root@ubuntu:/etc/netplan# ifconfig

ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.24.129  netmask 255.255.255.0  broadcast 192.168.24.255

        inet6 fe80::20c:29ff:fe30:6fbe  prefixlen 64  scopeid 0x20<link>

        ether 00:0c:29:30:6f:be  txqueuelen 1000  (Ethernet)

        RX packets 2143  bytes 1112698 (1.1 MB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 1052  bytes 114293 (114.2 KB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 132  bytes 11554 (11.5 KB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 132  bytes 11554 (11.5 KB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

---

root@ubuntu:/etc/netplan# ip route show

default via 192.168.24.2 dev ens32 proto dhcp src 192.168.24.129 metric 100

192.168.24.0/24 dev ens32 proto kernel scope link src 192.168.24.129

192.168.24.2 dev ens32 proto dhcp scope link src 192.168.24.129 metric 100

---

vi 0-installer-config.yaml

---

# This is the network config written by 'subiquity'

network:

 ethernets:

    ens32:

      dhcp4: no

      addresses:

      - 192.168.24.129/24

      gateway4: 192.168.24.2

      nameservers:

        addresses: [8.8.8.8, 8.8.4.4]

 renderer: networkd

 version: 2

---

netplan apply

netplan get

systemd-resolve --status

---

apt install apache2 mysql-client mysql-server php libapache2-mod-php

apt install graphviz aspell ghostscript clamav 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

service apache2 restart

apt install git

cd /opt

root@ubuntu:/opt# git clone git://git.moodle.org/moodle.git

Cloning into 'moodle'...

remote: Counting objects: 1213463, done.

remote: Compressing objects: 100% (4404/4404), done.

remote: Total 1213463 (delta 7071), reused 8800 (delta 6224)

Receiving objects: 100% (1213463/1213463), 411.71 MiB | 3.04 MiB/s, done.

Resolving deltas: 100% (904241/904241), done.

Updating files: 100% (22073/22073), done.

---

cd moodle

git branch --track MOODLE_39_STABLE origin/MOODLE_39_STABLE

root@ubuntu:/opt/moodle# git checkout MOODLE_39_STABLE

Switched to branch 'MOODLE_39_STABLE'

Your branch is up to date with 'origin/MOODLE_39_STABLE'.

---

cp -R /opt/moodle /var/www/html/

mkdir /var/moodledata

chown -R www-data /var/moodledata

mysql -u root

mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Query OK, 1 row affected (0.01 sec)

---

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Pippolandi.4o0O0o';

create user 'moodledude'@'localhost' IDENTIFIED BY 'psw.M0odle.lh.BB0O0o0e';

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodledude'@'localhost';

quit;

---

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

---

http://192.168.24.129/moodle

Inserire nomi db, password e cartelle precedentemente configurate







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

15 minuti... Finito...


Download TXT:

Commenti

Post popolari in questo blog

Ubuntu Server 20.xx | Abilitare SSH-RSA con PuTTy | Video

Homo Digitalis o Feudalesimo Digitale?