概述
EnterpriseDB是全球唯一一家提供基于PostgreSQL企业级产品与服务的厂商
EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上,针对企业级应用进行了专门的优化,同时,增加了一系列如动态 性能调优(DynaTune)、EDB Loader、高效批量SQL处理等高级特性;在众多功能亮点中,EnterpriseDB的兼容性技术尤为惹眼,可以兼容oracle的数据库,目前,IBM 的DB2的数据库直接用EnterpriseDB的兼容包。
下载
EDB官网 www.enterprisedb.com
下载需要申请账号密码
本来是想选择最新的PG11,但是系统版本只是支持Windows,这里我们选择的是10.5,可以安装在Linux 64位系统上。
安装
将安装包上传
将安装包上传到已经准备好的系统上,并赋予执行权限
[root@stephen opt]# chmod +x edb-as10-server-10.5.12-1-linux-x64.run
执行run安装文件
[root@stephen opt]# ./edb-as10-server-10.5.12-1-linux-x64.run----------------------------------------------------------------------------Welcome to the EDB Postgres Advanced Server Setup Wizard.----------------------------------------------------------------------------Please read the following License Agreement. You must accept the terms of thisagreement before continuing with the installation.Press [Enter] to continue:Limited Use Software License AgreementVersion 2.9............................................(忽略这些声明)Press [Enter] to continue:Do you accept this license? [y/n]: y----------------------------------------------------------------------------Please specify the directory where EDB Postgres Advanced Server will beinstalled.Installation Directory [/opt/edb/as10]: /opt/edb/as10# 选择要安装到的路径,全路径,如例----------------------------------------------------------------------------Select the components you want to install; clear the components you do not wantto install. Click Next when you are ready to continue.# 手动选择一些需要安装的东西,这里我随便选了几样,可以根据需要选择安装EDB Postgres Advanced Server [Y/n] :ypgAdmin 4 [Y/n] :yStackBuilder Plus [Y/n] :nCommand Line Tools [Y/n] :yIs the selection above correct? [Y/n]: y----------------------------------------------------------------------------Additional DirectoriesPlease select a directory under which to store your data.Data Directory [/opt/edb/as10/data]: /sas_pgdataPlease select a directory under which to store your Write-Ahead Logs.Write-Ahead Log (WAL) Directory [/opt/edb/as10/data/pg_wal]: /opt/edb/as10/data/pg_wal# 这里是选择wal放的地方,理论上来说最好是将这个放在pgdata的位置,也就是数据目录里,我安装的时候没太注意,不过影响也不大,各位在安装的时候推荐放在数据目录下----------------------------------------------------------------------------Advanced Server DialectEDB Postgres Advanced Server can be configured in one of two "Dialects" - 1) Compatible with Oracle or 2) Compatible with Postgres.If you select Compatible with Oracle, Advanced Server will be configured with appropriate data type conversions, time and date formats, Oracle-styled operators, dictionary views and more. This makes it easier to migrate or write new applications that are more compatible with the Oracle database.If you select Compatible with Postgres, Advanced Server will be configured with standard PostgeSQL data types, time/date formats and operators.Advanced Server Dialect[1] Compatible with Oracle[2] Compatible with PostgresPlease choose an option [1] : 2#这里是选择高级服务器可以配置两种方言(Dialects),我更熟悉PG一点,所以选择2----------------------------------------------------------------------------Please provide a password for the database superuser (postgres). A locked Unixuser account (postgres) will be created if not present.#给postgres超级用户一个密码Password :Retype Password :----------------------------------------------------------------------------Additional ConfigurationPlease select the port number the server should listen on.Port [5432]: 5444# 因为安装的系统还有一个postgres数据库,选择换一个端口进行安装Select the locale to be used by the new database cluster.LocalePlease choose an option [1] :Would you like to install sample tables and procedures?Install sample tables and procedures. [Y/n]: y----------------------------------------------------------------------------Dynatune Dynamic Tuning:Server UtilizationPlease select the type of server to determine the amount of system resourcesthat may be utilized:#请选择服务器类型以确定系统资源的数量#[1]开发(例如开发人员的笔记本电脑)#[2]通用(例如web或应用服务器)#[3]专用的(只运行高级服务器的服务器)#这里我们只是安装测试,所以就选择1[1] Development (e.g. a developer's laptop)[2] General Purpose (e.g. a web or application server)[3] Dedicated (a server running only Advanced Server)Please choose an option [2] : 1----------------------------------------------------------------------------Dynatune Dynamic Tuning:Workload ProfilePlease select the type of workload this server will be used for:#选择工作概要#[1]事务处理(OLTP系统)#[2]通用(OLTP和报告工作负载)#[3]报告(复杂查询或OLAP工作负载)#选择安装数据库用来做工作的类型,我这里这里选择2[1] Transaction Processing (OLTP systems)[2] General Purpose (OLTP and reporting workloads)[3] Reporting (Complex queries or OLAP workloads)Please choose an option [1] : 2----------------------------------------------------------------------------Pre Installation SummaryThe following settings will be used for the installation::Installation Directory: /opt/edb/as10Server Installation Directory: /opt/edb/as10Data Directory: /sas_pgdataWAL Directory: /opt/edb/as10/data/pg_walDatabase Port: 5432Database Superuser: postgresOperating System Account: postgresDatabase Service: edb-as-10Command Line Tools Installation Directory: /opt/edb/as10pgAdmin4 Installation Directory: /opt/edb/as10/pgAdmin4Press [Enter] to continue:#确认安装信息----------------------------------------------------------------------------Setup is now ready to begin installing EDB Postgres Advanced Server on yourcomputer.Do you want to continue? [Y/n]: y----------------------------------------------------------------------------Please wait while Setup installs EDB Postgres Advanced Server on your computer.Installing EDB Postgres Advanced Server0% ______________ 50% ______________ 100%#########################################----------------------------------------------------------------------------Setup has finished installing EDB Postgres Advanced Server on your computer.#安装完毕
配置环境
新建用户edb
为了方便使用和管理,我们新建edb用户来使用edb。
useradd -U edb
然后将安装好的安装目录和数据目录赋予用户权限
chown -R edb:edb /opt/edb/chown -R edb:edb /sas_pgdata
配置环境变量
将新建的环境变量加到.bash_profile中
export PATH=/opt/edb/as10/bin:$PATHexport LD_LIBRARY_PATH=/opt/edb/as10/lib:$LD_LIBRARY_PATHexport PGDATA=/sas_pgdataexport PGHOST=/tmp
启动edb数据库
启动数据库
[edb@stephen ~]$ pg_ctl startwaiting for server to start....2018-12-03 11:01:01 CST LOG: listening on IPv4 address "0.0.0.0", port 54442018-12-03 11:01:01 CST LOG: listening on IPv6 address "::", port 54442018-12-03 11:01:01 CST LOG: listening on Unix socket "/tmp/.s.PGSQL.5444"2018-12-03 11:01:01 CST LOG: redirecting log output to logging collector process2018-12-03 11:01:01 CST HINT: Future log output will appear in directory "log".doneserver started
查看数据库是否正常
[edb@stephen ~]$ psql -UpostgresPassword for user postgres:psql.bin (10.5.12)Type "help" for help.postgres=#postgres=# \dList of relationsSchema | Name | Type | Owner--------+------------+----------+----------public | dept | table | postgrespublic | emp | table | postgrespublic | jobhist | table | postgrespublic | next_empno | sequence | postgrespublic | salesemp | view | postgres(5 rows)postgres=# \lList of databasesName | Owner | Encoding | Collate | Ctype | ICU | Access privileges-----------+----------+----------+-------------+-------------+-----+-----------------------postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | |template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | =c/postgres +| | | | | | postgres=CTc/postgrestemplate1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | =c/postgres +| | | | | | postgres=CTc/postgres(3 rows)postgres=# \q
查看数据库后台进程是否正常
[edb@stephen ~]$ ps -ef|grep edbpostgres 3668 1 0 10:45 ? 00:00:00 /opt/edb/as10/bin/edb-postgres -D /sas_pgdataroot 4007 2079 0 10:57 pts/1 00:00:00 su - edbedb 4008 4007 0 10:57 pts/1 00:00:00 -bashedb 4112 1 0 11:01 pts/1 00:00:00 /opt/edb/as10/bin/edb-postgresedb 4113 4112 0 11:01 ? 00:00:00 postgres: logger processedb 4129 4112 0 11:01 ? 00:00:00 postgres: checkpointer processedb 4130 4112 0 11:01 ? 00:00:00 postgres: writer processedb 4131 4112 0 11:01 ? 00:00:00 postgres: wal writer processedb 4132 4112 0 11:01 ? 00:00:00 postgres: autovacuum launcher processedb 4133 4112 0 11:01 ? 00:00:00 postgres: stats collector processedb 4134 4112 0 11:01 ? 00:00:00 postgres: bgworker: dbms_aq launcheredb 4135 4112 0 11:01 ? 00:00:00 postgres: bgworker: logical replication launcheredb 4165 4008 0 11:02 pts/1 00:00:00 ps -efedb 4166 4008 0 11:02 pts/1 00:00:00 grep --color=auto edb
本站文章,未经作者同意,请勿转载,如需转载,请邮件customer@csudata.com.
0 评论
添加一条新评论