. Installing PostgreSQL Enter the following command sudo apt-get install PostgreSQL You will be prompted to install the required disk space, enter "Y" and the Setup program will complete automatically. After installation, the system creates a database Superuser "Postgres" with a blank password. This user is both a non-logged operating system user and a database user. 2. Modify the password for Linux user Postgre
"Guide" This article is divided into two parts, the first part of my motives for this conversion, and step-by-step explanation of how the existing MySQL data into the postgres. The second part will explain how to adjust PHP to the new database system.
This article is divided into two parts, the first part describes my motives for this transformation, and explains Step-by-step how to convert existing MySQL data into
:
Install with. whl,: https://pypi.python.org/pypi/psycopg2/
Download file: psycopg2-2.6.2-cp27-none-win_amd64.whl
Here I copy the psycopg2-2.6.2-cp27-none-win_amd64.whl to the Scripts folder under the installation directory.
Run the code in cmd: pip install C: \ Python27 \ Scripts \ psycopg2-2.6.2-cp27-none-win_amd64.whl
Run the above Code to confirm whether the deletion is successful.
Psycopg2:
Use the account postgres to create the test database
-authorizationUse the session AUTHORIZATION command instead of the alter OWNER command to set ownershipJoin options:-H,--host= hostname or socket directory of the host name database server-P, port number of the--port= port number database server-U,--username= name to join the specified database user-W,--no-password never prompts to enter a password-W,--password force password prompt (automatic)--role=rolename do SET role before dumpIf no database name is provided, the value of the PGDATABASE env
-authorizationUse the SESSION AUTHORIZATION command instead of the alter OWNER command to set ownershipJoin options:-H, host name or socket directory for the--host= hostname database server-P,--port= port number of the database server-U,--username= names are joined with the specified database user-W,--no-password never prompt to enter a password-W,--password mandatory password prompt (automatic)--role=rolename do SET role before dumpIf the database name is not provided, the value of the PGDATABA
Install PostGIS in the source code of RedHat7
This article describes how to install and use PostGIS in RedHat7 environment.1. PostgreSQL1.1 install PostgreSQL in yum
This is relatively simple and can be directly installed using yum.
$ sudo yum install -y postgresql-server postgresql-devel libxml2 libxml2-devel
By the way, install postgresql-devel and libxml2-devel, which will be used for post compilation and installation of PostGIS.
postgresql.x86_64 9.2.13-1.1postgresql-devel.x86_
source to the APT source list. Create a file in the /etc/apt/source.list.d/ directory pgdg.list with the file content deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main This is the source for Ubuntu 14.04, and other versions of the system can find the relevant source in the document.Then import the signature of the source. $wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - The official source of PostgreSQL is now added to the source list. Next,
Step 1: Install Postgresql in Ubuntu
Sudo apt-get install postgresql-8.4 postgresql-client-8.4 postgresql-contrib-8.4Run the preceding command to install psql on the server and command line client.
/Usr/lib/postgresql/8.4/Stores postgresql-related binary files/Usr/lib/postgresql/8.4/bin/Executable File/Usr/lib/postgresql/8.4/lib/Shared Library File/Etc/postgres/8.4/main/stores the postgresql configuration file/Var/lib/postgresql/
Describes the range type features and PostgreSQL features in postgresql.
A new feature of PostgreSQL 9.2 is the range type range types. With this name, you can easily guess the purpose of this type. It allows you to define a value range for a column of data.
This simple feature eliminates the need to define two fields to describe the start value and end value of a value. The most intuitive example is:
postgres# CREATE TABLE salary_grid (id int, positi
Description: The following content is more about how to install the environment, the actual development of the content is almost no, you can consider whether to read this article.
PostgreSQL database should be regarded as the Venus of the database industry, some of them even more than Oracle and other business databases, in the open source world, can be said to be very good, even MySQL is very far from it. It supports ways to link databases including JDBC, ODBC, DBI, and so on, and can basically
postgres=# Create type Complex as (Postgres (# R Double Precision,Postgres (# I double precisionPostgres (#);CREATE TYPEpostgres=# Create type Inventory_item as (Postgres (# Name text,Postgres (# supplier_id Integer,Postgres (# pr
#读者注意: This article can choose not to read the explanation, directly execute the code in 0 of each paragraph(0): Some concepts (can skip direct use (i) 0 of the code)1. Client: Psql. PostgreSQL command-line client program that enters the PostgreSQL database at terminal input Psql2. Account: Unlike our commonly used MySQL, the Postgressql database is not required to select a database account, and PostgreSQL uses your current system account as a database account under Unix-like systems.By default,
After the installation is complete, we need to change the password of Postgres user, otherwise we will not be able to use this database server. Run the Psql command as the Postgres user. Enter the following in the terminal:
sudo su postgres -c psql template1
At this time, a new prompt will appear. Enter the following two commands and replace them with the new pa
already installed).
The default installation location for PostgreSQL is/usr/local/pgsql/, and the system files need 3-10m space. The accompanying test
Try
The program needs about 20M of space to run, so you should pay attention to reserving enough space when installing, suggest/USR/LOCAL/PG
sql/
The catalogue is guaranteed to have more than 50M space. In addition, expand and compile the source program approximately need 30-60m space.
For a multiuser application environment, it is recommended th
sufficient space in the installment, proposed/usr/local/pgsql/directory to guarantee has 50M above space. In addition, expand and compile the source program approximately need 30-60m space.
For a multiuser application environment, it is recommended that you set up a dedicated user name, such as Postgres:
$ su First log in as root
#/usr/sbin/adduser Postgres
In addition, PostgreSQL uses the shared memory me
directory and make the following changes:[Email protected] pg_xlog]$ Tail-2/data/pgsql100/data/pg_hba.conf#host replication postgres:: 1/128 Trusthost replication replica 10.0.0.110/32 MD5As above, this line of configuration means allowing users to replica from10.0.0.110/32A stream replication connection initiated to this database on the network, in short, allows the main library to be connected from the library server to drag the Wal log data. The m
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.