centos6.3下postgresql-9.3安装记录
Xshell for Xmanager Enterprise 4 (Build 0186)
Copyright (c) 2002-2011 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
Xshell:\>
Connecting to 192.168.223.137:22...
Connection established.
Escape character is '^@]'.
Last login: Tue Jan 21 05:45:54 2014
/usr/bin/xauth: creating new authority file /home/sonny/.Xauthority
[sonny@localhost ~]$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
[sonny@localhost ~]$ yum install postgresql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[sonny@localhost ~]$ yum install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[sonny@localhost ~]$ wget http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
--2014-01-21 06:16:57-- http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
Resolving yum.postgresql.org... 98.129.198.114, 2001:4800:7903:3::114
Connecting to yum.postgresql.org|98.129.198.114|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5240 (5.1K) [application/x-redhat-package-manager]
Saving to: ?.gdg-centos93-9.3-1.noarch.rpm?
100%[=====================================================================================================================================================>] 5,240 --.-K/s in 0s
2014-01-21 06:16:57 (90.0 MB/s) - ?.gdg-centos93-9.3-1.noarch.rpm?.saved [5240/5240]
[sonny@localhost ~]$ ls
Desktop Downloads pgdg-centos93-9.3-1.noarch.rpm Public Videos
Documents Music Pictures Templates
[sonny@localhost ~]$ yum install pgdg-centos93-9.3-1.noarch.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[sonny@localhost ~]$ su root
Password:
[root@localhost sonny]# yum install pgdg-centos93-9.3-1.noarch.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.neusoft.edu.cn
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 1.3 MB 00:03
Setting up Install Process
Examining pgdg-centos93-9.3-1.noarch.rpm: pgdg-centos93-9.3-1.noarch
Marking pgdg-centos93-9.3-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-centos93.noarch 0:9.3-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================
Installing:
pgdg-centos93 noarch 9.3-1 /pgdg-centos93-9.3-1.noarch 2.1 k
Transaction Summary
===============================================================================================================================================================================================
Install 1 Package(s)
Total size: 2.1 k
Installed size: 2.1 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : pgdg-centos93-9.3-1.noarch 1/1
Verifying : pgdg-centos93-9.3-1.noarch 1/1
Installed:
pgdg-centos93.noarch 0:9.3-1
Complete!
[root@localhost sonny]# service postgresql-9.3 initdb
postgresql-9.3: unrecognized service
[root@localhost sonny]# chkconfig postgresql-9.3 on
error reading information on service postgresql-9.3: No such file or directory
[root@localhost sonny]# ls -l
total 40
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Desktop
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Documents
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Downloads
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Music
-rw-rw-r--. 1 sonny sonny 5240 May 8 2013 pgdg-centos93-9.3-1.noarch.rpm
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Pictures
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Public
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Templates
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Videos
[root@localhost sonny]# su sonny
[sonny@localhost ~]$ XXXXXXXXX
bash: XXXXXXXXX: command not found
[sonny@localhost ~]$ su sonny
Password:
[sonny@localhost ~]$ ls -l
total 40
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Desktop
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Documents
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Downloads
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Music
-rw-rw-r--. 1 sonny sonny 5240 May 8 2013 pgdg-centos93-9.3-1.noarch.rpm
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Pictures
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Public
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Templates
drwxr-xr-x. 2 sonny sonny 4096 Jan 19 04:05 Videos
[sonny@localhost ~]$ rpm -Uvh pgdg-centos93-9.3-1.noarch.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
[sonny@localhost ~]$ su root
Password:
su: incorrect password
[sonny@localhost ~]$ su root
Password:
[root@localhost sonny]# rpm -Uvh pgdg-centos93-9.3-1.noarch.rpm
Preparing... ########################################### [100%]
package pgdg-centos93-9.3-1.noarch is already installed
[root@localhost sonny]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# vi CenOS-Base.repo
[root@localhost yum.repos.d]# cd ..
[root@localhost etc]# cd ..
[root@localhost /]# ls
bin dev home lost+found mnt proc sbin srv tmp var
boot etc lib media opt root selinux sys usr
[root@localhost /]# cd usr
[root@localhost usr]# ls
bin etc games include lib libexec local sbin share src tmp
[root@localhost usr]# cd ..
[root@localhost /]# cd ..
[root@localhost /]# ls
bin dev home lost+found mnt proc sbin srv tmp var
boot etc lib media opt root selinux sys usr
[root@localhost /]# cd usr
[root@localhost usr]# ls
bin etc games include lib libexec local sbin share src tmp
[root@localhost usr]# cd ..
[root@localhost /]# ls
bin dev home lost+found mnt proc sbin srv tmp var
boot etc lib media opt root selinux sys usr
[root@localhost /]# cd home
[root@localhost home]# ls
sonny
[root@localhost home]# cd sonny
[root@localhost sonny]# ls
Desktop Downloads pgdg-centos93-9.3-1.noarch.rpm Public Videos
Documents Music Pictures Templates
[root@localhost sonny]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo pgdg-93-centos.repo
[root@localhost yum.repos.d]# vi CentOS-Base.repo
[root@localhost yum.repos.d]# vi CentOS-Base.repo
[root@localhost yum.repos.d]# yum upgrade postgresql-libs
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.neusoft.edu.cn
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
pgdg93 | 3.1 kB 00:00
pgdg93/primary_db | 81 kB 00:01
updates | 3.4 kB 00:00
Setting up Upgrade Process
No Match for argument: postgresql-libs
No package postgresql-libs available.
No Packages marked for Update
[root@localhost yum.repos.d]# yum install postgresql93-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.neusoft.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql93-server.i686 0:9.3.2-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql93 = 9.3.2-1PGDG.rhel6 for package: postgresql93-server-9.3.2-1PGDG.rhel6.i686
--> Processing Dependency: libpq.so.5 for package: postgresql93-server-9.3.2-1PGDG.rhel6.i686
--> Running transaction check
---> Package postgresql93.i686 0:9.3.2-1PGDG.rhel6 will be installed
---> Package postgresql93-libs.i686 0:9.3.2-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================
Package Arch Version Repository Size
=======================================================================================================
Installing:
postgresql93-server i686 9.3.2-1PGDG.rhel6 pgdg93 4.0 M
Installing for dependencies:
postgresql93 i686 9.3.2-1PGDG.rhel6 pgdg93 1.0 M
postgresql93-libs i686 9.3.2-1PGDG.rhel6 pgdg93 193 k
Transaction Summary
=======================================================================================================
Install 3 Package(s)
Total download size: 5.1 M
Installed size: 21 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): postgresql93-9.3.2-1PGDG.rhel6.i686.rpm | 1.0 MB 00:28
(2/3): postgresql93-libs-9.3.2-1PGDG.rhel6.i686.rpm | 193 kB 00:04
(3/3): postgresql93-server-9.3.2-1PGDG.rhel6.i686.rpm | 4.0 MB 02:01
-------------------------------------------------------------------------------------------------------
Total 34 kB/s | 5.1 MB 02:35
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : postgresql93-libs-9.3.2-1PGDG.rhel6.i686 1/3
Installing : postgresql93-9.3.2-1PGDG.rhel6.i686 2/3
Installing : postgresql93-server-9.3.2-1PGDG.rhel6.i686 3/3
Verifying : postgresql93-libs-9.3.2-1PGDG.rhel6.i686 1/3
Verifying : postgresql93-server-9.3.2-1PGDG.rhel6.i686 2/3
Verifying : postgresql93-9.3.2-1PGDG.rhel6.i686 3/3
Installed:
postgresql93-server.i686 0:9.3.2-1PGDG.rhel6
Dependency Installed:
postgresql93.i686 0:9.3.2-1PGDG.rhel6 postgresql93-libs.i686 0:9.3.2-1PGDG.rhel6
Complete!
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# service postgresql-9.3 initdb
Initializing database: [ OK ]
[root@localhost yum.repos.d]# service postgresql-9.3 start
Starting postgresql-9.3 service: [ OK ]
[root@localhost yum.repos.d]# service postgresql-9.3 restart
Stopping postgresql-9.3 service: [ OK ]
Starting postgresql-9.3 service: [ OK ]
[root@localhost yum.repos.d]# pssql -U postgres
bash: pssql: command not found
[root@localhost yum.repos.d]# psql -U postgres
psql: FATAL: Peer authentication failed for user "postgres"
[root@localhost yum.repos.d]# cd var
bash: cd: var: No such file or directory
[root@localhost yum.repos.d]# cd ..
[root@localhost etc]# cd ..
[root@localhost /]# ls
bin dev home lost+found mnt proc sbin srv tmp var
boot etc lib media opt root selinux sys usr
[root@localhost /]# cd var
[root@localhost var]# ls
account crash empty gdm local log nis preserve spool www
cache db games lib lock mail opt run tmp yp
[root@localhost var]# cd lib
[root@localhost lib]# ls
alternatives DeviceKit-power gdm NetworkManager polkit-1 readahead udev
authconfig dhclient logrotate.status ntp postfix rpm udisks
bluetooth dnsmasq misc PackageKit prelink rsyslog xkb
dav fprint mlocate pgsql pulse samba yum
dbus games net-snmp plymouth random-seed stateless
[root@localhost lib]# cd pgsql
[root@localhost pgsql]# ls
9.3
[root@localhost pgsql]# cd 9.3
[root@localhost 9.3]# ls
backups data pgstartup.log
[root@localhost 9.3]# cd data
[root@localhost data]# ls
base pg_hba.conf pg_multixact pg_snapshots pg_subtrans PG_VERSION postmaster.opts
global pg_ident.conf pg_notify pg_stat pg_tblspc pg_xlog postmaster.pid
pg_clog pg_log pg_serial pg_stat_tmp pg_twophase postgresql.conf
[root@localhost data]# vi pg_hba.conf
[root@localhost data]# psql -U postgres
psql: FATAL: Peer authentication failed for user "postgres"
[root@localhost data]# service postgresql-9.3 restart
Stopping postgresql-9.3 service: [ OK ]
Starting postgresql-9.3 service: [ OK ]
[root@localhost data]# pssql -U postgres
bash: pssql: command not found
[root@localhost data]# psql -U postgres
psql (9.3.2)
Type "help" for help.
postgres=# alter user postgres with password 'XXXXXXX'
postgres-# show user
postgres-# \q
[root@localhost data]#
感谢:张善友的分享http://www.cnblogs.com/shanyou/archive/2012/08/25/2656783.html
centos6.3下postgresql-9.3安装记录的更多相关文章
- Centos6 系统下源码方式安装Mysql 记录
在运维工作中经常部署各种运维环境,涉及mysql数据库的安装也是时常需要的.mysql数据库安装可以选择yum在线安装,但是这种安装的mysql一般是系统自带的,版本方面可能跟需求不太匹配. #### ...
- [转] Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置
from: http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得 ...
- Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置
原文:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...
- Centos6.9下RabbitMQ集群部署记录
之前简单介绍了CentOS下单机部署RabbltMQ环境的操作记录,下面详细说下RabbitMQ集群知识,RabbitMQ是用erlang开发的,集群非常方便,因为erlang天生就是一门分布式语言, ...
- CentOS6.4下Mysql数据库的安装与配置
原文连接:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 说到数据库,我们大多想到的是关系型数据库,比如 ...
- Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置(转)
原文地址:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建 ...
- Linux学习之CentOS(一)--CentOS6.6下Mysql数据库的安装与配置
在这里我是通过yum来进行mysql数据库的安装的,通过这种方式进行安装,可以将跟mysql相关的一些服务.jar包都给我们安装好,所以省去了很多不必要的麻烦!!! [root@larry ~]# c ...
- centos6.5下 hdp-2.4.2安装
(1)准备工作 /usr/sbin/sestatus -v getenforce1./usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态SE ...
- Centos6.5下Oracle 11g R2安装过程
1准备 CentOS-6.5-x86_64-bin-DVD1 linux_11gR2_database_1of2 linux_11gR2_database_2of2 VMware Workstatio ...
- CentOS6.2下fastDFS的完整安装和配置步骤
centos6.2系统下安装配置FastDFS步骤: 1:安装libevent(libevent-2.0.16-stable) ##卸载系统自带libevent rpm -qa|grep libeve ...
随机推荐
- SPOJ:Another Longest Increasing Subsequence Problem(CDQ分治求三维偏序)
Given a sequence of N pairs of integers, find the length of the longest increasing subsequence of it ...
- php之上传图片及传数据到mysql
index.html <form action="php.php" method="post" enctype="multipart/form- ...
- AngularJS系统学习之Factory,Service, Provider(工厂,服务,供应者)
本文转自:http://blog.csdn.net/zcl_love_wx/article/details/51404390 我看过敲过代码之后, 有了很深的理解, 这三个东西其实都是用来返回对象的. ...
- 【216】◀▶ IDL 字符串操作说明
参考:String Processing Routines —— 字符串处理函数 01 STRING 返回字符串. 02 STRCMP 比较字符串,一样返回1,不一样返回0,默认大小写敏感. ...
- Laravel中使用模型对数据进行操作
public function orm(){ //查询表的所有记录 //$user = Admin::all(); //dd($user); //查询某一条记录 //$user = Admin::fi ...
- git 回退到服务器版本操作
git fetch git reset orgin master --hard git pull
- Swift协议中类继承协议的mutating问题
之前实际开发的时候遇到的一个小问题,网上也没有找到相关说明.本来当时弄明白了想着记下来的,但是比较忙就耽搁了,趁今天休息记录一下. 首先,我们看一下下面这个两数之和的协议 protocol Test: ...
- 如何在html中引入jsx文件
不使用webpack工具做react项目 1.引入react相关js文件 <script src="https://cdn.staticfile.org/react/16.4.0/um ...
- meta标签常用属性
Keywords(关键词) 说明:告诉搜索引擎你网页的关键字(keywords)使用方法:<meta name="keywords" content="标签,属性, ...
- Qt测试代码执行时间
////////////////////////////////////////////////////////////////// QString _GetIntervalTime(QTime&am ...