قالب وردپرس درنا توس
Home / How To / Install Database Management Tools on Debian 10

Install Database Management Tools on Debian 10



Managing database systems such as MySQL, PostgreSQL, Oracle and SQLite from the web-based user interface is easier than using the command line utility. Adminer is one of the best full database management tools written in PHP. It is very similar to phpMyAdmin which can be used to manage MySQL, SQLite, Oracle, PostgreSQL databases. Adminer is a simple and easy to use database management tool compared to other tools.

Features

  • Multilingual support.
  • Supports various database systems including MySQL, PostgreSQL, Oracle, Elasticsearch, MongoDB and many more.
  • Export and import databases and tables.
  • Add, delete, and modify databases and tables.
  • Executes SQL queries from a text file.
  • Show and kill processes.
  • Extend functionality with plugins.

In this tutorial we will show you how to install the Adminer database management tool on Debian 1

0.

Prerequisites

  • A server running Debian 10.
  • A root password is configured on your server. [19659014] Getting Started

    Before you begin, it is recommended that you update your server with the latest version with the following command:

      apt-get update -y 
    apt-get upgrade -y

    When your server is updated, restart it to make the changes.

    I install LAMP server

    First, the administrator requires LAMP server installed on your server. You can install the LAMP server with the following command:

      apt-get install apache2 php libapache2-mod-php php-curl php-cli php-mysql php-gd mariadb-server-y 

    Once the installation is installed, start Apache and MariaDB service and enable them to boot after system startup with the following command:

      systemctl start apache2 
    systemctl start mariadb
    systemctl enable apache2
    systemctl enable mariadb

    You can continue to the next step.

    Secure installation of MariaDB

    By default, MariaDB is not secured. So you have to secure it by running the mysql_secure_installation script.

      mysql_secure_installation 

    Answer all the questions below:

      Enter the current root password (specify for none):
    Set root password? [Y/n] Y
    Delete anonymous users? [Y/n] Y
    Remove root login remotely? [Y/n] Y
    Delete the test database and access it? [Y/n] Y
    Reload privilege tables now? [Y/n] Y
    

    When MariaDB is secured, you must set the root password for MariaDB.

    First, log on to the MariaDB shell with the following command:

      mysql 

    Then set password for root user with the following command:

      MariaDB [(none)]> SET PASSWORD FOR & # 39; root & # 39; @ & # 39; localhost & # 39; = PASSWORD ("new password"); 

    Then flush the privileges and exit from the MariaDB shell with the following command: [19659016] MariaDB [(none)]> flush privileges;
    MariaDB [(none)]> exit;

    When you're done, you can move on to the next step.

    Installing Adminer

    By default, the administrator is not available in the Debian 10 repository. So you need to download the Adminer installation file from their official website. You can download it to the Apache web directory using the following command:

      wget "http://www.adminer.org/latest.php" -O /var/www/html/adminer.php Chapter19659017 ?? the download is complete, change the permissions of the downloaded file with the following command: 

      chown -R www-data: www-data /var/www/html/adminer.phpebrit19459015ochchmod 755 / var / www / html / adminer.php [19659016] When you're done, you can move on to the next step. 

    Access Adminer Dashboard

    Now open your browser and type the URL http: // your-server -IP / adminer.php . You will be redirected to the Admin login page:

     Admin Login

    Enter your MariaDB root username, password and click on Log in . You should see the Admin dashboard on the following page:

     Administrator Database Management Tool

    Now, click the localhost button on the top screen, you would see the following page:

     Select database

    Now click on the button " Create Database ". You should see the following page:

     Create Database

    Now enter the database name you want to create and click the Save button to create the database shown below:

     Newly created database in Adminer

    Enable SSL for administrator and get a free SSL certificate from Let's # Encrypt

    The first step to secure the administrator with a Let's # Encrypt SSL Certificate is to install python3-certbot-apache package. Execute the following command:

      apt-get -y install python3-certbot-apache 

    In the next step, we request an SSL certificate from Let & # 39; s Encrypt with the certbot client program. During this process, Let & # 39; s Encrypt server tries to connect to your server with the domain name you provide the certbot command. It is important that this domain name already points to your server in DNS, so that the site can already be accessed through its domain name at port 80 (http). If the site is not accessible from the Internet, the creation of Let & # 39; s Encrypt SSL Certificate will fail.

    Before we can start creating the SSL certificate, we must specify the domain name in the vhost configuration file. Open the default vhost file with an editor:

      nano /etc/apache2/sites-available/000-default.confebrit19659017 Premiere and add the line: 

      ServerName Example.com 

    Right below the & # 39; DocumentRoot "line Replace example.com with the domain name on your own site.

    Then create the SSL certificate with this command:

      certbot --apache -d example.com 

    Replace example.com with your domain name here again. The command launches a guide that asks you several questions.

    Enter the email address where the administrator responsible for this site can be reached.

     Set email address

    Accept the terms and conditions Let's Encrypt SSL Authority.

     Accept Terms

    Certbot is now asking you if you would like to share your email address with the Electronic Frontier Foundation.

     E-mail address FSF [19659029] Then select if you want to redirect non-SSL requests to https: // automatically. I choose yes here to avoid duplicate content issues when the site is available as http: // and https: // version.

     Redirect HTTP requests

    The SSL certificate has been successfully issued.

     SSL cert issued successfully

    When you open the site now with a browser you will automatically be redirected to SSL and the green padlock in front of the URL field in the browser shows that we are using a trusted SSL certificate now.

    Conclusion

    In the above tutorial, you will learn how to install Adminer on the Debian 10 server. You can now easily manage your database with the Adminer web-based interface. Feel free to ask me if you have any questions.


Source link