2. Instalasi Webserver dan PHP version (Persiapan Instalasi Moodle 3.10.8 Pada vps ubuntu 18.04 Lts)

 Setelah Proses upgarde OS selesai hal pertama yang harus dilakukan adalah instalasi webserver


1. apt install apache2 -y

2. apt install zip


setelah selasai instalasi zip lakukan instalasi versi php required dari versi moodle yang akan di install



  • Requires: PHP 7.2, MariaDB 10.2.29 or MySQL 5.7 or Postgres 9.6 or MSSQL 2012 or Oracle 11.2



3. install php7.2

apt install php7.2 php7.2-mapi php7.2-enchant php7.2-mysql php7.2-sybase php7.2-bcmath php7.2-gd php7.2-opcache  php7.2-tidy php7.2-bz2 php7.2-gmp  php7.2-pgsql php7.2-xml php7.2-cgi php7.2-imap  php7.2-phpdbg php7.2-xmlrpc php7.2-cli php7.2-interbase php7.2-pspell php7.2-xsl php7.2-common php7.2-intl  php7.2-readline php7.2-zip php7.2-curl php7.2-json php7.2-recode php7.2-dba php7.2-ldap  php7.2-snmp php7.2-dev php7.2-mbstring   php7.2-soap






Setelah sukses instalasi web server dan php, cek configurasi pada apache 
dengan perintah 

3. cd /etc/apache2/sites-available/     tekan enter
4.  ls    tekan enter


akan muncul dua buah file default configurasi php yaitu : 

000-default.conf  dan  default-ssl.conf

000-default.conf  berfungsi untuk load default webserver dengan port standart 80 atau digunakan pada protocol http

default-ssl.conf   berfungsi untuk load default webserver dengan port standart 443 atau digunakan pada protokol https

dalam config toturial ini kita  hanya menggunakan 000-default.conf

dengan perintah :  nano 000-default.conf   

5. nano 000-default.conf


rubah configurasi di atas dengan tulisan di bawah;

<VirtualHost *:80>
        #ServerName www.example.com  
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        <Directory /var/www/html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/moodle.error.log
        CustomLog ${APACHE_LOG_DIR}/moodle.access.log combined
</VirtualHost>

Setelah dirubah tekan kombinasi keyboard untuk menyimpan perubahan:
ctrl + o  
ctrl+ m
ctrl + x



6. lakukan restart service apache2 dengan perintah : systemctl restart apache2




7. Selanjutnya masuk ke document root pada webservernya dengan perintah :
   
   cd /var/www/html/



jalan perintah rm index.html   untuk menghapus file awal document root pada apache


Selanjutnya 

jalan perintah nano index.php

Masukan script php di bawah dengan tujuan untuk cek apakah php berhasil di execution di browser

<?php
phpinfo();
?>



tekan 
ctrl + o
ctrl+ m
ctrl + x


silahkan di akses ip dari vpsnya

http://10.1.10.121





Posting Komentar

Please Select Embedded Mode To Show The Comment System.*

Lebih baru Lebih lama

Formulir Kontak