Installing the Posgresql,postgis,pgrouting method in a Mac environment

Source: Internet
Author: User
Tags postgis postgres database

Cost Dickens, finally installed success ... All is a Mac pit, good window environment, not to change the MAC environment, causing the software configuration is extremely troublesome, window of the environment under the configuration will be a lot less things, their own trouble to bear it or. It's prudent to change your Mac, but you have to say that it feels good to use the MacBook Pro code.

Http://www.kyngchaos.com/software/postgres . Download Postgres, PostGIS, pgrouting files, version according to the above on the line. (currently pgrouting only support postgres9.3, the specific version is as follows)

1, install Postgres, do not set anything, directly down on the line,

sudo launchctl load/library/launchdaemons/ Org.postgresql.postgres.plist enter this command in the terminal, start the postgres, in fact, you install it automatically after the start, but if not started, or manually start the best. Also, if you have not previously configured Postgres, you will need to set the password for the login through the command line, if you have previously configured it, then the password may be retained. Here we go.

PS: If you want to manage through the command line, it is best to read the downloaded DMG file there is a Readme.rtf file, which will show you in detail how to enter the command line, as well as the default installation of DMG where the computer.  

2,http://www.postgresql.org/ftp/pgadmin3/release/v1.18.1/osx/ download Elephant, then install, this is through the graphical visual management Postgres, The command line master can omit this step, like I still rely on graphical visual management. Connect the Postgres database. This step can be placed after 3 and 4.

3, install the download PostGIS dmg file, the default installation can, how to use it? In the Pgadmin interface, first set up a postgres template database, create a new SQL query on this new point database, enter create EXTENSION PostGIS, the query will show success, but no results, as follows:

Then right-click on the database, refresh, you can see the change, function that column added 1050 functions, indicating PostGIS installation success.

4, the same way to install Pgrouting,sql query input Create EXTENSION pgrouting, refresh the database can see the addition of 32 functions, indicating that the pgrouting installation was successful.

5, the environment is configured well, the spatial data into the postgres, and then the use of pgrouting can be the shortest path analysis, enjoy it!

Can only say that the Mac really cost a lot of things to configure the environment. Previously installed with PostgreSQL's graphical installation interface (http://www.postgresql.org/download/macosx/ graphical installer), is the pgadmin and Postgres integrated into a piece, and then use application stack Builder installed PostGIS, but also can use, but when using pgrouting, but found no way to install, looking for a long time can only unload the installation, installed unloading, did not solve.

Also used homebrew installed, but has always been the command line, the head is big, did not make. (At this point I was thinking, with homebrew three are installed, and then set up a postgres password and account, and then install a pgadmin can also be used as above? But the project is no longer churn, this first use it.

PS: If you want to install this way, and want to use the command line operation must look at the readme.rtf file.

Installing the Posgresql,postgis,pgrouting method in a Mac environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.