Install self-hosted TimescaleDB on archlinux-based systems
You can host TimescaleDB yourself, on your Arch Linux system. These
instructions use the
pacman package manager.
If you have already installed PostgreSQL using a method other than the
pacman package manager, you could encounter errors following these instructions. It is safest to remove any existing PostgreSQL installations before you begin. If you want to keep your current PostgreSQL installation, do not install TimescaleDB using this method. Install from source instead.
Installing self-hosted TimescaleDB on archlinux-based systems
- Install TimescaleDB and timescaledb-tune:
sudo pacman -Syu timescaledb timescaledb-tune
- Initialize the database as the postgres user:
sudo -u postgres initdb --locale=en_US.UTF-8 --encoding=UTF8 -D /var/lib/postgres/data --data-checksums
- Run timescaledb-tune to adjust your
postgresql.conffile, to use TimescaleDB as PostgreSQL extension:
- Enable and start the service:
sudo systemctl enable postgresql.service sudo systemctl start postgresql.service
When you have PostgreSQL and TimescaleDB installed, you can connect to it from
your local system using the
psql command-line utility. This is the same tool
you might have used to connect to PostgreSQL before, but if you haven't
installed it yet, check out the installing psql section.
Setting up the TimescaleDB extension
- On your local system, at the command prompt, connect to the PostgreSQL
instance as the
postgressuperuser:If your connection is successful, you'll see a message like this, followed by the
sudo -u postgres psql
psql (14.3) Type "help" for help.
- At the
psqlprompt, create an empty database. This database is called
CREATE database tsdb;
- Connect to the database you created:
- Add the TimescaleDB extension:
CREATE EXTENSION IF NOT EXISTS timescaledb;
- You can now connect to your database using this command:
sudo -u postgres psql tsdb
You can check that the TimescaleDB extension is installed by using the
command at the
psql prompt. It looks like this:
tsdb=# \dx List of installed extensions Name | Version | Schema | Description -------------+---------+------------+------------------------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language timescaledb | 2.7.0 | public | Enables scalable inserts and complex queries for time-series data (2 rows)
Now that you have your first TimescaleDB database up and running, you can check out the TimescaleDB section in the documentation, and find out what you can do with it.
If you want to work through some tutorials to help you get up and running with TimescaleDB and time-series data, check out the tutorials section.
You can always contact us if you need help working something out, or if you want to have a chat.
Found an issue on this page?Report an issue!