TimescaleDB on the other hand is powered by PostgreSQL and can be used to analyze time-series data with a PostgreSQL query language. Timescale is like PostgreSQL but optimized for speed and scale. If you’re a seasoned database administrator and you want a database system that works like a traditional relational database, yet scales in ways like NoSQL databases, then TimescaleDB might be something to look at. To learn how to install PostgreSQL and TimescaleDB on Ubuntu, follow the steps below

Add PostgresSQL Repository to Ubuntu

Adding the PostgresSQL repository to Ubuntu is easy. all you have to run is run the commands below to add the repository key.,., the key is there to authenticate and validate packages from the repository. Run the commands below to add the repository key and the repository. When you’re done. continue below.

Update and Install PostgreSQL

Now that the repository and key are added, run the commands below to update and install the latest PostgresSQL packages. To install PostgreSQL 11, run the commands below After installing PostgreSQL, the commands below can be used to stop, start, enable and check its status This is what the status command shows

Create PostgreSQL Linux User Password.

After installing PostgreSQL, it’s a good idea to create/change the default PostgreSQL user password. Run the commands below to create/change the user password in the bash shell and not PostgreSQL interactive shell. Set password for Linux user (Postgres) You should be prompted to create a new Linux password for Postgres users. After setting a new password, every time you want to access PostgreSQL interactive shell, you’ll be prompted to confirm the password you created after running the commands above.

Access PostgreSQL

Now that PostgreSQL is installed, access its interactive shell and manage databases. you need to log in as a postgres user. to do that run the commands below: Then use the psql command in an interactive shell when you want to create and manage PostgreSQL databases. Set password for DB administrator (Postgres) On psql shell, run the below command to change the database admin password. After that, quit and exit.

Install TimescaleDB for PostgreSQL 11

Now that PostgreSQL is installed, run the commands below to install and configure TimescaleDB to use to manage your PostgreSQL server. Add TimescaleDB’s third-party repository and install TimescaleDB, which will download any dependencies it needs from the PostgreSQL repo: Now install the appropriate package for the PG version using the commands below: At a minimum, you will need to update your PostgreSQL. conf file to include our library to the parameter shared_preload_libraries. The easiest way to get started is to run timescaledb-tune, which is installed by default when you run the commands above. shared_preload_libraries = ‘timescaledb’ Run the commands below to enable TimescaleDB libraries and optimized PostgreSQL settings. Use the prompt below to answer the questions Doing that will ensure that the TimescaleDB extension is properly added to the parameter shared_preload_librariesas well as offer suggestions for tuning memory, parallelism, and other settings. When you’re done, log on to PostgreSQL and connect to TimesaleDB. Create a test database and extend its capabilities with TimescaleDB. You should see a similar screen as below: The database is TimescaleDB enabled! Congratulations! You have successfully installed PostgreSQL 11 with TimescaleDB on Ubuntu 16.04 | 18.04 You may also like the post below: