Rabu, 24 November 2021

Konfigurasi Phpmyadmin -deb10

KONFIGURASI PHP MYADMIN

  1. Langkah pertama pastikan terlebih dahulu konfigurasi ip address dan DNS Server sudah berjalan

Contoh 

Dari gambar diatas saya menggunakan 2 network yang di aktifkan, jika menggunakan 1 network juga

tidak masalah

  1. Network yang terhubung dengan internet dengan konfigurasi network menggunakan NAT


  1. Network yang akan membagikan jaringan ke client di belakangnya

Menggunakan konfigurasi network Host-Only atau bisa menggunakan Vmnet





  1. Pastikan konfigurasi DNS sudah berjalan dengan baik


Adapun  konfigurasi dalam file bind seperti berikut : contoh pendeklarasian pada file db.


  1. db.alan

  1. .db.200

Dan semua konfigurasi di atas bisa dipanggil seperti berikut, jangan lupa install dan jalankan apache2,

agar dapat dipanggil seperti dibawah ini : 

Setelah sampai Default web apache sudah bias dipanggil,

kita lanjut konfigurasi kebagian installasi dan update paket yang diperlukan utnuk menginstall PHPMYADMIN di debian 10.

Step 1. Tambahkan file repository di sources.list

lalu menginstall paket wget


#apt update

Perintah untuk menginstall paket wget #apt install wget -y

Step 1.2: Install Apache

Lanjut meginstall paket apche 2

#apt install apache2 -y

cek hasil konfigurasi apache dengan perintah berikut :

#systemctl status apache2

In the report that follows, you should see a green status that says active (running).

Status of Apache web-server on Debian 10.

Tekan Ctrl+z untuk keluar.

Step 1.3: Install PHP on Debian 10

Install paket php dan mysql untuk membantu dalam pembuatan databasenya

#apt install php php-mysql php-pear php-mbstring

php-gettext libapache2-mod-php php-common

php-phpseclib php-mysql -y

Untuk mengecek versi php yang digunakan 

#php --version

The version of PHP currently intalled on Debian 10 system.

Step 1.4: Install dan setting MariaDB 

Mulai menginstall paket mariadb dengan perintah berikut ini :

#apt install mariadb-server mariadb-client -y

Untuk melihat status apakah sudah berjalan 

#systemctl restart mariadb

#systemctl status mariadb

System confirms that the MariaDB service is active and running on Debian 10.

Setelah itu kita mengkonfigurasi mariadb sebelum menginstal phpmyadmin

Secure MariaDB

Masukan perintah :

#mysql_secure_installation

 

Ikuti perintah seperti dibawah ini:

As you have not yet set a root password for your database, hit Enter to skip the initial query. You are now presented with the following options:

  • Set root password? [Y/n] – Type y and press Enter to create a strong root password for your database.

  • Remove anonymous users? [Y/n] – Type y and press Enter.

  • Disallow root login remotely? [Y/n] – Type y and press Enter.

  • Remove test database and access to it? [Y/n] – Type y and confirm with Enter.

  • Reload privilege tables now? [Y/n] – Type y and confirm with Enter.

The output confirms that your MariaDB installation is now secure.

screenshot showing you have successfully secured the MariaDB installation on Debian 10

Membuat user untuk mariadb

The phpMyAdmin utility needs a designated user to be able to connect to your database. Creating a new MariaDB user improves security and allows you to control the level of permissions granted to this user.

Use our detailed guide to create a new MariaDB user and grant privileges. Once you have set up a MariaDB user, you are ready to start the phpMyAdmin installation process.

Step 2: Download phpMyAdmin

Step selanjutnya kita download paket phpmyadmin nya:

#wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

The -P option instructs wget to save the files directly in the Downloads directory. Feel free to specify any directory you see fit.

phpMyAdmin downloading in Debian 10

Step 3: Check phpMyAdmin GPG Key

  1. To verify the GPG key for phpMyAdmin, download the phpMyAdmin keyring to the Downloads directory:

  2. #wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring

  1. Access the Downloads directory and import the keyring:

#cd Downloads gpg --import phpmyadmin.keyring


System imports gpg keyring to verigy phpmyadmin download files

  1. Download the corresponding GPG .asc file for your version of phpMyAdmin:

  2. #wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc

  1. Co pindha kedalam directory hasil download phpmyadmin tadi :

    #cd Downloads

    gpg --verify phpMyAdmin-latest-all-languages.tar.gz.asc

The system responds by displaying GPG key information.

output provides the GPG key to verify the downloaded files


Step 4: Unpack and Configure phpMyAdmin

  1. Buat directory phpmyadmin dalam /var/www/html

#mkdir /var/www/html/phpMyAdmin

  1. Akses file phpmyadmin lalu mengextrack zip hasil download 

#cd Downloads

  1. #tar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin

  2. Copykan file sample.inc.php 

#cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php

  1. Edit isi file config.inc.php dan samakan seperti scripts dibawah ini

#nano /var/www/html/phpmyadmin/config.inc.php


$cfg['blowfish_secret'] = '';

Add passphrase to the phpmyadmin config file.

Untuk menambahkan akses :

$cfg['blowfish_secret'] = 'my_secret_passphrase';

Simpan dan keluar (Ctrl+x).

  1. Rubah hak akses isi file config.inc.phpfile :

#chmod 660 /var/www/html/phpmyadmin/config.inc.php

 

 

  1. Rubah kepemilikan dari file  phpmyadmindirectory:

#chown -R www-data:www-data /var/www/html/phpmyadmin

  1. Restart Apache:

#systemctl restart apache2

 

Step 5: Access phpMyAdmin from Browser

Use your preferred web browser and navigate to the following web address:

#localhost/phpmyadmin

Atau menggunakan ip dan nameserver yang sudah dibuat pada DNS Servernya

The phpMyAdmin logon page.

Log in to phpMyAdmin with the username and password for the MariaDB user you had created and granted privileges to.

The phpMyAdmin grahical user-interface.



Tidak ada komentar:

Posting Komentar

JOBSHEET ROUTER

JOBSHEET ROUTER Konfigurasi Router Debian 9/10 Pada langkah pertama disini telah tersedia Komputer yang telah terinstall Debian 9 “Stretch” ...