如何创做网站阿里营销网站建设
news/
2025/9/24 0:03:35/
文章来源:
如何创做网站,阿里营销网站建设,网站开发的形式有多种方式,微信公众平台网页制作PostgreSQL是以加州大学伯克利分校计算机系开发的 POSTGRES, Version 4.2为基础的对象关系型数据库管理系统(ORDBMS)。POSTGRES开创的许多概念在很久以后才出现在商业数据库中。PostgreSQL是最初伯克利代码的一个开放源码的继承者。它支持大部分SQL标准并且提供了许多其它现代特…PostgreSQL是以加州大学伯克利分校计算机系开发的 POSTGRES, Version 4.2为基础的对象关系型数据库管理系统(ORDBMS)。POSTGRES开创的许多概念在很久以后才出现在商业数据库中。PostgreSQL是最初伯克利代码的一个开放源码的继承者。它支持大部分SQL标准并且提供了许多其它现代特性复杂查询外键触发器可更新的视图事务完整性多版本并发控制另外PostgreSQL可以用许多方法进行扩展比如通过增加新的数据类型函数操作符聚合函数索引方法过程语言在个人看来,在开源数据库中PostgreSQL 是和ORACLE最相近的一个,和ORACLE兼容性较好,如果去IOE,该数据库是一个不错的选择操作系统版本[rootweb103 ~]# more /etc/issueCentOS release 5.9 (Final)Kernel \r on an \m[rootweb103 ~]# uname -aLinux web103 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux下载对应PostgreSQL对应rpm包因为操作系统版本为CentOS 5.9的64位Linux,因此下载对应版本prm包,主要下载了server,client,contrib,libs四个包[rootweb103 ~]# mkdir pg[rootweb103 ~]# cd pg[rootweb103 pg]# wget http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-9.4.4-1PGDG.rhel5.x86_64.rpm--2015-06-16 20:44:52-- http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-9.4.4-1PGDG.rhel5.x86_64.rpmResolving yum.postgresql.org... 174.143.35.196, 2001:4800:1501:1::196Connecting to yum.postgresql.org|174.143.35.196|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 1807607 (1.7M) [application/x-redhat-package-manager]Saving to: postgresql94-9.4.4-1PGDG.rhel5.x86_64.rpm100%[] 1,807,607 73.6K/s in 30s2015-06-16 20:45:24 (58.1 KB/s) - postgresql94-9.4.4-1PGDG.rhel5.x86_64.rpm saved [1807607/1807607][rootweb103 pg]# wget http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-server-9.4.4-1PGDG.rhel5.x86_64.rpm--2015-06-16 20:45:35-- http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-server-9.4.4-1PGDG.rhel5.x86_64.rpmResolving yum.postgresql.org... 174.143.35.196, 2001:4800:1501:1::196Connecting to yum.postgresql.org|174.143.35.196|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 6175991 (5.9M) [application/x-redhat-package-manager]Saving to: postgresql94-server-9.4.4-1PGDG.rhel5.x86_64.rpm100%[] 6,175,991 58.5K/s in 2m 4s2015-06-16 20:47:42 (48.6 KB/s) - postgresql94-server-9.4.4-1PGDG.rhel5.x86_64.rpm saved [6175991/6175991][rootweb103 pg]# wget http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-contrib-9.4.4-1PGDG.rhel5.x86_64.rpm--2015-06-16 20:47:51-- http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-contrib-9.4.4-1PGDG.rhel5.x86_64.rpmResolving yum.postgresql.org... 174.143.35.196, 2001:4800:1501:1::196Connecting to yum.postgresql.org|174.143.35.196|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 664051 (648K) [application/x-redhat-package-manager]Saving to: postgresql94-contrib-9.4.4-1PGDG.rhel5.x86_64.rpm100%[] 664,051 28.1K/s in 53s2015-06-16 20:48:46 (12.3 KB/s) - postgresql94-contrib-9.4.4-1PGDG.rhel5.x86_64.rpm saved [664051/664051][rootweb103 pg]# wget http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-libs-9.4.4-1PGDG.rhel5.x86_64.rpm--2015-06-16 20:51:10-- http://yum.postgresql.org/9.4/redhat/rhel-5-x86_64/postgresql94-libs-9.4.4-1PGDG.rhel5.x86_64.rpmResolving yum.postgresql.org... 174.143.35.196, 2001:4800:1501:1::196Connecting to yum.postgresql.org|174.143.35.196|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 233206 (228K) [application/x-redhat-package-manager]Saving to: postgresql94-libs-9.4.4-1PGDG.rhel5.x86_64.rpm100%[] 233,206 70.3K/s in 3.2s2015-06-16 20:51:16 (70.3 KB/s) - postgresql94-libs-9.4.4-1PGDG.rhel5.x86_64.rpm saved [233206/233206][rootweb103 pg]# lspostgresql94-9.4.4-1PGDG.rhel5.x86_64.rpm postgresql94-libs-9.4.4-1PGDG.rhel5.x86_64.rpmpostgresql94-contrib-9.4.4-1PGDG.rhel5.x86_64.rpm postgresql94-server-9.4.4-1PGDG.rhel5.x86_64.rpm安装PostgreSQL rpm包[rootweb103 pg]# rpm -ivh *.rpmwarning: postgresql94-9.4.4-1PGDG.rhel5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 442df0f8Preparing... ########################################### [100%]1:postgresql94-libs ########################################### [ 25%]2:postgresql94 ########################################### [ 50%]3:postgresql94-contrib ########################################### [ 75%]4:postgresql94-server ########################################### [100%]创建PostgreSQL 默认库[rootweb103 pg]# service postgresql-9.4 initdbInitializing database: [ OK ][rootweb103 data]# pwd/var/lib/pgsql/9.4/data[rootweb103 data]# ls -ltrtotal 120-rw------- 1 postgres postgres 21265 Jun 16 20:52 postgresql.conf-rw------- 1 postgres postgres 88 Jun 16 20:52 postgresql.auto.confdrwx------ 3 postgres postgres 4096 Jun 16 20:52 pg_xlog-rw------- 1 postgres postgres 4 Jun 16 20:52 PG_VERSIONdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_twophasedrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_tblspcdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_subtransdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_snapshotsdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_serialdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_replslotdrwx------ 4 postgres postgres 4096 Jun 16 20:52 pg_multixactdrwx------ 4 postgres postgres 4096 Jun 16 20:52 pg_logical-rw------- 1 postgres postgres 1636 Jun 16 20:52 pg_ident.conf-rw------- 1 postgres postgres 4224 Jun 16 20:52 pg_hba.confdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_dynshmemdrwx------ 2 postgres postgres 4096 Jun 16 20:52 pg_clogdrwx------ 5 postgres postgres 4096 Jun 16 20:52 basedrwx------ 2 postgres postgres 4096 Jun 16 21:16 pg_logdrwx------ 2 postgres postgres 4096 Jun 16 21:16 global-rw------- 1 postgres postgres 80 Jun 16 21:39 postmaster.pid-rw------- 1 postgres postgres 59 Jun 16 21:39 postmaster.optsdrwx------ 2 postgres postgres 4096 Jun 16 21:39 pg_statdrwx------ 2 postgres postgres 4096 Jun 16 21:39 pg_notifydrwx------ 2 postgres postgres 4096 Jun 16 22:00 pg_stat_tmp另外还可以通过如下两种方式创建initdb -D /var/lib/pgsql/9.4/datapg_ctl -D /var/lib/pgsql/9.4/data设置PostgreSQL 开机自动启动[rootweb103 pg]# chkconfig postgresql-9.4 on[rootweb103 pg]# chkconfig --list|grep postpostgresql-9.4 0:off 1:off 2:on 3:on 4:on 5:on 6:off查看默认创建PostgreSQL 用户[rootweb103 data]# more /etc/passwd|grep postpostgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash增加PATH环境变量-bash-3.2$echo PATH$PATH:/usr/pgsql-9.4/bin;export PATH ~/.bash_profile启动PostgreSQL 数据库--方法1-bash-3.2$ postgres -D /var/lib/pgsql/9.4/data----或者-bash-3.2$ postgres -D /var/lib/pgsql/9.4/data ~/pg.log 21 方法2pg_ctl start -l ~/pg.log -D /var/lib/pgsql/9.4/data这里如果在环境变量中配置了PGDATA,那-D也可以不指定,-l为指定日志目录,建议使用封装的方法2启动pg查看PostgreSQL进程信息[rootweb103 data]# ps -ef|grep post|grep -v greppostgres 4432 1 0 21:39 ? 00:00:00 /usr/pgsql-9.4/bin/postgres -D /var/lib/pgsql/9.4/datapostgres 4433 4432 0 21:39 ? 00:00:00 postgres: logger processpostgres 4435 4432 0 21:39 ? 00:00:00 postgres: checkpointer processpostgres 4436 4432 0 21:39 ? 00:00:00 postgres: writer processpostgres 4437 4432 0 21:39 ? 00:00:00 postgres: wal writer processpostgres 4438 4432 0 21:39 ? 00:00:00 postgres: autovacuum launcher processpostgres 4439 4432 0 21:39 ? 00:00:00 postgres: stats collector process这里可以看到pg也和oracle有几分类似,有日志进程,checkpoint进程,有写进程等(具体以后分析)停止PostgreSQL数据库-bash-3.2$ pg_ctl stop -D /var/lib/pgsql/9.4/datawaiting for server to shut down.... doneserver stopped-bash-3.2$ ps -ef|grep post|grep -v greproot 6036 499 0 22:07 pts/0 00:00:00 su - postgrespostgres 6037 6036 0 22:07 pts/0 00:00:00 -bashpostgres 6113 6037 0 22:08 pts/0 00:00:00 ps -efPostgreSQL默认监听端口在后续章节中进一步讲解相关配置和访问[rootweb103 pgsql]# netstat -natp|grep postgrestcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 4432/postgres
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/914306.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!