F. Instalasi dan konfigurasi Database server

  1. Prerequisites (Prasyarat)
    1. Topologi Jaringan

      Gambar Topologi Jaringan

       

    2. Konfigurasi Server dan Client

      Konfigurasi Server :
      --------------------------------------------------
      - Sistem Operasi        : Linux Debian (10/11)
      - IP Address NIC 1      : DHCP Internet
      - Gateway               : DHCP Internet
      
      - Hostname              : ns100             (Gantilah angka 100 dengan nomer absen anda masing-masing)
      - Domain                : sekolah100.sch.id (Gantilah angka 100 dengan nomer absen anda masing-masing)
      - IP Address NIC 2      : 192.168.100.1/24  (Gantilah angka 100 dengan nomer absen anda masing-masing)
      
      
      Konfigurasi Client :
      --------------------------------------------------
      - Sistem Operasi        : Windows
      - IP Address            : DHCP

     

  2. Seting Server

    1. DHCP Server

      Pastikan instalasi dan konfigurasi DHCP server sudah berjalan dengan baik

    2. DNS Server

      Pastikan instalasi dan konfigurasi DNS server sudah berjalan dengan baik

    3. WEB Server

      Pastikan instalasi dan konfigurasi WEB server sudah berjalan dengan baik

     

    1. Instalasi dan Konfigurasi Database Server

        • Install paket Database Server

          Login sebagai user root

          login as: root
          This email address is being protected from spambots. You need JavaScript enabled to view it..1's password:
          
          Linux ns100 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2022-01-12) x86_64
          
          The programs included with the Debian GNU/Linux system are free software;
          the exact distribution terms for each program are described in the
          individual files in /usr/share/doc/*/copyright.

          Instal paket Database server

          root@ns100:~# apt install mariadb-server mariadb-client php-mysql
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          The following additional packages will be installed:
            galera-3 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl
            libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl
            libmariadb3 libmpfr6 libreadline5 libsigsegv2 libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.3
            mariadb-client-core-10.3 mariadb-common mariadb-server-10.3 mariadb-server-core-10.3 mysql-common php7.3-mysql rsync socat
          Suggested packages:
            gawk-doc libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx
            mariadb-test netcat-openbsd tinyca
          The following NEW packages will be installed:
            galera-3 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl
            libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl
            libmariadb3 libmpfr6 libreadline5 libsigsegv2 libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client mariadb-client-10.3
            mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 mysql-common php-mysql php7.3-mysql rsync
            socat
          0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
          Need to get 22.5 MB of archives.
          After this operation, 171 MB of additional disk space will be used.
          Do you want to continue? [Y/n]y
          Get:1 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 libmpfr6 amd64 4.0.2-1 [775 kB]
          Get:2 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 libsigsegv2 amd64 2.12-2 [32.8 kB]
          Get:3 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 gawk amd64 1:4.2.1+dfsg-1 [660 kB]
          Setting up libcgi-fast-perl (1:2.13-1) ...
          Setting up mariadb-server (1:10.3.31-0+deb10u1) ...
          Processing triggers for libapache2-mod-php7.3 (7.3.31-1~deb10u1) ...
          Processing triggers for systemd (241-7~deb10u8) ...
          Processing triggers for man-db (2.8.5-2) ...
          Processing triggers for libc-bin (2.28-10) ...
          root@ns100:~#
          

           

        • Konfigurasi MySQL

          Seting Database MySQL (User, Password, Database)

          Memberikan Privileges (hak akses) kepada user root untuk dapat mengelola seluruh database.
          user login : root
          password : paswdroot

          root@ns100:~# mysql -u root
          
          Welcome to the MariaDB monitor.  Commands end with ; or \g.
          Your MariaDB connection id is 49
          Server version: 10.3.31-MariaDB-0+deb10u1 Debian 10
          
          Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
          
          Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
          
          
          MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "paswdroot";
          Query OK, 0 rows affected (0.001 sec)
          
          MariaDB [(none)]> quit
          

       

      • Instalasi dan Konfigurasi phpMyAdmin

        Download phpMyAdmin Versi 5.1.2

        root@ns100:~# wget https://files.phpmyadmin.net/phpMyAdmin/5.1.2/phpMyAdmin-5.1.2-all-languages.zip
        
        --2022-01-28 19:10:21--  https://files.phpmyadmin.net/phpMyAdmin/5.1.2/phpMyAdmin-5.1.2-all-languages.zip
        Resolving files.phpmyadmin.net (files.phpmyadmin.net)... 89.187.162.142, 89.187.162.137, 89.187.162.133, ...
        Connecting to files.phpmyadmin.net (files.phpmyadmin.net)|89.187.162.142|:443... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 13805161 (13M) [application/zip]
        Saving to: ‘phpMyAdmin-5.1.2-all-languages.zip’
        
        phpMyAdmin-5.1.2-all-languages.z 100%[=========================================================]  13.17M  1.87MB/s    in 8.2s
        
        2022-01-28 19:10:36 (1.60 MB/s) - ‘phpMyAdmin-5.1.2-all-languages.zip’ saved [13805161/13805161]
                                    
        

         

        Install aplikasi unzip

        root@ns100:~# apt install unzip
                                    
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Suggested packages:
          zip
        The following NEW packages will be installed:
          unzip
        0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
        Need to get 172 kB of archives.
        After this operation, 580 kB of additional disk space will be used.
        Get:1 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 unzip amd64 6.0-23+deb10u2 [172 kB]
        Fetched 172 kB in 10s (16.8 kB/s)
        Selecting previously unselected package unzip.
        (Reading database ... 30006 files and directories currently installed.)
        Preparing to unpack .../unzip_6.0-23+deb10u2_amd64.deb ...
        Unpacking unzip (6.0-23+deb10u2) ...
        Setting up unzip (6.0-23+deb10u2) ...
        Processing triggers for mime-support (3.62) ...
        Processing triggers for man-db (2.8.5-2) ...
                                    
        

         

        Ekstrak file phpMyAdmin hasil download menggunakan apliaksi unzip

        root@ns100:~# unzip phpMyAdmin-5.1.2-all-languages.zip
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/README.md
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/composer.json
           creating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/dist/
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/dist/merged-ultraslim.json
           creating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/KBDocumentation.php
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/KBEntry.php
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/KBException.php
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/Search.php
          inflating: phpMyAdmin-5.1.2-all-languages/vendor/williamdes/mariadb-mysql-kbs/src/SlimData.php
          inflating: phpMyAdmin-5.1.2-all-languages/yarn.lock
        root@ns100:~#
        

         

        Pindahkan folder hasil ekstrak phpMyAdmin ke folder default dari http (dari folder phpMyAdmin-5.1.2-all-languages menjadi folder phpmyadmin). Serta

        Copy file config.sample.inc.php menjadi config.inc.php

        root@ns100:~# mv phpMyAdmin-5.1.2-all-languages /var/www/html/http/phpmyadmin
        
        root@ns100:~# cp /var/www/html/http/phpmyadmin/config.sample.inc.php  /var/www/html/http/phpmyadmin/config.inc.php                            
        

         

        Masukan kode blowfish_secret  'RfMd2oX7L7vT9Ls6fkuM0KwY;9gcho3C'   ke dalam file config.inc.php

        root@ns100:~# nano /var/www/html/http/phpmyadmin/config.inc.php
        
        $cfg['blowfish_secret'] = 'RfMd2oX7L7vT9Ls6fkuM0KwY;9gcho3C'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
        

         

        Buat folder tmp di dalam folder phpmyadmin kemudian rubah kepemilkannya ke user www-data

        root@ns100:~#  mkdir /var/www/html/http/phpmyadmin/tmp
        
        root@ns100:~#  chown -R www-data:www-data /var/www/html/http/phpmyadmin
        

         

        Restart service apache2

        root@ns100:~# /etc/init.d/apache2 restart
        
        [ ok ] Restarting apache2 (via systemctl): apache2.service.
        

         

      • Pengujian di client

        Gbr.01 Akses phpMyAdmin

         

        Gbr.01 Akses phpMyAdmin menggunakan user root

         

         

    2. Kesimpulan

      Selamat! akhirnya kita telah belajar dan berhasil melakukan instalasi dan konfigurasi Database Server