Install Moodle di Centos8-Nginx-PHP7.4-Mariadb

From Dboswiki
Revision as of 11:23, 11 February 2023 by Smpdbos (talk | contribs) (Created page with "Catatan yang belum diatur Install nginx dnf install nginx -y jika tidak jalan, perlu upgrade centos dengan scrip di bawah ini, kemudian install nginx lagi sed -i -e "s|mir...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Catatan yang belum diatur

Install nginx

dnf install nginx -y

jika tidak jalan, perlu upgrade centos dengan scrip di bawah ini, kemudian install nginx lagi

sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*

sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

systemctl start nginx

systemctl status nginx

Install PHP 7.4

Update Repiository

dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm

jika ada masalah

dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm --skip-broken

lihat yang terinstal

dnf module list php

dnf module reset php

dnf module enable php:7.4

untuk pastikan cek lagi dengan

dnf module list php

Install extensin php

dnf install php php-ldap php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-curl php-zip php-common php-fpm -y

Install maria DB

Upgrade ke maria DB yang baru

vim /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.5 CentOS repository list - created 2020-08-21 23:57 UTC

# http://downloads.mariadb.org/mariadb/repositories/

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.5/centos8-amd64

module_hotfixes=1

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

dnf install MariaDB-server -y

systemctl start mariadb

systemctl status mariadb |grep Active

mysql_secure_installation

buat database

mysql -u root -p

CREATE DATABASE moodle;

CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'Abcd1234';

GRANT ALL ON moodle.* TO 'moodle'@'localhost' IDENTIFIED BY 'Abcd1234' WITH GRANT OPTION;

FLUSH PRIVILEGES;

EXIT;

Install ssh server di centos

dnf install openssh-server

systemctl start sshd

systemctl enable sshd

systemctl status sshd

Open the SSH port 22 to allow incoming traffic:

# firewall-cmd --zone=public --permanent --add-service=ssh

# firewall-cmd --reload

Download moodle sebagai manusia dan copy kan ke /usr/share/nginx/

scp moodle-latest-401.zip [email protected]: /usr/share/nginx/

cd /usr/share/nginx/

Install unzip

dnf install unzip

unzip moodle-latest-401.zip

chown -R nginx:nginx moodle

chmod -R 755 moodle

mkdir moodledata


chmod 777 moodledata/


chown -R nginx:nginx moodledata/



jika apache


dnf install php php-opcache php-gd php-curl php-mysqlnd


Setting PHP.ini untuk mengatur maxtime,max upload dll

cd /etc

nano php.ini