Phpmyadmin Debian 10 Instalasi dan konfigurasi di mariadb dan Nginx

Install Phpmyadmin di Debian 10

Hal yang perlu kita lakukan adalah memastikan Os yang kita hadapi. Pertama pastikan sudah mendapat akses root dan sudah berada di terminal console

Phpmyadmin Debian 10 Instalasi dan konfigurasi di mariadb dan Nginx
phpmyadmin debian mariadb dan nginx

Informasi gathering

Cek terlebih dahulu apa sudah terinstall sesuai yang kita butuhkan. Apabila belum terinstall saat kita mengecek silahkan untuk menginstall paket (menyesuaikan).

Informasi OS GNU


lsb_release -a

Informasi Web Server


nginx -v

Apabila belum terinstall


apt install nginx

Informasi Php


php -v

Apabila belum terinstall silahkan bisa install


apt install php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl php-fpm

 

Update 

Lakukan update dan upgrade direporsitory Cek reporsitory debian di


cat /etc/apt/sources.list

Perintah update dan upgrade

 
apt update && apt upgrade

Instalasi mariadb Server

Untuk menginstall mariadb-server silahkan ketik perintah


apt install mariadb-server

Ceking mariadb loggin root

mysql -u root

Maka tampilanya kita bisa langsung masuk tanpa password, Oleh karena itu sebagai root kita bisa memberi password untuk sisi keamanan.

Welcome to the MariaDB monitor.
Commands end with ; or \g.
Your MariaDB connection id is 49
Server version: 10.3.22-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)]>

Untuk keluar dari mariadb keetik exit;

Memberi password mariadb akun root

password untuk root pada mariadb


mysql_secure_installation

root@myserver:~# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): [ Enter ]
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Test masuk root dengan password yang sudah di buat tadi,


root@green:~# mysql -u root -p

Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 51
Server version: 10.3.23-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)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
5 rows in set (0.001 sec)

Install phpmyadmin

Untuk aplikasi phpmyadmin di Debian 10 di repo sudah tidak ada maka untuk itu kita harus mendownload manual. Sebelum mendownload kita pastikan telah menginstal dependensi aplikasi yang di perlukan.


apt install php-cli php-json php-gettext php-mbstring php-mysql php-xml php-curl php-php-gettext wget

Bila sudah maka kita cari di internet url phpmyadamin saya menggunakan versi phpmyadmin_4.6.6-4_all.deb
Sebelum mendownload pastikan kita pindah direktory di temp folder


cd /temp
wget http://ftp.debian.org/debian/pool/main/p/phpmyadmin/phpmyadmin_5.0.4+dfsg2-2_all.deb

Masih di rirectory /tmp


dpkg -i phpmyadmin_4.6.6-4_all.deb

Tunggu saja sampai selesai dan pasti terjadi error karena terjadi dependency aplikasi yang kurang

Ketiklah 


apt install -f

Lanjutkan konfigurasinya masih di instalasi phpmyadmin


┌────────────────────────────────────────────────┤ Configuring phpmyadmin ├────────────────────────────────────────────────┐
│ │
│ The phpmyadmin package must have a database installed and configured before it can be used. This can be optionally │
│ handled with dbconfig-common. │
│ │
│ If you are an advanced database administrator and know that you want to perform this configuration manually, or if your │
│ database has already been installed and configured, you should refuse this option. Details on what needs to be done │
│ should most likely be provided in /usr/share/doc/phpmyadmin. │
│ │
│ Otherwise, you should probably choose this option. │
│ │
│ Configure database for phpmyadmin with dbconfig-common? │
│ │
│ <yes> <No> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

pilih yes lanjut enter 



┌────────────────────────────────────────────────┤ Configuring phpmyadmin ├────────────────────────────────────────────────┐
│ Please provide a password for phpmyadmin to register with the database server. If left blank, a random password will be │
│ generated. │
│ │
│ MySQL application password for phpmyadmin: │
│ │
│ ***********_____________________________________________________________________________________________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Masukan konfirmasi password kalian, jika sudah tekan Ok



┌────┤ Configuring phpmyadmin ├─────┐
│ │
│ │
│ Password confirmation: │
│ │
│ ***********______________________ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────┘

Masukan konfirmasi password kalian, jika sudah tekan Ok

Setelah itu perhatikankonfigurasi selanjutnya ini


┌────────────────────────┤ Configuring phpmyadmin ├─────────────────────────┐
│ Please choose the web server that should be automatically configured to │
│ run phpMyAdmin. │
│ │
│ Web server to reconfigure automatically: │
│ │
│ [ ] apache2 │
│ [ ] lighttpd │
│ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────────────────────────────────────────────┘

Pastikan karena kita menggunakan nginx jadi abaikan saja tidak perlu di ceklist tahapan selanjutnya membuat shorcut phpmyadmin di direktori /var/www/html/


ln -s /usr/share/phpmyadmin/ /var/www/html/

Rekonfigurasi Phpmyadmin

Pada saat ini kita belum bisa masuk ke phpmyadamin di browser misal http:ip/phpmyadmin maka perlu rekonfigurasi ulang

dpkg-reconfigure phpmyadmin

┌──────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ │
│ Since you are reconfiguring phpmyadmin, you may also want to reinstall the database │
│ which it uses. │
│ │
│ If you wish to reinstall the database for phpmyadmin, you should select this │
│ option. If you do not wish to do so (if you are reconfiguring the package for │
│ unrelated reasons), you should not select this option. │
│ │
│ Warning: if you opt to reinstall the database and install it under a name that │
│ already exists, the old database will be dropped without further questions. In that │
│ case a backup of the original database is made in /var/tmp/. │
│ │
│ Warning: if you change the name of the database, the old database will not be │
│ removed. If you change the name of the user that connects to the database, the │
│ privileges of the original user will not be revoked. │
│ │
│ <Ok> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────┘

Oke lanjut saja tekan Enter



┌─────┤ Configuring phpmyadmin ├──────┐
│ │
│ Reinstall database for phpmyadmin? │
│ │
│ <Yes> <No> │
│ │
└─────────────────────────────────────┘

Pilih Yes karena kita melakukan reinstal database phpmyadmin


┌─────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ By default, phpmyadmin will be configured to use a MySQL server through a local │
│ Unix socket (this provides the best performance). To connect with a different │
│ method, or to a different server entirely, select the appropriate option from the │
│ choices here. │
│ │
│ Connection method for MySQL database of phpmyadmin: │
│ │
│ Unix socket │
│ TCP/IP │
│ │
│ │
│ <Ok> <Cancel> │
│ │
└─────────────────────────────────────────────────────────────────────────────────────┘

Pilih TCP/IP lalu Ok (gunakan Tab untuk memilih opsi)


┌──────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ Please select the remote hostname to use, or select "new host" to enter a new host. │
│ │
│ Host name of the MySQL database server for phpmyadmin: │
│ │
│ new host │
│ localhost │
│ │
│ │
│ <Ok> <Cancel> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────┘

Pilih localhost lalu Ok (gunakan Tab untuk memilih opsi)


┌──────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ Please specify the port the MySQL database on the remote host is running on. To use │
│ the default port, leave this field blank. │
│ │
│ Port number for the MySQL service: │
│ │
│ 3306________________________________________________________________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────┘

masukkan Port Mysql 3306


┌───────────────────────┤ Configuring phpmyadmin ├────────────────────────┐
│ Please provide a name for the MySQL database to be used by phpmyadmin. │
│ │
│ MySQL database name for phpmyadmin: │
│ │
│ phpmyadmin_____________________________________________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Isi dengan phpmyadmin lanjut Oke


┌──────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ │
│ Please provide a MySQL username for phpmyadmin to register with the database │
│ server. A MySQL user is not necessarily the same as a system login, especially if │
│ the database is on a remote server. │
│ │
│ This is the user which will own the database, tables, and other objects to be │
│ created by this installation. This user will have complete freedom to insert, │
│ change, or delete data in the database. │
│ │
│ If your username contains an @, you need to specify the domain as well (see below). │
│ │
│ Advanced usage: if you need to define the domain that the user will log in from, │
│ you can write "username@domain". │
│ │
│ <Ok> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────┘

Pilih Oke



┌────┤ Configuring phpmyadmin ├─────┐
│ MySQL username for phpmyadmin: │
│ │
│ root@localhost___________________ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────┘

tambahkan root@localhost lanjut Oke


┌─────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ Please provide a password for phpmyadmin to register with the database server. If │
│ left blank, a random password will be generated. │
│ │
│ MySQL application password for phpmyadmin: │
│ │
│ ******_____________________________________________________________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└─────────────────────────────────────────────────────────────────────────────────────┘

Masukan password untuk root



┌────┤ Configuring phpmyadmin ├─────┐
│ │
│ │
│ Password confirmation: │
│ │
│ ******___________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────┘

Ketik sekali lahi untuk konfirmasi


┌──────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────┐
│ Please provide the name of the account with which this package should perform │
│ administrative actions. This user is the one with the power to create new database │
│ users. │
│ │
│ For MySQL, this is almost always "root". Note that this is not the same as the Unix │
│ login "root". │
│ │
│ Name of the database's administrative user: │
│ │
│ root________________________________________________________________________________ │
│ │
│ <Ok> <Cancel> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────┘

Pastikan mengisi dengan root lanjut Oke


┌──────────────────────────┤ Configuring phpmyadmin ├───────────────────────────┐
│ Please choose the web server that should be automatically configured to run │
│ phpMyAdmin. │
│ │
│ Web server to reconfigure automatically: │
│ │
│ [ ] apache2 │
│ [ ] lighttpd │
│ │
│ │
│ <Ok> <Cancel> │
│ │
└───────────────────────────────────────────────────────────────────────────────┘

Tidak perlu mengis apa apa (blank saja) langsung Oke saja


┌─────────────────────────────┤ Configuring phpmyadmin ├─────────────────────────────┐
│ │
│ An error occurred while installing the database: │
│ │
│ mysql said: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using │
│ password: NO) . Your options are: │
│ * abort - Causes the operation to fail; you will need to downgrade, │
│ reinstall, reconfigure this package, or otherwise manually intervene │
│ to continue using it. This will usually also impact your ability to │
│ install other packages until the installation failure is resolved. │
│ * retry - Prompts once more with all the configuration questions │
│ (including ones you may have missed due to the debconf priority │
│ setting) and makes another attempt at performing the operation. │
│ * retry (skip questions) - Immediately attempts the operation again, │
│ skipping all questions. This is normally useful only if you have │
│ solved the underlying problem since the time the error occurred. │
│ │
│ <Ok> │
│ │
└────────────────────────────────────────────────────────────────────────────────────┘

Dont panik ini masih prosses tidak masalah lanjut Ok saja


┌──────┤ Configuring phpmyadmin ├───────┐
│ Next step for database installation: │
│ │
│ abort │
│ retry │
│ retry (skip questions) │
│ ignore │
│ │
│ │
│ <Ok> │
│ │
└───────────────────────────────────────┘

Pada opsi selanjutnya pilih retry dan Enter

Dan...

Uji coba ..

Buka dengan web browser pastikan block server nginx sudah benar peletakanya. Asumsikan kalian sudah paham nginx (baca enggine X) bagi yang belum paham terkait seting konfigurasi block web server menggunakan nginx bisa baca di artikel selanjutnya. 

Kesimpulan

Phpmyadmin di debian 10 tidak bisa langsung apt install phpmyadmin.
Setelah install phpmyadmin perlu adanya rekonfigurasi ulang.
Semoga artikel ini bermanfaat. thanks for attention.

Tampilkan Komentar
Sembunyikan Komentar

0 Response to "Phpmyadmin Debian 10 Instalasi dan konfigurasi di mariadb dan Nginx"

Post a Comment

PERHATIAN:
Jika ada yang Ingin Anda Tanyakan Terkait Artikel di atas Silahkan Bertanya Melalui Kolom Komentar Berikut ini!, dengan Ketentuan :

1. Berkomentarlah dengan Sopan (No Spam, Sara dan Rasis).
2. Komentar di Moderasi, bila berkomentar tidak sesuai dengan kebijakan maka tidak di terbitkan!.
3. Centang kotak Notify Me / Beri Tahu Saya untuk mendapatkan notifikasi komentar.

ads_cod up article

ads_cod center article 1

ads_cod center article 2

ads_cod botm article