Phpmyadmin Debian 10

How to access phpmyadmin
  1. Phpmyadmin Debian 10 Package
  2. Phpmyadmin Debian 10 Nginx
  3. Phpmyadmin Debian 10 Apt-get
  4. Debian 10 Mysql Phpmyadmin
  5. Debian 10 Download

sudo: command not found

After installation of Debian 10 and you try to install a package you might get the message: bash: sudo: command not found

To install sudo, run the following:

  1. Aug 18, 2020 Debian 10 tidak menyertakan phpMyAdmin, mau tidak mau harus di install manual. Tidak perlu khawatir karena instalasinya cukup mudah. Buat yang belum tau apa itu phpMyAdmin, phpMyAdmin adalah website untuk mengelola database MySQL/MariaDB langsung dari browser.
  2. PhpMyAdmin 4.9.7. Released 2020-10-15, see release notes for details. Older version compatible with PHP 5.5 to 7.4 and MySQL/MariaDB 5.5 and newer. Currently supported for security fixes only.

Debian 10 Buster has PHP 7.3 as the default version installable. The only pre-requisite for this setup is pre-installed Debian 10 and user account with sudo access. Step 1: Update system. As always, we recommend updating software repositories and installe packages to sync with latest releases. PhpMyAdmin isn’t included in Debian 10 software repository, so we have to manually download the software. Go to phpMyAdmin download page to check the latest stable version. Then run the following command to download it. Wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.zip.

su

apt-get install sudo

Give the user the right to run sudo

usermod -aG sudo username

Log out the user to refresh the group permissions of the user

Reference: https://chewett.co.uk/blog/477/sudo-command-not-found-debian-fixed/

Install the firewall ufw on Debian

Run the package installer:

sudo apt-get install ufw

Phpmyadmin Debian 10 Package

Enable the firewall

sudo ufw enable

Reference: https://www.tecmint.com/how-to-install-and-configure-ufw-firewall/

Phpmyadmin Debian 10 Nginx

Install the Apache Web Server

Update the local package index to reflect the latest upstream changes:

sudo apt update

Install the apache2 package

sudo apt install apache2

Configure the firewall for port 80

sudo ufw allow in 'WWW Full'

On your local computer you can check ‘localhost’ in the browser to see if Apache is running.

To test the install from another computer find the IP address of the server with:

ip addr show

Reference: https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-debian-9

Install MYSQL 8.0

MySQL 8.0 packages are available on the official MySQL Dev apt repository

sudo apt -y install wget
wget https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb

sudo apt update
sudo apt -y install mysql-server

Reference: https://computingforgeeks.com/how-to-install-mysql-8-0-on-debian/

Install PHP7

sudo apt update
sudo apt upgrade

sudo apt install php libapache2-mod-php php-gd php-mysqlnd

Create a PHP Info page to see if it is all working.

Phpmyadmin Debian 10 Apt-get

sudo nano /var/www/html/info.php

Type in:

Phpmyadmin

<?php phpinfo(); ?>

Enter ctrl+x, y and enter

In your browser go to your https://webserver/info.php

Install phpMyAdmin

Log in to MySQL

mysql -u root -p

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';

Update server’s package index

sudo apt update

Debian 10 Mysql Phpmyadmin

sudo apt install php-mbstring php-zip php-gd

wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.tar.gz

tar xvf phpMyAdmin-4.9.0.1-all-languages.tar.gz

Debian 10 Download

sudo mv phpMyAdmin-4.9.0.1-all-languages/ /usr/share/phpmyadmin

sudo mkdir -p /var/lib/phpmyadmin/tmp

sudo chown -R www-data:www-data /var/lib/phpmyadmin

sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

sudo nano /usr/share/phpmyadmin/config.inc.php

Add a 32 character blowfish_secret

$cfg['blowfish_secret'] = 'RANDOMSTRINGHERE'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

At the bottom of the file add

$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';

Configuring Apache to Serve phpMyAdmin

Create new file

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

Add the following code:

sudo a2enconf phpmyadmin.conf

sudo systemctl reload apache2

Log into phpMyAdmin: https://localhost/phpmyadmin

Create database phpmyadmin

Click operations tab – follow links to create tables for phpmyadmin database

Source: https://www.digitalocean.com/community/tutorials/how-to-install-phpmyadmin-from-source-debian-10

Install VSTFTPD

sudo apt update
sudo apt install vsftpd

Phpmyadmin

sudo nano /etc/vsftpd.conf

Set the following in the vsftpd.conf file:

anonymous_enable=NO
local_enable=YES
local umask=022
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO

Add ufw exceptions

sudo ufw allow 20:21/tcp
sudo ufw allow 30000:31000/tcp
sudo systemctl restart vsftpd

Add the users that are allowed to access vsftpd to the vsftpd.userlist (one per line)

sudo nano /etc/vsftpd.user_list

The following is ONLY for dev environment

Add current user to group that owns /var/www/html folder

sudo usermod -a -G GROUPNAME USERNAME

Reboot system

Change group permissions to rwx

sudo chmod -R g+rwx /var/ww/html