2

How To Install DBeaver on Debian 11 / Debian 10

 2 years ago
source link: https://computingforgeeks.com/how-to-install-dbeaver-on-debian/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How To Install DBeaver on Debian 11
Search

As a Developer or Database/Systems Administrator, there is always a need to use GUI tools that simplify management of database systems. One of such tools is DBeaver. DBeaver is free to use universal and multi-platform database administration tool created for anyone working with databases. As a developer, SQL programmer or analyst you’ll enjoy what this tool has to offer. DBeaver is based on Eclipse platform.

The open source edition of DBeaver support any database system that has JDBC driver. Some of the databases supported are:

  • MySQL/MariaDB
  • PostgreSQL
  • Oracle
  • Google BigQuery
  • SQL Server
  • Sybase/SAP ASE
  • SQLite, Firebird
  • HSQLDB
  • Derby
  • Teradata
  • Vertica
  • Netezza
  • Informix
  • Among many other databases

For use with non-JDBC data sources such as WMI, MongoDB, Cassandra, Redis, then consider using DBeaver Enterprise Edition

DBeaver is an amazing workbench tool for building SQL queries, editing, and transferring data, viewing trees of objects, completing database administration tasks, monitoring database connection sessions, and a lot more. Use the steps covered in this article to install and use DBeaver on Debian 11 / Debian 10 Linux system.

Step 1: Install Java runtime

We can use OpenJDK open source edition of Java JRE. The package is available on OS default repositories:

sudo apt update
sudo apt -y install default-jdk

Check installed version of Java to confirm it works.

$ java -version
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment (build 11.0.14+9-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.14+9-post-Debian-1deb11u1, mixed mode, sharing)

Step 2: Add DBeaver CE repository and install

DBeaver development team provides a managed repository with latest builds of the software. We can add the repository by running the following commands:

echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list

Another requirement is the importation of repo GPG keys. Add them using the commands:

sudo apt install curl gpg gnupg2 software-properties-common apt-transport-https ca-certificates
curl -fsSL https://dbeaver.io/debs/dbeaver.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/dbeaver.gpg

After adding the repository, update the your package sources:

$ sudo apt update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Get:5 https://dbeaver.io/debs/dbeaver-ce  InRelease [2086 B]
Get:6 https://dbeaver.io/debs/dbeaver-ce  Packages [461 B]
Fetched 2547 B in 1s (4223 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Step 3: Install DBeaver CE on Debian 11 / Debian 10

We’ve confirmed the repository added is working. Let’s proceed to install DBeaver CE on Debian 11 / Debian 10.

sudo apt install dbeaver-ce

The process of installation should be few seconds/minutes if you’ve good internet connectivity.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  dbeaver-ce
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 109 MB of archives.
After this operation, 140 MB of additional disk space will be used.
Get:1 https://dbeaver.io/debs/dbeaver-ce  dbeaver-ce 21.3.4 [109 MB]
Fetched 109 MB in 8s (13.4 MB/s)
Selecting previously unselected package dbeaver-ce.
(Reading database ... 38539 files and directories currently installed.)
Preparing to unpack .../dbeaver-ce_21.3.4_amd64.deb ...
Unpacking dbeaver-ce (21.3.4) ...
Setting up dbeaver-ce (21.3.4) ...
Processing triggers for mailcap (3.69) ...

Checking version of DBeaver installed on Debian Linux system.

$ apt policy  dbeaver-ce
dbeaver-ce:
  Installed: 21.3.4
  Candidate: 21.3.4
  Version table:
 *** 21.3.4 500
        500 https://dbeaver.io/debs/dbeaver-ce  Packages
        100 /var/lib/dpkg/status

Step 4: Connecting Database Server to DBeaver

Hooray!, DBeaver has been installed on Debian 11 / Debian 10 Linux system. The pending task is connecting database server to be administered using DBeaver. This can be any supported database system. In this example we’ll use MariaDB which can be installed on the same server hosting DBeaver solution.

sudo apt install mariadb-server

Start and enable mariadb service

sudo systemctl enable mariadb
sudo systemctl start mariadb

Status of Database service:

$ systemctl status mariadb
● mariadb.service - MariaDB 10.5.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-02-12 14:32:29 UTC; 5 days ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 585 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 8 (limit: 2336)
     Memory: 100.0M
        CPU: 59.487s
     CGroup: /system.slice/mariadb.service
             └─585 /usr/sbin/mariadbd

Feb 12 14:32:29 debian-bullseye-01 mariadbd[585]: 2022-02-12 14:32:29 0 [Note] /usr/sbin/mariadbd: ready for connections.
Feb 12 14:32:29 debian-bullseye-01 mariadbd[585]: Version: '10.5.12-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
Feb 12 14:32:29 debian-bullseye-01 systemd[1]: Started MariaDB 10.5.12 database server.
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[613]: Upgrading MySQL tables if necessary.
Feb 12 14:32:29 debian-bullseye-01 mariadbd[585]: 2022-02-12 14:32:29 0 [Note] InnoDB: Buffer pool(s) load completed at 220212 14:32:29
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[617]: Looking for 'mysql' as: /usr/bin/mysql
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[617]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[617]: This installation of MariaDB is already upgraded to 10.5.12-MariaDB, use --force if you still need to run mysql_upgrade
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[626]: Checking for insecure root accounts.
Feb 12 14:32:29 debian-bullseye-01 /etc/mysql/debian-start[630]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables

Secure database server by setting root password and performing other hardening tasks

$ sudo mariadb-secure-installation
Enter current password for root (enter for none): <ENTER>
Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] y
New password: Enter Password
Re-enter new password: Re-Enter Password

Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

DBeaver can be launched from terminal

$ dbeaver
$ dbeaver-ce

Or from the Applications Launcher for your Desktop Environment.

1. Create a new database connection – Specify database type.

2. Provide database access details – Server, database user

3. Click “Test Connection” to verify the connection. When asked to download mariadb connection driver, please agree by clicking Download button.

If connection is successful you should get to database details windows.

You can now manage your database, tables, triggers, Procedures, Views, Events e.t.c using DBeaver. That’s all we had to share on the installation and usage of DBeaver CE on Debian 11 / Debian 10 Linux system. We hope this guide was of help to you. If there are any issues experienced on your end share them in the comments section.

Other guides on Debian Linux:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK