海之舟大資料作業系統,是個商業作業系統,預置了大量軟體,便于用戶快速建立大資料庫。隨作業系統的服務器高效,便宜。基于debian9改良,大資料庫基于postgresql-xl改良。
192.168.1.125 gtm 20001
所有節點在一個設備上。
coordinator1 30001 coordinator2 30002
pooler_port 30011 pooler_port 30012
datanode1 40001 datanode2 40002 datanode3 50001
pooler_port 40011 pooler_port 40012 pooler_port 50011
zs@bigdataA:~$ pgxc_ctl
/bin/bash
Installing pgxc_ctl_bash script as /home/zs/pgxc_ctl/pgxc_ctl_bash.
Installing pgxc_ctl_bash script as /home/zs/pgxc_ctl/pgxc_ctl_bash.
Reading configuration using /home/zs/pgxc_ctl/pgxc_ctl_bash --home /home/zs/pgxc_ctl --configuration /home/zs/pgxc_ctl/pgxc_ctl.conf
Finished reading configuration.
******** PGXC_CTL START ***************
Current directory: /home/zs/pgxc_ctl
PGXC prepare config empty
PGXC exit
zs@bigdataA:~$ cd h-soft
zs@bigdataA:~/h-soft$ ls
apt-get apt-key bashrc_bk deb java jsp logo.jpg logos pgxc_ctl.conf-all-in-one pgxc_ctl.conf-init php py sources-list.list
復制配置范例
zs@bigdataA:~/h-soft$ cp pgxc_ctl.conf-all-in-one /home/zs/pgxc_ctl/pgxc_ctl.conf
設定ssh免密碼登陸
zs@bigdataA:~/h-soft$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/zs/.ssh/id_rsa):
Created directory ‘/home/zs/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/zs/.ssh/id_rsa.
Your public key has been saved in /home/zs/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:aGBHHqYu3C6aM7ygKemfz4uz4OhrnB4wWvJgN/+GjSc zs@bigdataA
The key’s randomart image is:
±–[RSA 2048]----+
| + |
| = . |
| + o |
| . + o . |
|=.+oo o S |
|+*.oo. |
|=++ …+ |
|XOoo+E.+ |
|%X+=++=. |
±—[SHA256]-----+
zs@bigdataA:~/h-soft$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
zs@bigdataA:~/h-soft$ chmod 600 ~/.ssh/authorized_keys
zs@bigdataA:~/h-soft$ scp ~/.ssh/authorized_keys zs@datanode1:~/.ssh/
The authenticity of host ‘datanode1 (192.168.1.125)’ can’t be established.
ECDSA key fingerprint is SHA256:x9G1q0gI34qnEyWmhF/f922w0vzNz7TfTITJohFNdMs.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘datanode1,192.168.1.125’ (ECDSA) to the list of known hosts.
authorized_keys 100% 393 207.3KB/s 00:00
初始化資料庫
zs@bigdataA:~/h-soft$ pgxc_ctl -c /home/zs/pgxc_ctl/pgxc_ctl.conf init all
/bin/bash
Installing pgxc_ctl_bash script as /home/zs/pgxc_ctl/pgxc_ctl_bash.
Installing pgxc_ctl_bash script as /home/zs/pgxc_ctl/pgxc_ctl_bash.
Reading configuration using /home/zs/pgxc_ctl/pgxc_ctl_bash --home /home/zs/pgxc_ctl --configuration /home/zs/pgxc_ctl/pgxc_ctl.conf
Finished reading configuration.
******** PGXC_CTL START ***************
Current directory: /home/zs/pgxc_ctl
Initialize GTM master
The authenticity of host ‘gtm (192.168.1.125)’ can’t be established.
ECDSA key fingerprint is SHA256:x9G1q0gI34qnEyWmhF/f922w0vzNz7TfTITJohFNdMs.
Are you sure you want to continue connecting (yes/no)? yes
The files belonging to this GTM system will be owned by user “zs”.
This user must also own the server process.
fixing permissions on existing directory /home/zs/data/gtm … ok
creating configuration files … ok
creating control file … ok
Success.
Done.
Start GTM master
server starting
Initialize all the coordinator masters.
Initialize coordinator master coord1.
Initialize coordinator master coord2.
The authenticity of host ‘datanode2 (192.168.1.125)’ can’t be established.
ECDSA key fingerprint is SHA256:x9G1q0gI34qnEyWmhF/f922w0vzNz7TfTITJohFNdMs.
Are you sure you want to continue connecting (yes/no)? yes
The files belonging to this database system will be owned by user “zs”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.UTF-8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /home/zs/data/coord_master.1 … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … creating cluster information … ok
syncing data to disk … ok
freezing database template0 … ok
freezing database template1 … ok
freezing database postgres … ok
WARNING: enabling “trust” authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
–auth-local and --auth-host, the next time you run initdb.
Success.
The files belonging to this database system will be owned by user “zs”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.UTF-8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /home/zs/data/coord_master.2 … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … creating cluster information … ok
syncing data to disk … ok
freezing database template0 … ok
freezing database template1 … ok
freezing database postgres … ok
WARNING: enabling “trust” authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
–auth-local and --auth-host, the next time you run initdb.
Success.
Done.
Starting coordinator master.
Starting coordinator master coord1
Starting coordinator master coord2
2019-09-25 21:03:52.847 CST [2197] LOG: listening on IPv4 address “0.0.0.0”, port 30001
2019-09-25 21:03:52.848 CST [2197] LOG: listening on IPv6 address “::”, port 30001
2019-09-25 21:03:52.887 CST [2197] LOG: listening on Unix socket “/tmp/.s.PGSQL.30001”
2019-09-25 21:03:52.966 CST [2197] LOG: redirecting log output to logging collector process
2019-09-25 21:03:52.966 CST [2197] HINT: Future log output will appear in directory “pg_log”.
2019-09-25 21:03:52.832 CST [2192] LOG: listening on IPv4 address “0.0.0.0”, port 30002
2019-09-25 21:03:52.832 CST [2192] LOG: listening on IPv6 address “::”, port 30002
2019-09-25 21:03:52.868 CST [2192] LOG: listening on Unix socket “/tmp/.s.PGSQL.30002”
2019-09-25 21:03:52.945 CST [2192] LOG: redirecting log output to logging collector process
2019-09-25 21:03:52.945 CST [2192] HINT: Future log output will appear in directory “pg_log”.
Done.
Initialize all the datanode masters.
Initialize the datanode master dn1.
Initialize the datanode master dn2.
The files belonging to this database system will be owned by user “zs”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.UTF-8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /home/zs/data/dn_master.1 … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … creating cluster information … ok
syncing data to disk … ok
freezing database template0 … ok
freezing database template1 … ok
freezing database postgres … ok
WARNING: enabling “trust” authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
–auth-local and --auth-host, the next time you run initdb.
Success.
The files belonging to this database system will be owned by user “zs”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.UTF-8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /home/zs/data/dn_master.2 … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … creating cluster information … ok
syncing data to disk … ok
freezing database template0 … ok
freezing database template1 … ok
freezing database postgres … ok
WARNING: enabling “trust” authentication for local connectionsou can change this by editing pg_hba.conf or using the option -A, or
–auth-local and --auth-host, the next time you run initdb.
......
詳細參閱
https://blog.csdn.net/wxh585/article/details/101385462
uj5u.com熱心網友回復:
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/36643.html
標籤:高性能數據庫開發
上一篇:OpenCV4.0和MFC打開攝像頭出問題 畫面閃一下就沒了
下一篇:TensorFlow-GPU 2.0.0阿爾法版+annaconda3 5.2.0 64-bit(Python 3.6.5)安裝及遇到的wen
