GraphQL Ubuntu
GraphQL
GraphQLのドキュメント「Getting Started」【日本語翻訳】
プリザンターをUbuntuにインストールする postgresql
PostgreSQLのセットアップ
sudo su - postgres
psql -U postgres
###PostgreSQLの管理ユーザー "postgres" のパスワードを設定
###Passwd643 no tame musi
###postgres=# alter role postgres with password 'SetSaPWD';
プリザンター用のデータベース作成
データベース "Implem.Pleasanter" を作成します。
postgres=# create database "Implem.Pleasanter";
全文検索用モジュール(pg_trgm)のインストール
テキストの全⽂検索に必要なモジュール(pg_trgm)をインストールします。
postgres=# \c "Implem.Pleasanter"
Implem.Pleasanter=# create extension pg_trgm;
koko kara プリザンターのセットアップ
gedit home/w1/web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json
/web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Rds.json
CodeDefinerの実行
cd /home/w1/web/pleasanter/Implem.CodeDefiner
dotnet Implem.CodeDefiner.NetCore.dll _rds
Pleasnterの起動確認
cd /home/w1/web/pleasanter/Implem.Pleasanter
dotnet Implem.Pleasanter.NetCore.dll
stop
Pleasanterサービス用スクリプトの作成
/etc/systemd/system/pleasanter.service を以下の内容で作成します。
->copy
サービスとして登録・サービスの起動
sudo systemctl daemon-reload
sudo systemctl enable pleasanter
sudo systemctl start pleasanter
初期アカウント
ログインID "Administrator" が初期ユーザーとして作成されます。
初期ユーザーのパスワードは、既定では"pleasanter"(※)です。初回ログイン時にパスワード変更ダイアログが表示されますので、任意のパスワードを設定してください。このパスワードは、"/web/pleasanter/Implem.Pleasanter/App_Data/Parameters/Service.json" の "DefaultPassword" で指定可能です。
pgadmin4 err
err
(sqlite3.IntegrityError) UNIQUE constraint failed: database.id, database.server
[SQL: INSERT INTO "database" (id, schema_res, server) VALUES (?, ?, ?)]
[parameters: (16384, '', 19)]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
[SQL: INSERT INTO "database" (id, schema_res, server) VALUES (?, ?, ?)]
[parameters: (16384, '', 19)]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
Download and install Zabbix PostgreSQL
Download and install Zabbix
a. Install Zabbix repository
wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
sudo apt update
err
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレードできるパッケージが 310 個あります。表示するには 'apt list --upgradable' を実行してください。
N: リポジトリ 'http://repo.zabbix.com/zabbix/5.0/ubuntu focal InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'main/binary-i386/Packages' の取得をスキップ
N: リポジトリ 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'main/binary-i386/Packages' の取得をスキップ
b. Install Zabbix server, frontend, agent
sudo apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-apache-conf zabbix-agent
c. Create initial database
sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix
d. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
sudo gedit /etc/zabbix/zabbix_server.conf
DBPassword=New_db_password
g. Configure Zabbix frontend
Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix
Follow steps described in Zabbix documentation: Installing frontend
127.0.0.1/zabbix
PostGraphile
-------------------------------------------------------
node.js
sudo apt update
sudo apt install nodejs
-------------------------------------------------------
npm install -g postgraphile
-------------------------------------------------------
PostgreSQLとPostGraphileでサクッとGraphQLエンドポイントを作成する
-------------------------------------------------------
sudo gedit !/usr/bin/env bash
#!/usr/bin/env bash
pnpx postgraphile \
--connection postgres:///postgres \
--watch
-------------------------------------------------------
‣ GraphQL API: http://localhost:5000/graphql
‣ Postgres connection: postgres://postgres:[SECRET]@localhost/mydb (watching)
‣ Postgres schema(s): public
‣ Documentation: https://graphile.org/postgraphile/introduction/
‣ Node.js version: v10.19.0 on linux x64
‣ Join Robert Claypool in supporting PostGraphile development: https://graphile.org/sponsor/
ubuntu20.04 pgAdmin4
ubuntu20.04にpostgreSQLとpgAdmin
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
sudo apt install pgadmin4
sudo /usr/pgadmin4/bin/setup-web.sh
mail
pass