In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Dblink module installation
Log in to the primary node and switch to the GP user
[gpadmin@mdw ~] # su-gpadmin
Download the source code package, decompress it, and enter the dblink directory
[gpadmin@mdw ~] $wget https://ftp.postgresql.org/pub/source/v8.2.23/postgresql-8.2.23.tar.gz[gpadmin@mdw ~] $tar xvf postgresql-8.2.23.tar.gz [gpadmin@mdw ~] $cd postgresql-8.2.23/contrib/dblink/
Modify the Makefile file to remove warnings from compilation
[gpadmin@mdw dblink] $vi Makefile PG_CPPFLAGS =-I $(libpq_srcdir)-w
Compile the dblink module
[gpadmin@mdw dblink] $make USE_PGXS=1 install
View node information in hosts
[gpadmin@mdw dblink] $cat / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6172.16.104.21 mdw172.16.104.22 smdw172.16.104.23 sdw1172.16.104.24 sdw2172.16.104.25 sdw3
Copy the module to each node
[gpadmin@mdw dblink] $gpscp-h smdw-h sdw1-h sdw2-h sdw3 dblink.so =: / usr/local/greenplum-db/lib/postgresql/dblink.so
Initialize the dblink module
[gpadmin@mdw dblink] $psql-f dblink.sql gpdatabaseCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONREVOKEREVOKECREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE TYPECREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTION
test
[gpadmin@mdw dblink] $psql-d gpdatabasepsql (8.2.15) Type "help" for help.gpdatabase=# select dblink_connect ('myconn','dbname=gpdatabase'); dblink_connect-OK (1 row)
OK, installed successfully.
2. Install tablefunc module. The steps are basically the same as above.
Change to the tablefunc directory and compile
[gpadmin@mdw ~] $cd postgresql-8.2.23/contrib/tablefunc/ [gpadmin@mdw tablefunc] $make USE_PGXS=1 install
Transfer the module to each node
[gpadmin@mdw dblink] $gpscp-h smdw-h sdw1-h sdw2-h sdw3 tablefunc.so =: / usr/local/greenplum-db/lib/postgresql/tablefunc.so
Initialization module
[gpadmin@mdw tablefunc] $psql-f tablefunc.sql gpdatabaseSETCREATE FUNCTIONCREATE FUNCTIONCREATE TYPECREATE TYPECREATE TYPECREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTIONCREATE FUNCTION
test
[gpadmin@mdw] $psql-d gpdatabasepsql (8.2.15) Type "help" for help.gpdatabase=# select * from normal_rand (10,5,3); normal_rand-6.49804853868727 5.94780258015849 3.76292085922418 2.26097995785225 1.064747639215 1.839732257959 3.495591041885 3.95784964260771 7.32294513598636 9.51874065685311 (10 rows)
OK, installed successfully.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.