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 ...
随机推荐
- 「LOJ#10043」「一本通 2.2 例 1」剪花布条 (KMP
题目描述 原题来自:HDU 2087 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案.对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? 输入格式 输入数据 ...
- Subset Sums
链接 分析:dp[i][j]表示前i个数能够组成j的对数,可得dp[i][j]=dp[i-1][j]+dp[i-1][j-i],所以最后dp[n][sum/2]既是所求 /* PROB:subset ...
- Java并发实现线程阻塞原语LockSupport
LockSupport 和 CAS 是Java并发包中很多并发工具控制机制的基础,它们底层其实都是依赖Unsafe实现.LockSupport是用来创建锁和其他同步类的基本线程阻塞原语. 1.Lock ...
- 比利牛斯獒犬 flask web
1. 使用 session.get('name') 直接从会话中读取 name 参数的值.和普通的字典一样,这里使用 get() 获取字典中键对应的值以避免未找到键的异常情况,因为对于不存在的键, g ...
- 【217】◀▶ IDL 控制语句说明
参考:Statements Routines —— 控制语句关键字 01 FOR 循环语句. 02 FOREACH 循环语句. 03 WHILE...DO 循环语句. 04 IF... ...
- sass编译命令
sass编译一个文件的方式 sass xx.scss:xx.css 这种方式只能编译一次,要是想一直监控编译,只要有保存更改就会立即编译,那么就需要下面这条命令了 sass --watch xx.sc ...
- Linux编写Shell脚本入门
一. 一般编写shell需要分3个步骤 1. 新建一个脚本文件,并编写程序 vi hello.sh #!/bin/bash #注释 #输出 printf '%s\n' "Hello Worl ...
- 1 python----pycharm本地部署spark
下图相关工具连接 链接:https://pan.baidu.com/s/115XWf_Fc1yMiJytKJQXnFQ 密码:3jvr 好了,加油哟!
- 【Linux学习】Linux系统管理1—进程管理
Linux系统管理1-进程管理 一.Linux的三种进程 Linux包括3中不同类型的进程: 交互进程:由一个shell启动的进程.交互进程可以在前后台运行 批处理进程:该进程和终端无联系,是一个进程 ...
- Metatable In Lua 浅尝辄止
http://www.cnblogs.com/simonw/archive/2007/01/17/622032.html 什么是Metatable Lua中Metatable这个概念, 国内将他翻译为 ...