Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ To install PostgreSQL 9.4     - shell script: LVS start simple script (Server)

- Fedora 22 users to install the VLC media player (Linux)

- Java collections series (Programming)

- Examples of Python any parameters (Programming)

- Implement binary search algorithm in C language (Programming)

- To compile and install MySQL 5.7.7 RC under CentOS 7.1 (Database)

- LVM management reduces swap partition space to the root partition (Linux)

- MongoDB3.0.6 wiredtiger MMAPv1 (Database)

- Squid proxy server configuration under Linux (Server)

- Ubuntu user use PPA to install Uget 2.0.5 (Linux)

- Linux6.1 / 6.5 dual-NIC Binding (Linux)

- Oracle 11g new features of the collection of multi-column statistics (Database)

- Bootable ISO image using GRUB (Linux)

- linux remote control software (Linux)

- DataGuard a hardware issue warnings found (Database)

- Ubuntu How to install Pacman (Linux)

- GAMIT learning materials finishing (Linux)

- Python Flask environment to build (Linux)

- Ubuntu 12.04 installation OpenCV2.4.1 and compile test (Linux)

- Service manager OpenBSD on rccl (Server)

 
         
  To install PostgreSQL 9.4
     
  Add Date : 2018-11-21      
         
         
         
  Linux installation PostgreSQL 9.4 process notes, we hope to be useful.

I. Introduction

PostgreSQL is also commonly referred to as Postgres, is a relational database management system for a variety of Linux operating systems, Windows, Solaris, BSD and Mac OS X. PostgreSQL is an open source software that is licensed under PostgreSQL. PostgreSQL was developed by the PostgreSQL Global Development Group, which is composed and managed by a handful of companies, including Red Hat, EnterpriseDB, and others.

PostgreSQL's popularity is growing, and it's justified: it's so reliable and efficient. Compared with the traditional enterprise-level relational database, PostgreSQL is completely based on community-driven, has a wealth of tools and documentation, forming a complete ecosystem.

Most of the current CentOS installation is used for Centos6.X part of the command has changed a lot, this article mainly records in the Linux Centos 7.1 to install PostgreSQL process.

Second, install the PostgreSQL source

CentOS 6.x 32bit

Rpm - Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-i386/pgdg-centos94-9.4-1.noarch.rpm

CentOS 6.x 64bit

Rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm

CentOS 7 64bit

Rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm

      In the steps of adding the source and not too many differences, mainly the source address of a certain change.

Third, the implementation of the installation command

Yum update

Yum install postgresql94-server postgresql94-contrib

Fourth, verify whether the installation is successful

Rpm -aq | grep postgres

The results are as follows:

Postgresql94-libs-9.4.1-1PGDG.rhel7.x86_64
Postgresql94-server-9.4.1-1PGDG.rhel7.x86_64
Postgresql94-9.4.1-1PGDG.rhel7.x86_64
Postgresql94-contrib-9.4.1-1PGDG.rhel7.x86_64

Fifth, initialize the database

CentOS 6.x system

Service postgresql-9.4 initdb

CentOS 7 system

/usr/pgsql-9.4/bin/postgresql94-setup initdb

If I am in the implementation of service postgresql-CentOS 7 initdb will report the following questions

The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

6, start the service and set to boot

CentOS 6.x system

Service postgresql-9.4 start
Chkconfig postgresql-9.4 on

CentOS 7 system

Systemctl enable postgresql-9.4
Systemctl start postgresql-9.4

7, open the firewall port

CentOS 6.x system

Vi / etc / sysconfig / iptables

Press I to enter the input mode, add some statements in the file

-A INPUT -m state --state NEW -m tcp -p tcp -dport 5432 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -dport 80 -j ACCEPT

Press ESC to exit the edit mode after entering, and enter: wq to exit the VI editing interface.

Restart the firewall service

Service iptables restart

CentOS 7 system

Firewall-cmd --permanent --add-port = 5432 / tcp
Firewall-cmd --permanent --add-port = 80 / tcp
Firewall-cmd --reload

Visit PostgreSQL

Su - postgres

The output is as follows:

Last Login: 1 May 18 15:17:29 CST 2015pts / 0 on
-bash-4.2 $

Enter the command psql will see the version of PostgrSQL information.

Psql (9.4.1)
Enter "help" for help.

9. Set the postgres user password

Postgres = # password postgres
     
         
         
         
  More:      
 
- PHP generates a random password several ways (Programming)
- CentOS How to mount the hard drive (Linux)
- Source code is installed MySQL 5.6.28 (Database)
- Linux and Windows Security Topics (Linux)
- Java String and StringBuffer and StringBuilder Comments (Programming)
- Tab set to four spaces in Vim (Linux)
- Ubuntu install Avast antivirus software (Programming)
- 10 Codes of good practice PHP (Programming)
- What is Java EE (Programming)
- By creating a personal technology blog Detailed GitHub (Linux)
- Linux (CentOS) directory file management and file system file compression packing (Linux)
- Oracle 11G R2 DataGuard structures (Database)
- Linux Mint 17 set up the Ruby environment (Linux)
- Ubuntu modify locale problem solving (Linux)
- Linux compiler of GCC (Linux)
- Workspace Go language and environment variables GOPATH (Linux)
- Spark local development environment to build (Server)
- C ++ Supplements --new delete overload (Programming)
- Ubuntu in Vim editor display processing method Chinese garbled (Linux)
- Python pickle module for simple use notes (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.