KONFIGURASI PHP MYADMIN
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
Network yang terhubung dengan internet dengan konfigurasi network menggunakan NAT
Network yang akan membagikan jaringan ke client di belakangnya
Menggunakan konfigurasi network Host-Only atau bisa menggunakan Vmnet
Pastikan konfigurasi DNS sudah berjalan dengan baik
Adapun konfigurasi dalam file bind seperti berikut : contoh pendeklarasian pada file db.
db.alan
.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).
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
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
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.
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.
Step 3: Check phpMyAdmin GPG Key
To verify the GPG key for phpMyAdmin, download the phpMyAdmin keyring to the Downloads directory:
#wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring
Access the Downloads directory and import the keyring:
#cd Downloads gpg --import phpmyadmin.keyring
Download the corresponding GPG .asc file for your version of phpMyAdmin:
#wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc
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.
Step 4: Unpack and Configure phpMyAdmin
Buat directory phpmyadmin dalam /var/www/html
#mkdir /var/www/html/phpMyAdmin
Akses file phpmyadmin lalu mengextrack zip hasil download
#cd Downloads
#tar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin
Copykan file sample.inc.php
#cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php
Edit isi file config.inc.php dan samakan seperti scripts dibawah ini
#nano /var/www/html/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = '';
Untuk menambahkan akses :
$cfg['blowfish_secret'] = 'my_secret_passphrase';
Simpan dan keluar (Ctrl+x).
Rubah hak akses isi file config.inc.phpfile :
#chmod 660 /var/www/html/phpmyadmin/config.inc.php
Rubah kepemilikan dari file phpmyadmindirectory:
#chown -R www-data:www-data /var/www/html/phpmyadmin
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
Log in to phpMyAdmin with the username and password for the MariaDB user you had created and granted privileges to.
Tidak ada komentar:
Posting Komentar