|
IOTN :: Field Book :: PostgreSQL
|
install edb12 / pem / on docker centos:7 [ ±âº» Æ©´×, Create User, Tablespace, DB, Schema, archive]
|
ÃÖ±æÈ£
[LIST]
|
2020-07-20 22:17:53, Á¶È¸ : 590 |
## ÁøÇàÁß ¾Ë°ÔµÈ docker run --privileged ... init , /var/lib/edb µ¥ÀÌÅÍ ÆÄÀÏ À§Ä¡
docker run --privileged --name edb12 --hostname edb12 -dit \
-v /docker:/data/edb12 \
-v /docker/edb12/var/lib/edb:/var/lib/edb \
-v /docker/edb12/usr/edb:/usr/edb \
-p 5444:5444 -p 8443:8443 \
--cpus=2 --memory=10g --memory-swap=20g --shm-size=10g --shm-size=10g \
centos:7 init
docker exec -it edb12 bash
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
useradd -u 5444 enterprisedb
useradd -u 8443 apache
useradd -u 8444 pem
yum install -y boost-date-time boost-filesystem boost-regex boost-system boost-thread
yum install -y libevent* libedit*
yum install -y systemd-sysv openssl libxslt
yum install -y boost-atomic boost-chrono perl-libs tcl
yum update -y
[root@cent7 edb12]# ls
edb-as12-libicu-53.1-1.rhel7.x86_64.rpm edb-as12-server-pldebugger-1.1-1.rhel7.x86_64.rpm
edb-as12-pgagent-4.0.0-1.rhel7.x86_64.rpm edb-as12-server-plperl-12.3.4-1.rhel7.x86_64.rpm
edb-as12-server-12.3.4-1.rhel7.x86_64.rpm edb-as12-server-plpython-12.3.4-1.rhel7.x86_64.rpm
edb-as12-server-client-12.3.4-1.rhel7.x86_64.rpm edb-as12-server-pltcl-12.3.4-1.rhel7.x86_64.rpm
edb-as12-server-cloneschema-1.12-1.rhel7.x86_64.rpm edb-as12-server-sqlprofiler-4.0-1.rhel7.x86_64.rpm
edb-as12-server-contrib-12.3.4-1.rhel7.x86_64.rpm edb-as12-server-sqlprotect-12.3.4-1.rhel7.x86_64.rpm
edb-as12-server-core-12.3.4-1.rhel7.x86_64.rpm edb-as12-server-sslutils-1.3-1.rhel7.x86_64.rpm
edb-as12-server-devel-12.3.4-1.rhel7.x86_64.rpm libicu-edb-53.1-11.rhel7.x86_64.rpm
edb-as12-server-docs-12.3.4-1.rhel7.x86_64.rpm libmemcached-1.0.16-5.el7.x86_64.rpm
edb-as12-server-indexadvisor-12.3.4-1.rhel7.x86_64.rpm llvm5.0-5.0.1-7.el7.x86_64.rpm
edb-as12-server-libs-12.3.4-1.rhel7.x86_64.rpm llvm5.0-libs-5.0.1-7.el7.x86_64.rpm
edb-as12-server-llvmjit-12.3.4-1.rhel7.x86_64.rpm uuid-1.6.2-26.el7.x86_64.rpm
edb-as12-server-parallel-clone-1.7-1.rhel7.x86_64.rpm wxBase-2.8.12-20.el7.x86_64.rpm
[root@cent7 edb12]#
[root@cent7 edb12]# rpm -Uvh *
warning: edb-as12-libicu-53.1-1.rhel7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7e30651c: NOKEY
warning: llvm5.0-5.0.1-7.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:edb-as12-server-libs-12.3.4-1.rhe################################# [ 4%]
2:edb-as12-server-client-12.3.4-1.r################################# [ 8%]
3:uuid-1.6.2-26.el7 ################################# [ 12%]
4:edb-as12-server-contrib-12.3.4-1.################################# [ 15%]
5:llvm5.0-libs-5.0.1-7.el7 ################################# [ 19%]
6:edb-as12-libicu-53.1-1.rhel7 ################################# [ 23%]
7:edb-as12-server-core-12.3.4-1.rhe################################# [ 27%]
8:edb-as12-server-parallel-clone-1.################################# [ 31%]
9:edb-as12-server-plperl-12.3.4-1.r################################# [ 35%]
10:edb-as12-pgagent-4.0.0-1.rhel7 ################################# [ 38%]
11:edb-as12-server-cloneschema-1.12-################################# [ 42%]
12:edb-as12-server-indexadvisor-12.3################################# [ 46%]
13:edb-as12-server-pldebugger-1.1-1.################################# [ 50%]
14:edb-as12-server-plpython-12.3.4-1################################# [ 54%]
15:edb-as12-server-pltcl-12.3.4-1.rh################################# [ 58%]
16:edb-as12-server-sqlprofiler-4.0-1################################# [ 62%]
17:edb-as12-server-sqlprotect-12.3.4################################# [ 65%]
18:edb-as12-server-sslutils-1.3-1.rh################################# [ 69%]
19:llvm5.0-5.0.1-7.el7 ################################# [ 73%]
20:edb-as12-server-llvmjit-12.3.4-1.################################# [ 77%]
21:edb-as12-server-devel-12.3.4-1.rh################################# [ 81%]
22:edb-as12-server-docs-12.3.4-1.rhe################################# [ 85%]
23:edb-as12-server-12.3.4-1.rhel7 ################################# [ 88%]
24:libicu-edb-53.1-11.rhel7 ################################# [ 92%]
25:wxBase-2.8.12-20.el7 ################################# [ 96%]
26:libmemcached-1.0.16-5.el7 ################################# [100%]
[root@cent7 edb12]#
cat /usr/edb/as*/share/doc/README-rpm-dist.txt
## edb-as-12-setup initdb ¿¡·¯ °ü·Ã ¸Þ¸ð
[root@cent7 edb12]# /usr/edb/as12/bin/edb-as-12-setup initdb
Failed to get D-Bus connection: Operation not permitted ==> docker run --privileged ... init
failed to find PGDATA setting in edb-as-12.service
[root@cent7 edb12]#
## --privileged init
docker run --privileged .... init
docker exec -it edb12 bash
[root@edb12 /]#
/usr/edb/as12/bin/edb-as-12-setup initdb
Initializing database ... OK
## ¾ÈÇصµ µÈ´Ù.
##[root@edb12 /]#
##cp -v /usr/lib/systemd/system/edb-as-*.service /etc/systemd/system/
##systemctl daemon-reload
systemctl start edb-as-12
[root@edb12 /]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 13:08 ? 00:00:00 init
root 16 1 0 13:08 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 25 1 0 13:08 ? 00:00:00 /usr/lib/systemd/systemd-udevd
dbus 63 1 0 13:08 ? 00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-acti
root 64 1 0 13:08 ? 00:00:00 /usr/lib/systemd/systemd-logind
root 66 1 0 13:08 tty1 00:00:00 /sbin/agetty --noclear tty1 linux
root 77 0 0 13:08 pts/1 00:00:00 bash
enterpr+ 340 1 7 13:11 ? 00:00:00 /usr/edb/as12/bin/edb-postmaster -D /var/lib/edb/as12/data
enterpr+ 342 340 0 13:11 ? 00:00:00 postgres: logger
enterpr+ 344 340 0 13:11 ? 00:00:00 postgres: checkpointer
enterpr+ 345 340 0 13:11 ? 00:00:00 postgres: background writer
enterpr+ 346 340 0 13:11 ? 00:00:00 postgres: walwriter
enterpr+ 347 340 0 13:11 ? 00:00:00 postgres: autovacuum launcher
enterpr+ 348 340 0 13:11 ? 00:00:00 postgres: stats collector
enterpr+ 349 340 0 13:11 ? 00:00:00 postgres: dbms_aq launcher
enterpr+ 350 340 0 13:11 ? 00:00:00 postgres: logical replication launcher
root 356 77 0 13:11 pts/1 00:00:00 ps -ef
[root@edb12 /]#
[root@edb12 /]#
su - enterprisedb
cat >> ~/.bash_profile
# . /var/lib/edb/.bash_profile
export PATH=$PATH:/usr/edb/as12/bin:.
. ~/.bash_profile
createdb
-- PEM °èÁ¤ »ý¼º
psql
alter user enterprisedb PASSWORD 'admin';
create user pemadmin superuser CREATEDB CREATEROLE PASSWORD 'admin';
vi $PGDATA/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 0.0.0.0/0 md5
pg_ctl reload
-- Create User, Tablespace, DB, Schema
psql
create user webadmin password 'admin';
create tablespace webdata location '/data/edb12/webdata';
create database webdb template template0 LC_COLLATE 'C'
tablespace webdata owner webadmin ;
\l
\c webdb
\h create schema
create schema webadmin AUTHORIZATION webadmin;
\dn
-- ±âº» Æ©´×
http://iotn.co.kr/power/zboard.php?id=9_5_etc&no=33
-- archvie_mode
mkdir /data/edb12/arch
alter system set archive_mode=on;
alter system set archive_command = 'cp -i %p /data/edb12/arch/%f';
-- Á¤º¸ È®ÀÎ
cat $PGDATA/postgresql.auto.conf
## PEM ¼³Ä¡
yum install -y postgresql-libs
cp *pem*7.14* /docker/edb12/
cp snmp++-3.3.8-4.rhel7.x86_64.rpm /docker/edb12/
cp libcurl-pem-7.61.1-3.rhel7.x86_64.rpm /docker/edb12/
yum install -y edb-pem-server-7.14.0-3.rhel7.x86_64.rpm \
edb-pem-docs-7.14.0-3.rhel7.x86_64.rpm \
edb-pem-7.14.0-3.rhel7.x86_64.rpm \
edb-pem-agent-7.14.0-3.rhel7.x86_64.rpm \
libcurl-pem-7.61.1-3.rhel7.x86_64.rpm \
snmp++-3.3.8-4.rhel7.x86_64.rpm
NOTE : To complete the installation process, run '/usr/edb/pem/bin/configure-pem-server.sh'.
root #
rm -fr /usr/edb/pem/share/.install-config
/usr/edb/pem/bin/configure-pem-server.sh
-----------------------------------------------------
EDB Postgres Enterprise Manager
-----------------------------------------------------
Install type: 1:Web Services and Database, 2:Web Services 3: Database
1
Enter local database server installation path (i.e. /usr/edb/as10 , or /usr/pgsql-10, etc.)
/usr/edb/as12
Enter database super user name
pemadmin
Enter database server port number
5444
Enter database super user password
admin
Please enter CIDR formatted network address range that agents will connect to the server from, to be added to the server's pg_hba.conf file. For example, 192.168.1.0/24 0.0.0.0/0
Enter database systemd unit file or init script name (i.e. edb-as-10 or postgresql-10, etc.)
edb-as-12
Please specify agent certificate path (Script will attempt to create this directory, if it does not exists) ~/.pem/
## container
[root@edb12 edb12]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:43 ? 00:00:01 /usr/lib/systemd/systemd --system --deserialize 16
root 17 1 0 15:43 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 63 1 0 15:43 ? 00:00:00 /usr/lib/systemd/systemd-logind
dbus 64 1 0 15:43 ? 00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofo
root 66 1 0 15:43 tty1 00:00:00 /sbin/agetty --noclear tty1 linux
root 75 0 0 15:45 pts/1 00:00:00 bash
root 211 1 0 15:46 ? 00:00:00 /usr/lib/systemd/systemd-udevd
enterpr+ 1152 1 0 16:01 ? 00:00:00 /usr/edb/as12/bin/edb-postmaster -D /var/lib/edb/as12/d
enterpr+ 1153 1152 0 16:01 ? 00:00:00 postgres: logger
enterpr+ 1155 1152 0 16:01 ? 00:00:00 postgres: checkpointer
enterpr+ 1156 1152 0 16:01 ? 00:00:00 postgres: background writer
enterpr+ 1157 1152 0 16:01 ? 00:00:00 postgres: walwriter
enterpr+ 1158 1152 0 16:01 ? 00:00:00 postgres: autovacuum launcher
enterpr+ 1159 1152 0 16:01 ? 00:00:00 postgres: stats collector
enterpr+ 1160 1152 0 16:01 ? 00:00:00 postgres: dbms_aq launcher
enterpr+ 1161 1152 0 16:01 ? 00:00:00 postgres: logical replication launcher
root 1240 1 0 16:01 ? 00:00:00 /usr/edb/pem/agent/bin/pemagent -c /usr/edb/pem/agent/e
root 1241 1240 5 16:01 ? 00:00:09 /usr/edb/pem/agent/bin/pemworker -c /usr/edb/pem/agent/
enterpr+ 1278 1152 6 16:01 ? 00:00:11 postgres: agent1 pem 127.0.0.1[51666] idle
enterpr+ 1295 1152 0 16:01 ? 00:00:00 postgres: agent1 pem 127.0.0.1[51668] idle
enterpr+ 1311 1152 0 16:01 ? 00:00:00 postgres: pemadmin postgres 127.0.0.1[51672] idle
enterpr+ 1318 1152 1 16:01 ? 00:00:02 postgres: agent1 pem 127.0.0.1[51674] idle
enterpr+ 1319 1152 0 16:01 ? 00:00:00 postgres: agent1 pem 127.0.0.1[51676] idle
root 1706 1 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
pem 1707 1706 20 16:01 ? 00:00:25 EDBPEM -DFOREGROUND
apache 1708 1706 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1709 1706 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1712 1706 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1713 1706 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1714 1706 0 16:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1818 1706 0 16:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1853 1706 0 16:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1854 1706 0 16:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1855 1706 0 16:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1856 1706 0 16:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 1920 75 0 16:04 pts/1 00:00:00 ps -ef
[root@edb12 edb12]#
## main
root 10318 2 0 00:48 ? 00:00:00 [kworker/4:1]
root 10698 2 0 00:50 ? 00:00:00 [kworker/5:0]
root 12813 2 0 00:58 ? 00:00:00 [kworker/3:1]
root 13077 2 0 00:58 ? 00:00:00 [kworker/4:2]
root 13466 2 0 01:00 ? 00:00:00 [kworker/5:1]
enterpr+ 14087 7466 0 01:01 ? 00:00:00 /usr/edb/as12/bin/edb-postmaster -D /var/lib/edb/as12/d
enterpr+ 14092 14087 0 01:01 ? 00:00:00 postgres: logger
enterpr+ 14096 14087 0 01:01 ? 00:00:00 postgres: checkpointer
enterpr+ 14097 14087 0 01:01 ? 00:00:00 postgres: background writer
enterpr+ 14098 14087 0 01:01 ? 00:00:00 postgres: walwriter
enterpr+ 14099 14087 0 01:01 ? 00:00:00 postgres: autovacuum launcher
enterpr+ 14100 14087 0 01:01 ? 00:00:00 postgres: stats collector
enterpr+ 14101 14087 0 01:01 ? 00:00:00 postgres: dbms_aq launcher
enterpr+ 14102 14087 0 01:01 ? 00:00:00 postgres: logical replication launcher
root 14192 7466 0 01:01 ? 00:00:00 /usr/edb/pem/agent/bin/pemagent -c /usr/edb/pem/agent/e
root 14193 14192 5 01:01 ? 00:00:09 /usr/edb/pem/agent/bin/pemworker -c /usr/edb/pem/agent/
enterpr+ 14230 14087 6 01:01 ? 00:00:11 postgres: agent1 pem 127.0.0.1[51666] idle
enterpr+ 14247 14087 0 01:01 ? 00:00:00 postgres: agent1 pem 127.0.0.1[51668] idle
enterpr+ 14264 14087 0 01:01 ? 00:00:00 postgres: pemadmin postgres 127.0.0.1[51672] idle
enterpr+ 14271 14087 1 01:01 ? 00:00:02 postgres: agent1 pem 127.0.0.1[51674] idle
enterpr+ 14272 14087 0 01:01 ? 00:00:00 postgres: agent1 pem 127.0.0.1[51676] idle
root 14802 7466 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
pem 14803 14802 18 01:01 ? 00:00:25 EDBPEM -DFOREGROUND
apache 14804 14802 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 14805 14802 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 14808 14802 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 14809 14802 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 14810 14802 0 01:01 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 15006 14802 0 01:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 15151 14802 0 01:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 15152 14802 0 01:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 15153 14802 0 01:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 15154 14802 0 01:02 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 15492 2 0 01:03 ? 00:00:00 [kworker/4:0]
root 15548 2203 0 01:04 ? 00:00:00 sleep 60
root 15594 2744 0 01:04 ? 00:00:00 /bin/sleep 1
root 15596 26229 0 01:04 pts/3 00:00:00 ps -ef
postfix 21543 3027 0 Jul25 ? 00:00:00 pickup -l -t unix -u
root 21918 2728 0 Jul25 ? 00:00:09 sshd: root@pts/0
root 21932 21918 0 Jul25 pts/0 00:00:00 -bash
root 22050 21918 0 Jul25 ? 00:00:01 /usr/libexec/openssh/sftp-server
root 23491 2 0 00:03 ? 00:00:01 [kworker/u12:0]
root 24979 2 0 00:04 ? 00:00:00 [kworker/1:2]
root 26222 2728 0 Jul25 ? 00:00:00 sshd: root@pts/3
root 26229 26222 0 Jul25 pts/3 00:00:00 -bash
root 30219 2 0 00:20 ? 00:00:00 [kworker/u12:2]
[root@node1 ~]#
| 18.97.9.172
|
|
|
Copyright 1999-2024 Zeroboard / skin by ÃÖ±æÈ£(gilho.kr@gmail.com)
|
|
|