우리집

PostgreSQL 설치 및 접속 본문

Linux - Ubuntu

PostgreSQL 설치 및 접속

AJ Styles 2018. 2. 21. 14:33

1. https://www.postgresql.org/download/ 접속



2. 해당 리눅스 종류 및 버전 선택

ex) 우분투 16.04 버전의 경우, Xenial (16.04) 선택



3. 선택한 버전에 맞는 메뉴얼에 따라 설치

    To use the apt repository, follow these steps:

    • Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repositorydeb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
    • Import the repository signing key, and update the package listswget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
        sudo apt-key add -
      sudo apt-get update

    For more information about the apt repository, including answers to frequent questions, please see the apt page on the wiki.

    Included in distribution

    Ubuntu includes PostgreSQL by default. To install PostgreSQL on Ubuntu, use the apt-get (or other apt-driving) command:

    apt-get install postgresql-9.6

    The repository contains many different packages including third party addons. The most common and important packages are (substitute the version number as required):

    • postgresql-client-9.6 - client libraries and client binaries
    • postgresql-9.6 - core database server
    • postgresql-contrib-9.6 - additional supplied modules
    • libpq-dev - libraries and headers for C language frontend development
    • postgresql-server-dev-9.6 - libraries and headers for C language backend development
    • pgadmin3 - pgAdmin III graphical administration utility



4. psql 접속


4-1. sudo su - postgres

4-2. psql


'Linux - Ubuntu' 카테고리의 다른 글

Opencv-python 설치 In Python 3.7  (0) 2022.06.21
Python 3.7 설치 In Ubuntu 18.04  (0) 2022.06.21
SSH ROOT 계정 접속하기  (0) 2022.06.12
Python3-openCV 설치  (0) 2022.06.12
Putty 접속  (0) 2018.02.21
Comments