Web host sites - 590 CHAPTER 25 INSTALLING POSTGRESQL The chapters
590 CHAPTER 25 INSTALLING POSTGRESQL The chapters that follow go into significant detail regarding some of the concepts discussed in this section, so this is intended only as a brief overview to get you started. Note If you intend to operate PostgreSQL on any publicly accessible server, you are strongly urged to browse ahead to the opening sections of Chapter 29, which outline numerous steps that you should take to secure a PostgreSQL server. On both Linux and Windows, you can determine whether the daemon is presently running by using the pg_ctl command. On Linux the command should be executed like this: postgres$ pg_ctl status -D /usr/local/pgsql/data On Windows, you need to change the path accordingly, but the command is the same: %>pg_ctl status -D C:pgsqldata Tip You can forego specifying the data directory by setting the PGDATA environment variable, one of numerous variables that can affect your interaction with PostgreSQL. On Linux this is accomplished by modifying either /etc/profile, which makes the variable available to all users, or, for a specific user, the user s shellspecific configuration file (for example, .bash_profile). Then, either log out and log back in, or execute the source command if your shell supports it. On Windows this is accomplished by navigating to the Windows Control Panel directory and choosing the System panel. Click Advanced, and then Environment Variables. Click the New button, and assign PGDATA to the Variable name field, and assign the corresponding data path to the Variable value field. You ll need to log on and back off for these changes to take effect. If the daemon isn t running, you ll see the following message: pg_ctl: neither postmaster nor postgres running If the daemon is running, you ll see something to the effect of: pg_ctl: postmaster is running (PID: 4348) /usr/local/pgsql/bin/postmaster “-D” “/usr/local/pgsql/data” Because this is your first encounter with PostgreSQL, it s presumed that the server is offline. To start it, execute the following command: postgres$ pg_ctl start -D /usr/local/pgsql/data -l /usr/local/pgsql/logs/logfile &
You want to have a cheap webhost for your apache application, then check apache web hosting services.