0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Confluenceサーバーのpostgreを構築したときのメモ

Posted at

pgadmin を使えばGUIで確認できる

バージョン情報

PostgreSQL インストール方法

yum install postgresql-server postgresql-devel postgresql-contrib -y

postgresql-setup initdb

systemctl start postgresql.service
systemctl enable postgresql.service

su - postgres

psql;
create database confluence;
終了は ¥q

バージョン確認:psql --version

version 10

postgres 11

バージョン12 cpu使用率が200%超えていた 不安定だな

設定変更

sudo -u postgres psql -l

$ sudo cp /var/lib/pgsql/data/postgresql.conf /var/lib/pgsql/data/postgresql.conf.bak
$ sudo vim /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*'

cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak
vim /var/lib/pgsql/data/pg_hba.conf
localhost all all peer の peerを trustへ
host all all 127.0.0.1/32 ident → host all all 0.0.0.0/0 trust へ変更
sudo passwd postgres
TQkLCyVafB8GTx
reboot

最初はインバウンドルールをすべてのトラフィックをあけないとだめ?

リスト
$ su - postgres
TQkLCyVafB8GTx
psql -l
dropdb confluence
psql -l
createdb confluence

https://qiita.com/pugiemonn/items/75870ece3c8476bcb1c8
http://www.kodnet.co.jp/blog/confluence/2015/2341/

postgreの操作
https://blog.clock-up.jp/entry/2014/12/30/centos-postgresql

心残り
postgreip制限したい

PostgreSQLで強制的にデータベースを削除する - Qiita
https://qiita.com/sayama0402/items/b3d96c25ecb60733beb9

postgresデータの移行

sudo su

$ su - postgres
psql -l

pg_dump jira > jira.dump をする

pg_dump -U postgres -d jira > jira.dump  それか、pg_dump -d confluence -Fc -U postgres -f confluence.dump
https://qiita.com/hondy12345/items/47eb6a104a99170ae7aa

を行い
filezillaで取る

インポート

sudo su

psql -U postgres jira < jira.dump   それか、 pg_restore -d jira jira.dump

DB消す時

DROP DATABASE confluence;

今 posgresSQL10.4
コンフル上で
https://db-study.com/archives/133
1、cuiでdumpする
2、guiでdumpする postgre my admin
https://torazuka.hatenablog.com/entry/20100415/pg
https://qiita.com/11ohina017/items/edb7d7a0812908200a0a
3、xmlと添付ファイルを保存して、appとdb全てインストールし直す
4、バックアップ.zipから、appとdb全てインストールし直す
5、ソースフォルダを移行して、appとdb全てインストールし直す

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?