yum安装
This will install both TimescaleDB AND PostgreSQL 9.6 via yum (or dnf on Fedora).
通过yum (或者dnf on Fedora)安装TimescaleDB和PostgreSQL 9.6
必要条件
- Fedora 24 或更高版本, 或者
- CentOS 7 or 或更高版本
Build & Install
WARNING:If you have another PostgreSQL installation not via yum, this will likely cause problems. If you wish to maintain your current version of PostgreSQL outside of yum, we recommend installing from source. Otherwise please be sure to remove non-yum installations before using this method. You'll need to download the correct PGDG from Postgres for your operating system and architecture and install it:
注意:如果你已经安装了其他版本的PostgreSQL,按照以下步骤操作将会出现问题。如果你想保留PostgreSQL的当前版本,建议你从source进行安装。如果不想保留当前版本的话,操作以下步骤之前请卸载非yum的安装版本。请下载合适的PGDG确保操作系统,结构体系和安装能够正常进行:
# Download PGDG, e.g. for Fedora 24:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/9.6/fedora/fedora-24-x86_64/pgdg-fedora96-9.6-3.noarch.rpm
## Follow the initial setup instructions found below:
Further setup instructions are found here.
以下是安装说明。
Then, fetch our RPM and install it:
# Fetch our RPM
wget https://timescalereleases.blob.core.windows.net/rpm/timescaledb-0.5.0-0.x86_64.rpm
# To install
sudo yum install timescaledb
更新Postgresql.conf
Also, you will need to edit your postgresql.conf file to include necessary libraries:
此外,你需要编辑postgresql.conf文件增加必要的库。
# Modify postgresql.conf to uncomment this line and add required libraries.
# 修改postgresql.conf文件去掉这一行的注释
# For example:
# 例如:
shared_preload_libraries = 'timescaledb'
TIP:The usual location of
postgres.conf
is /var/lib/pgsql/9.6/data/postgresql.conf
but this may vary depending on your setup.
提示:一般postgres.conf
文件路径为/var/lib/pgsql/9.6/data/postgresql.conf
,但是设置方式不同,路径也会有所不同。
To get started you'll now need to restart PostgreSQL and add a postgres superuser (used in the rest of the docs):
开始之前需要重启PostgreSQL并且添加一个postgres超级用户(在其他docs中使用的)
# Restart PostgreSQL instance (this is distribution-specific)
# Add a superuser postgres:
createuser postgres -s
Next we will setup the database, either with an empty hypertable, or by migrating data from another source
接下来,设置数据库,可以使用一个空的hypertable,也可以从另一个数据库中迁移数据。
局限性
For a list of currently known limitations, please see our Github page:
局限性详见Github
- Github issues