Getting Started with EnterpriseDB

EnterpriseDB's Postgres Plus® products are ideally suited for transaction-intensive applications requiring superior performance, massive scalability, and compatibility with proprietary database products. Below you will find step-by-step instructions for installing and configuring Postgres Plus on popular operating systems and open source stacks.

  • Windows Installation


    Learn how to quickly install the Postgres Plus stack on a Windows environment.

    Postgres Plus is the world's most advanced open source database.

    This tutorial will lead you through the installation of Postgres Plus on Windows.

    EnterpriseDB is the world's leading commercial Postgres company. EnterpriseDB has developed installers that simplify the Postgres Plus installation process. These installers are available at www.enterprisedb.com.

    The Postgres Plus installer can be downloaded by clicking here.

    Some browsers will require you to click on the Information Bar to start the download.

    You will be asked if you want to save the download for installation later, or whether you want to open the archive and start the installation process right away.

    The installer is compressed for quicker downloads, so once the download is complete, you'll need to use your compression/uncompression tool of choice to uncompress the file

    Once you have extracted the installer, browse to the folder you extracted to and double click on the msi file to start the installation process (do not try to execute the installer from inside the archive or you'll see an error saying that the installer is not verified).

     

     

    When the installation begins, you can select the language to be used during the installation process, we will be using English

     

     

    Press NEXT on the panel below

     

     

    On the Installation Options panel, you will see that you can install two components, the Database Server, and Developer/Client Tools.

    Postgres is an open source project, and along with the database, there are a number of other useful projects and tools available. EnterpriseDB has bundled the most commonly used features into the Installer. Along Postgres Plus, we install the SLONY-I Replication System that provides asynchronous master/slave replication, and PostGIS geospatial extensions. In Developer/Client tools we install pgAdmin III, a graphical database development and management tool. We install psql, a powerful command line client. Additionally we install the .NET provider, ODBC and JDBC connectors and embedded C. We also provide a MySQL to Postgres Plus migration tool.

    This is a full function set of tools and facilities that get installed so that you can get productive as soon as the install finishes. If you find that you need any of the other components that can be used with Postgres Plus, the EnterpriseDB Community Center has many of them available as downloads, and has forums to help you with this process.

     

     

    In the panels above, we've outlined what each of these options give you. Go ahead and click NEXT

    The next panel allows you to create an account that will run the Postgres Plus service. You will be able to start and stop Postgres Plus from the Start Menu from the account that you are installing from.

    The account that is created in the step below is set up and configured properly to allow you to start and stop the windows services that Postgres Plus will use.

     

     

    If you see this panel, go ahead and grant 'Log on as a service' rights to this account. It allows you to log on and start and stop the service.

     

     

    This panel (if you see it) simply allows you to log on locally (i.e. on the machine you are installing Postgres Plus on), Go ahead and grant this right.

     

     

    EnterpriseDB has included several value added features into Postgres Plus. The first is installation tuning that optimizes the database based on your server configuration. The second is a notification service that helps you keep your installation up to date. We need to be able to get in contact with you to do this. If you are not already a user, you can create an account. If you are a returning user, enter your email address and password.

     

    When you select installation tuning, your database will be optimized based on how the server that the database will be installed on is being used, and the projected workload for the database.

     

     

    The installer is now ready to start creating the database (initdb), when you see this panel.

     

     

    When the Initialize database cluster checkbox is selected, the other options on this panel become active, from top to bottom they are:

     

    Option Description
    Port number This is the port that the Postgres process listens on. The default Postgres port is 5432. You can override this if you wish.
    Addresses This allows other computers to connect to your database
    Locale This sets the language that your database will use for things like system messages
    Encoding This sets how characters are stored in binary on the disk
    Superuser As described on the panel, this is NOT the Windows service account that you created previously, this is the database superuser. Once you have created the database, you need to be able to administer it (add users, create tables etc.) and this is the database account that is set up to do that.

    That's it, you'll see a panel that says you are now ready to install the database, click NEXT and the installation process will run to completion.

    When you see the panel below, click FINISH and you're all set to start using your database!

     

     

    To start using your database, click on START Then ALL PROGRAMS

    You'll see the following options for the Database Server:

     

     

    You'll see the following options for Developer & Client Tools:

     

     

    To see the Windows service for Postgres, click on START Then RUN Then type SERVICES.MSC (see below)

     

     

    And you will see the Windows Service for Postgres Plus, SLONY-I (Replication) and the Postgres Plus Scheduler.

     

  • Windows Apache/PHP Installation


    The Apache/PHP Stack is a pre-configured environment for deploying PHP based web application within the Postgres Plus environment. Learn how to quickly install the Postgres Plus Apache/PHP stack on a Windows environment.

    A database is a powerful tool on its own, but quite often it is invisible to the actual end user. Databases are used all over the place, and often they are used for the same type of general purpose - things like building a Content Management System (CMS) that can be used as an Information Portal for your organization, or creating a Wiki. Because these types of things are very common, there are a number of products available that bundle together all the components that you will need to do this for yourself. The idea is that you don't need to go through all the effort of developing these capabilities for yourself, you just install what you need and start working. For you to get going, there are some prerequisites. Obviously, you'll need a computer with an operating system. This brings us to the Application Stack.

    The first component is the operating system, Windows - you already have that (or you wouldn't be reading this).

    The next component is your database, Postgres Plus. You need the database to hold the information used in your CMS or Wiki (or whatever).

    You need a web server as well, Apache is an open source web server, this is what handles taking the data from your database and serving it up over the internet or intranet.

    Finally, you need a programming environment. This is what is used to manage the programs that work with the web server and database, and if you are really motivated it is where you'll build out new functionality yourself. This is PHP.

    There you have it, the application stack is really all the infrastructure that is needed to implement, develop, manage and maintain your database backed web enabled enterprise.

    There is a simple 3 step process that you need to start taking advantage of available open source projects that depend on an application stack. The first is that you have a database installed. If you have not already done this, this tutorial will show you how.

    The next step is that you install and configure your application stack, that is what this tutorial will show you.

    Finally, you'll install the CMS, Wiki, or whatever other project you need. There are many other tutorials in this series that will help you with this.

    So, now that you have your operating system and database set up and working, you need to download and install Apache and PHP

    Some browser will require you to click on the Information Bar to start the download.

    You will be asked if you want to save the download for installation later, or whether you want to open the archive and start the installation process right away.

    The installer is compressed for quicker downloads, so once the download is complete, youâll need to use your compression/uncompression tool of choice to uncompress the file.

    Once you have extracted the installer, browse to the folder you extracted to and double click on the msi file to start the installation process (do not try to execute the installer from inside the archive or you'll see an error saying that the installer is not verified).

     

     

    When you see this panel press NEXT

     

     

    You will see that the download will install Apache, PHP and phpPgAdmin on your computer. phpPgAdmin is a web-based administration tool for Postgres. If you are interested in knowing more about this product, you can click here.

     

     

    You will be asked for the port number that Apache will run on, 8080 is the default.

     

     

    You are now ready to install and configure Apache and PHP

     

     

    When you see this panel, you are done - you have installed and configured Apache and PHP, you are now ready to start using them.

     

     

    To see the Windows service for Apache, click on START Then RUN Then type SERVICES.MSC (see below)

     

     

    And you will see the Windows Service for Apache and PHP

     

     

    And you will also see the Windows Services for Postgres Plus that you installed earlier.

  • Get Started on the Windows Apache/PHP Stack


    The Apache/PHP Stack is a pre-configured environment for deploying PHP based web application within the Postgres Plus environment. Learn how to quickly get around the Postgres Plus Apache/PHP stack on a Windows environment.

    Go to C:\PostgresPlus\8.3\apache\conf

    and open httpd.conf with notepad, you'll see a section that looks like this:

    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    #
    #Listen 12.34.56.78:80
    Listen 8080
    

    Listen tells you the port number apache is running on.

     

    Postgres Plus

    Go to C:\Postgres Plus\8.3\data

    and open postgresql.conf with notepad, you'll see a section there that looks like this:

    #------------------------------------------------------------
    CONNECTIONS AND AUTHENTICATION
    #------------------------------------------------------------
    - Connection Settings -
    
    listen_addresses = '*'      # what IP address(es) to listen on;
                        # comma-separated list of addresses;
                        # defaults to 'localhost', '*' = all
                        # (change requires restart)
    port = 5432             # (change requires restart)
    

    Port tells you the port number Postgres Plus is running on.

     

    Stopping and Starting the Apache and Postgres Plus Services

    To Stop and Start Services on Windows (and see if they are running) run SERVICES.MSC

     

    You'll see the following entry for Postgres Plus, from here you can Start, Stop, Pause and Restart the Service

     

     

    You'll see the following entry for the Postgres Plus 8.3 Web Server (Apache), from here you can Start, Stop and Restart the Service

     

     

    It's easy to connect to the Web Server to see if it's working, simply go to your browser and go to the location http://localhost:8080

    If the Web Server is running, you'll see this:

     

     

     

    Using pgAdmin III with Postgres Plus

    pgAdmin III is a client tool that is bundled with Postgres Plus. It provides a full suite of tools to manage, administer and develop applications on your database.

    This is not a full fledged Tutorial on pgAdmin III, rather it takes you through the basics of starting the tool and logging into the database server.

    There are some pointers here on how to execute SQL, and how to create database objects like users and databases.

    This section is intended to be used in conjunction with tutorials for the installation of other products that need you to add users to Postgres Plus, create databases that are owned by these users, and then create schema objects (like Tables) from scripts (by executing the scripts in the Query Tool)

     

    First, you need to start pgAdmin III. You do this with

    you'll see this menu structure

     

     

    When pgAdmin III starts, you will see this panel

     

     

    You can optionally turn off "Tip of the Day"

    You connect to your Postgres Plus server by right clicking on it and selecting Connect, you need to enter your password.

     

     

    Once you are connected, you see this panel

     

     

    And if you click on the + to the left of your database server you'll see this pane that allows to to manage your database.

     

     

    Adding Users

    Adding a new user to your database is easy, you simply right click on Logon Roles, and select New Login Role

     

     

    You will presented with a panel that allows you to name the Login Role (user), and the privileges that this user will have

     

     

    Adding Databases

    To create a new database, right click on Databases and select New Database

     

     

    You will then see a panel where you can enter your database options, at a minimum all you need to do is name the database and assign an owner (i.e. the user you created earlier)

     

     

    Using the SQL Tool to run scripts

    If you have an SQL script that you have been given to run, it's easy to execute this in pgAdmin III. Here is a simple script

    select * from emp;
        

    You need to select the database that you will run this script against. This tutorial will use the demo database that is shipped with Postgres Plus.

     

     

    Go ahead and click on the SQL Icon on the toolbar   

    and you'll see this panel here - go ahead and paste your SQL into the Query Tool as below:

     

     

    then press the      Execute Query icon to execute your SQL script

    You'll see the results of your query in the Output Pane