在Ubuntu 18.04系统中安装TimescaleDB的方法
注意:由于本文示例就是用Postgre 10,如果您使用的是更新的版本,比如 PostgreSQL 14,安装timescale请参考以下步骤:
Installing self-hosted TimescaleDB on Debian-based systems
- At the command prompt, as root, add the PostgreSQL third party repository to get the latest PostgreSQL packages:
1apt install gnupg postgresql-common apt-transport-https lsb-release wget
- Run the PostgreSQL repository setup script:
1/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
- Add the Timescale GPG key:
1curl -L https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
- Add the TimescaleDB third party repository:(注意区分debian和Ubuntu使用不同命令)
12sh -c "echo 'deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main' > /etc/apt/sources.list.d/timescaledb.list"sh -c "echo 'deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main' > /etc/apt/sources.list.d/timescaledb.list" - Install Timescale GPG key
1wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | apt-key add -
- Update your local repository list:
1apt update
- Install TimescaleDB:
1apt install timescaledb-2-postgresql-14
NOTE
If you want to install a specific version of TimescaleDB, instead of the most recent, you can specify the version like this:bash apt-get install timescaledb-2-2.6.0-postgresql-12
You can see the full list of TimescaleDB releases by visiting our releases pagehttps://packagecloud.io/timescale/timescaledb
按照下面提供的方法在Ubuntu 18.04 LTS服务器中启动并运行TimescaleDB。 Continue reading