LoginSignup
1
0

timescaledbバージョン指定

Last updated at Posted at 2024-03-06
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb
dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb
apt update
apt install -y zabbix-server-pgsql zabbix-frontend-php php8.1-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2

apt install -y gnupg postgresql-common apt-transport-https lsb-release wget
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
apt update

apt-get install -y timescaledb-2-postgresql-14='2.13*' timescaledb-2-loader-postgresql-14='2.13*'



apt-get update

apt-get install -y postgresql-client

vi /etc/postgresql/14/main/postgresql.conf
→shared_preload_librariesを編集
shared_preload_libraries = 'timescaledb'

systemctl restart postgresql

sudo -u postgres psql

\password postgres

\q

psql -U postgres -h localhost

CREATE database tsdb;

\c tsdb

CREATE EXTENSION IF NOT EXISTS timescaledb;

tsdb-# \dx
\q

sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix

echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix

zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix

vi /etc/zabbix/zabbix_server.conf
DBPassword=
vi /etc/zabbix/nginx.conf
コメントアウト
listen    8080;
server_name Zabbix ServerName
sudo apt install language-pack-ja-base language-pack-ja
locale -a

systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm
systemctl enable zabbix-server zabbix-agent nginx php8.1-fpm
systemctl status zabbix-server zabbix-agent nginx php8.1-fpm

systemctl kill apache2
systemctl disable apache2
systemctl status apache2
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0