debian-installer came from the Debian netboot download.
The “Data Directory” refers to the directory that was just initialized (in this case myData). To do this use the command and substitute in for the specified values: pg_ctl -D -l start Now that the server is initialized and the log file is created, you can start the server from this directory. This will fill the myData directory with files necessary to run the server: To do this run the initdb command as shown: This means that we configure the directory and add the necessary files to run the server. Once the directory is created, the server can be initialized. For example, create a directory called myData in the home directory: To do this, first create a directory to be used as the server location. (Optional) Creating a Custom Data DirectoryĪ custom data directory can also be used for a server. This shows that the server has been started and can be connected to. Data can be loaded and deleted from the database.This will connect to the server and access the postgres database. It can now be accessed by typing the following command: The server will be run out of the directory /usr/local/var/postgres. This will start up a postgres server hosted locally on port 5432. Now that postgres is installed the default server can be started by running the command: pg_ctl -D /usr/local/var/postgres start This can be done by typing the following command into a terminal: Homebrew is a powerful package manager with many uses, including installing and running postgreSQL. Then ensure there are no conflicts or errors using: If Homebrew is already installed, make sure that it is up to date by running: Homebrew can be installed by running the following command in a terminal:
There are two main ways to install PostgreSQL on mac OS X.
How to Start a PostgreSQL Server on Mac OS X