<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OmniDB Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/omnidb/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 04 Aug 2021 16:24:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install OmniDB Server on Ubuntu 20.04</title>
		<link>https://www.osradar.com/install-omnidb-server-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/install-omnidb-server-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 11 Aug 2021 00:22:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[OmniDB]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31580</guid>

					<description><![CDATA[<p>Hello, friends. There are database management tools created with web technology such as PHPMyAdmin but there are also others that emerge as alternatives. So, in this post, you will learn how to deploy the OmniDB server on Ubuntu 20.04. OmniDB is a client for managing MySQL, MariaDB, PostgreSQL, and SQLite databases. It has two versions, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-omnidb-server-ubuntu-20-04/">Install OmniDB Server on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. There are database management tools created with web technology such as PHPMyAdmin but there are also others that emerge as alternatives. So, in this post, you will learn how to deploy the OmniDB server on Ubuntu 20.04.</p>



<p class="has-line-data"><a href="https://omnidb.org/">O</a><a href="https://omnidb.org/" target="_blank" rel="noreferrer noopener">m</a><a href="https://omnidb.org/">niDB</a> is a client for managing MySQL, MariaDB, PostgreSQL, and SQLite databases. It has two versions, a desktop version which we told you about some time ago and a self-hosted version. We will talk about the latter.</p>



<p class="has-line-data">This client allows us to install it on our server and access it from anywhere. Or even use it in an internal network for the same purposes. With OmniDB we will be able to do what it is expected to do, query, modify and manage databases; besides this, it includes SQL Editors with autocomplete and others.</p>



<p class="has-line-data">On the other hand, work unification is the order of the day thanks to Tab System with multiple contexts.</p>



<p class="has-line-data">So, let’s get started.</p>



<h2 class="code-line"><a id="Install_OmniDB_on_Ubuntu_2004_10"></a>Install OmniDB Server on Ubuntu 20.04</h2>



<p class="has-line-data">The process is quite simple thanks to the DEB package that the developers leave us. So, connect to your server and update it.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">Now, download OmniDB DEB package</p>



<pre class="wp-block-preformatted">cd /tmp/
wget https://github.com/OmniDB/OmniDB/releases/download/3.0.3b/omnidb-server_3.0.3b_linux_x86_64.deb
--2021-08-04 15:08:35--  https://github.com/OmniDB/OmniDB/releases/download/3.0.3b/omnidb-server_3.0.3b_linux_x86_64.deb
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/56064194/13663400-3ff3-11eb-8d0c-7de42ff344c5?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210804%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20210804T130835Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=b329de2c87863f6cbe238e861488be0337ed0570899b2395511ceac88222ab8f&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;key_id=0&amp;repo_id=56064194&amp;response-content-disposition=attachment%3B%20filename%3Domnidb-server_3.0.3b_linux_x86_64.deb&amp;response-content-type=application%2Foctet-stream [following]
--2021-08-04 15:08:35--  https://github-releases.githubusercontent.com/56064194/13663400-3ff3-11eb-8d0c-7de42ff344c5?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210804%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20210804T130835Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=b329de2c87863f6cbe238e861488be0337ed0570899b2395511ceac88222ab8f&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;key_id=0&amp;repo_id=56064194&amp;response-content-disposition=attachment%3B%20filename%3Domnidb-server_3.0.3b_linux_x86_64.deb&amp;response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.110.154, 185.199.111.154, 185.199.108.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.110.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 51477258 (49M) [application/octet-stream]
Saving to: ‘omnidb-server_3.0.3b_linux_x86_64.deb’

omnidb-server_3.0.3b_linux_x86_64.deb     100%[=====================================================================================>]  49.09M  52.5MB/s    in 0.9s

2021-08-04 15:08:36 (52.5 MB/s) - ‘omnidb-server_3.0.3b_linux_x86_64.deb’ saved [51477258/51477258]</pre>



<p class="has-line-data">At the time of writing this post, the latest stable version is <code>3.0.3b</code> so you should check the project website before doing anything.</p>



<p class="has-line-data">Then, install it like any other package</p>



<pre class="wp-block-preformatted">sudo apt install ./omnidb-server_3.0.3b_linux_x86_64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'omnidb-server' instead of './omnidb-server_3.0.3b_linux_x86_64.deb'
The following NEW packages will be installed:
  omnidb-server
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
Need to get 0 B/51.5 MB of archives.
After this operation, 53.0 MB of additional disk space will be used.
Get:1 /tmp/omnidb-server_3.0.3b_linux_x86_64.deb omnidb-server amd64 3.0.3 [51.5 MB]
Selecting previously unselected package omnidb-server.
(Reading database ... 28542 files and directories currently installed.)
Preparing to unpack .../omnidb-server_3.0.3b_linux_x86_64.deb ...
Unpacking omnidb-server (3.0.3) ...
Setting up omnidb-server (3.0.3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/omnidb.service → /etc/systemd/system/omnidb.service</pre>



<p class="has-line-data">When the process is finished, OmniDB will be ready to use.</p>



<h3 class="code-line"><a id="Configuring_OmniDB_30"></a>Configuring OmniDB Server</h3>



<p class="has-line-data">The OmniDB installation includes a Systemd service to manage the program.</p>



<p class="has-line-data">The first thing to do is to check the status of this service.</p>



<pre class="wp-block-preformatted">sudo systemctl status omnidb.service
● omnidb.service - OmniDB server daemon
     Loaded: loaded (/etc/systemd/system/omnidb.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-08-04 15:09:06 CEST; 1min 31s ago
    Process: 1466 ExecStart=/bin/bash -c /opt/omnidb-server/omnidb-server &amp; (code=exited, status=0/SUCCESS)
   Main PID: 1467 (omnidb-server)
      Tasks: 14 (limit: 4566)
     Memory: 266.9M
     CGroup: /system.slice/omnidb.service
             ├─1467 /opt/omnidb-server/omnidb-server
             └─1498 /opt/omnidb-server/omnidb-server

Aug 04 15:09:10 osradar bash[1498]:   Applying social_django.0008_partial_timestamp... OK
Aug 04 15:09:10 osradar bash[1498]:   Applying social_django.0009_auto_20191118_0520... OK
Aug 04 15:09:10 osradar bash[1498]:   Applying social_django.0010_uid_db_index... OK
Aug 04 15:09:10 osradar bash[1498]: Attempting to migrate users, connections and monitoring units and snippets from OmniDB 2 to 3...
Aug 04 15:09:10 osradar bash[1498]: Source database file does not contain the required tables, skipping...
Aug 04 15:09:10 osradar bash[1498]: Starting OmniDB server...
Aug 04 15:09:10 osradar bash[1498]: Checking port availability...
Aug 04 15:09:10 osradar bash[1498]: Starting server OmniDB 3.0.3b at 127.0.0.1:8000.
Aug 04 15:09:10 osradar bash[1498]: Open OmniDB in your favorite browser
Aug 04 15:09:10 osradar bash[1498]: Press Ctrl+C to exit</pre>



<p class="has-line-data">As you can see, it is running on <code>http://127.0.0.1:8000</code> but since we are installing it on a server, this is not useful.</p>



<p class="has-line-data">So, stop the service.</p>



<pre class="wp-block-preformatted">sudo systemctl stop omnidb.service</pre>



<p class="has-line-data">Now, initialize but with the <code>-p</code> options to define a port and <code>-H</code> to define the host.</p>



<pre class="wp-block-preformatted">omnidb-server -p 8080 -H 0.0.0.0.0
Attempting to migrate users, connections and monitoring units and snippets from OmniDB 2 to 3...
Source database file does not contain the required tables, skipping...
Starting OmniDB server...
Checking port availability...
Starting server OmniDB 3.0.3b at 0.0.0.0:8080.
Open OmniDB in your favorite browser
Press Ctrl+C to exit</pre>



<p class="has-line-data">Now yes. When you open the web browser and visit <code>http://ipserver:8080</code> you can see the login screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/08/1-2-1024x511.png" alt="1.- OmniDB login screen" class="wp-image-31589" srcset="https://www.osradar.com/wp-content/uploads/2021/08/1-2-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/08/1-2-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/08/1-2-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/08/1-2-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/08/1-2-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/08/1-2.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- OmniDB login screen</figcaption></figure>



<p class="has-line-data">Press <code>CTRL + C</code> to finish running OmniDB because we need to create a new user.</p>



<p class="has-line-data">This can be done as follows:</p>



<pre class="wp-block-preformatted">omnidb-server -u angelo 123456</pre>



<p class="has-line-data">Replace <code>angelo</code> with your username and <code>123456</code> with a more appropriate password.</p>



<p class="has-line-data">Now run it again and you will be able to log in. You will see the login screen and then the welcome screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/08/2-1-1024x511.png" alt="2.- OmniDB server on Ubuntu 20.04" class="wp-image-31590" srcset="https://www.osradar.com/wp-content/uploads/2021/08/2-1-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/08/2-1-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/08/2-1-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/08/2-1-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/08/2-1-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/08/2-1.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- OmniDB server on Ubuntu 20.04</figcaption></figure>



<p class="has-line-data">And you will be able to edit a connection.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/08/3-1024x511.png" alt="3.- Set a new Connection" class="wp-image-31591" srcset="https://www.osradar.com/wp-content/uploads/2021/08/3-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/08/3-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/08/3-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/08/3-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/08/3-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/08/3.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- Set a new Connection</figcaption></figure>



<h2 class="code-line"><a id="Optional_Using_Nginx_as_a_reverse_proxy_62"></a>Optional: Using Nginx as a reverse proxy</h2>



<p class="has-line-data">The default is that we have to use a reverse proxy like Nginx and from there manage the connection to OmniDB. This is very well detailed in the official documentation.</p>



<p class="has-line-data">So, if OmniDB is running, stop it. Either using the service or manually.</p>



<p class="has-line-data">Install Nginx</p>



<pre class="wp-block-preformatted">sudo apt install nginx</pre>



<p class="has-line-data">And create a new configuration file for Nginx</p>



<pre class="wp-block-preformatted">sudo nano /etc/nginx/sites-available/omnidb</pre>



<p class="has-line-data">Now add the following</p>



<pre class="wp-block-preformatted">server {
    listen 443 ssl;
    listen [::]:443 ssl;
    include snippets/ssl-domain.conf;
    include snippets/ssl-params.conf;
    server_name domain.org;
    client_max_body_size 75M;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Ssl https;
        proxy_set_header   X-Forwarded-Proto https;
        proxy_set_header   X-Forwarded-Port 443;
        proxy_set_header   Host $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}</pre>



<p class="has-line-data">Remember to replace <code>server_name</code> with your domain.</p>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">Check the Nginx syntax for an error.</p>



<pre class="wp-block-preformatted">sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful</pre>



<p class="has-line-data">For all this to work, it is necessary to edit the default OmniDB configuration file.</p>



<pre class="wp-block-preformatted">sudo nano ~/.omnidb/omnidb-server/config.py</pre>



<p class="has-line-data">And make sure to leave these values as follows</p>



<pre class="wp-block-preformatted">LISTENING_ADDRESS = '127.0.0.1'
LISTENING_PORT = 8000IS_SSL = False
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True</pre>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">The next step is to create an SSL certificate with Let’s Encrypt. So, install certbot and the Nginx plugin.</p>



<pre class="wp-block-preformatted">sudo apt install certbot python3-certbot-nginx</pre>



<p class="has-line-data">And generate the certificate</p>



<pre class="wp-block-preformatted">sudo certbot --nginx -d [domain]</pre>



<p class="has-line-data">Put your domain and accept the license terms and you are done.</p>



<p class="has-line-data">Finish the process by starting the OmniDB service and restarting Nginx.</p>



<pre class="wp-block-preformatted">sudo systemctl start omnidb
sudo systemctl restart nginx</pre>



<p class="has-line-data">Now login from your browser in a secure way.</p>



<h2 class="code-line"><a id="Conclusion_120"></a>Conclusion</h2>



<p class="has-line-data">Tools like OmniDB are very welcome because they allow us to have flexibility in accessing our databases. With this tool, you can set up a web interface that you can access from anywhere to manage a database anywhere. So, enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-omnidb-server-ubuntu-20-04/">Install OmniDB Server on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-omnidb-server-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
