[gpadmin@gp-master ~]$ cat .bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions source /usr/local/greenplum-db/greenplum_path.sh export MASTER_DATA_DIRECTORY=/data/greenplum_data/gpmaster/gpseg-1 export PGPRORT=5432 export PGDATABASE=testDB [gpadmin@gp-master ~]$ scp .bashrc gp-standby:`pwd`
启动和停止数据库测试是否能正常启动和关闭,命令如下
gpstart gpstop
到此 Greenplum 就部署完成了。下面进行一些简单的测试。
登录数据库:psql -d postgres
建表,插入,查询
postgres=# create table student ( no int primary key,student_name varchar(40),age int); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "student_pkey" for table "student" CREATE TABLE postgres=# insert into student values(1,'yayun',18); INSERT 0 1 postgres=# select * from student; no | student_name | age ----+--------------+----- 1 | yayun | 18 (1 row)
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx