代码拉取完成,页面将自动刷新
sudo gedit /etc/postgresql/9.5/main/postgresql.conf
将 #listen_addresses = 'localhost' 的注释去掉并改为 listen_addresses = '*'
sudo gedit /etc/postgresql/9.5/main/pg_hba.conf
在文件末尾添加: host all all 0.0.0.0 0.0.0.0 md5 ,表示允许任何IP连接
sudo /etc/init.d/postgresql restart
create user goldwind password 'Dbadmin123';
create database newras owner goldwind;
create database littler owner goldwind;
INSERT INTO "datakeeper_datasetmold" ("name","desc","note","schema","classname","tags","update_dt") VALUES ('wrf','wrf','wrf','wrf','datasets.dataset_molds.FG_WRF_S3.fg_wrf.FG_WRF_Dataset','fg_wrf','2016-05-05');
GO
INSERT INTO "datakeeper_datasetmold" ("name","desc","note","schema","classname","tags","update_dt") VALUES ('merra','merra','merra','merra',' datasets.dataset_molds.FG_MERRA_S3.fg_merra.FG_Merra_Dataset','fg_merra','2016-05-05');
GO
INSERT INTO "depot_depot" ("name","path","fstype","reserved","max_size","free_size","create_dt","access_dt","modify_dt") VALUES ('depottest','s3://windres-datasets/','s3','1',1024000,1024,'2017-06-24 12:55:36','2017-06-24 12:55:36','2017-06-24 12:55:37');
INSERT INTO "datakeeper_dataset" ("name","desc","creator","version","priority","public","free","protect_data","mold_id","info_json","depot_id","custom_root_path","size","update_dt") VALUES ('gw-c9a3','gw-c9a3','zb','1',1,'1','1','1','wrf','{
"name":"gw-c9a3",
"WRF_version": "",
"levels": ["10", "70", "80", "100"],
"years": ["2016"],
"begdt": "2016-01-01 01",
"enddt": "2023-12-31 23",
"wps_namelist": "/home/zb/work/glyc/googlemap/namelist.wps",
"pt_format":"h5","pd_stat_format":"nc","pm_stat_format":"nc","py_stat_format":"nc",
"domain_info": {
"1": {"available": true,
"priority": 1,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"2": {"available": true,
"priority": 2,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"3": {"available": true,
"priority": 3,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"4": {"available": true,
"priority": 4,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"5": {"available": true,
"priority": 5,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"6": {"available": true,
"priority": 6,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0},
"7": {"available": true,
"priority": 7,
"trim": 0,
"trim_bottom": 0,
"trim_left": 0,
"trim_right": 0,
"trim_top": 0}
}
}','depottest','/home/zb/work/glyc/googlemap/namelist.wps',10000000,'2017-06-24 12:56:50');
GO
CREATE OR REPLACE VIEW "public"."littler_point_round" AS
SELECT round(littler_littlepoint.latitude) AS latitude,
round(littler_littlepoint.longitude) AS longitude,
avg(littler_littlepoint.elevation) AS elevation
FROM littler_littlepoint
GROUP BY round(littler_littlepoint.latitude), round(littler_littlepoint.longitude);
CREATE OR REPLACE VIEW "public"."littler_point_round_minus025" AS
SELECT (round((littler_littlepoint.latitude / (5)::double precision)) * (5)::double precision) AS latitude,
(round((littler_littlepoint.longitude / (5)::double precision)) * (5)::double precision) AS longitude,
avg(littler_littlepoint.elevation) AS elevation
FROM littler_littlepoint
GROUP BY (round((littler_littlepoint.latitude / (5)::double precision)) * (5)::double precision), (round((littler_littlepoint.longitude / (5)::double precision)) * (5)::double precision);
CREATE OR REPLACE VIEW "public"."littler_point_round_minus1" AS
SELECT round((littler_littlepoint.latitude)::numeric, (-1)) AS latitude,
round((littler_littlepoint.longitude)::numeric, (-1)) AS longitude,
avg(littler_littlepoint.elevation) AS elevation
FROM littler_littlepoint
GROUP BY round((littler_littlepoint.latitude)::numeric, (-1)), round((littler_littlepoint.longitude)::numeric, (-1));
pg_dump -h 10.1.248.100 -p 5432 -U goldwind newras > /home/zb/20170830backup_file 备份
psql -h 10.1.248.100 -U goldwind -d newras < 20170830backup_file 恢复
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。