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安装记录的更多相关文章

  1. Centos6 系统下源码方式安装Mysql 记录

    在运维工作中经常部署各种运维环境,涉及mysql数据库的安装也是时常需要的.mysql数据库安装可以选择yum在线安装,但是这种安装的mysql一般是系统自带的,版本方面可能跟需求不太匹配. #### ...

  2. [转] Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    from:  http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得 ...

  3. Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    原文:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...

  4. Centos6.9下RabbitMQ集群部署记录

    之前简单介绍了CentOS下单机部署RabbltMQ环境的操作记录,下面详细说下RabbitMQ集群知识,RabbitMQ是用erlang开发的,集群非常方便,因为erlang天生就是一门分布式语言, ...

  5. CentOS6.4下Mysql数据库的安装与配置

    原文连接:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 说到数据库,我们大多想到的是关系型数据库,比如 ...

  6. Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置(转)

    原文地址:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建 ...

  7. Linux学习之CentOS(一)--CentOS6.6下Mysql数据库的安装与配置

    在这里我是通过yum来进行mysql数据库的安装的,通过这种方式进行安装,可以将跟mysql相关的一些服务.jar包都给我们安装好,所以省去了很多不必要的麻烦!!! [root@larry ~]# c ...

  8. centos6.5下 hdp-2.4.2安装

    (1)准备工作 /usr/sbin/sestatus -v getenforce1./usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态SE ...

  9. Centos6.5下Oracle 11g R2安装过程

    1准备 CentOS-6.5-x86_64-bin-DVD1 linux_11gR2_database_1of2 linux_11gR2_database_2of2 VMware Workstatio ...

  10. CentOS6.2下fastDFS的完整安装和配置步骤

    centos6.2系统下安装配置FastDFS步骤: 1:安装libevent(libevent-2.0.16-stable) ##卸载系统自带libevent rpm -qa|grep libeve ...

随机推荐

  1. Java笔记(五)

    泛型:JDK1.5版本后出现的新特性.用于解决安全问题,是一个类型安全机制. 好处:将运行期间出现问题ClassCastException,转移到了编译时期.方便程序员解决问题,让运行时问题减少. 避 ...

  2. shiro加密简单实现

    1.添加shiro依赖 定义shiro的版本号 <shiro.ver>1.2.3</shiro.ver> 加入shiro的依赖 <dependency> <g ...

  3. C++之函数适配器--绑定器bind原理图解

    转自:http://www.cnblogs.com/xusd-null/p/3698969.html#3081606 本文解释了bind 是如何工作的.为了清晰,图中的语法作了一些简化(例如,省略函数 ...

  4. Spring3.3 整合 Hibernate3、MyBatis3.2 配置多数据源/动态切换数据源方法

    一.开篇 这里整合分别采用了Hibernate和MyBatis两大持久层框架,Hibernate主要完成增删改功能和一些单一的对象查询功能,MyBatis主要负责查询功能.所以在出来数据库方言的时候基 ...

  5. saltstack api安装使用

    Salt自然也是提供api的,使用api对自动化有极大的帮助,我们使用rest风格的api,当然大家都知道salt是python写的,那么自然也就提供了对应的api,但是并不建议使用,因为调用pyth ...

  6. Ubuntu下使用gcc编译c文件,未识别cos,sin

    Ubuntu下使用gcc编译c文件,虽然我调用了math.h的头文件,但是未识别cos,sin 报错:( fft.c ) /tmp/ccwXjD8C.o: In function `fft': fft ...

  7. Visual Studio Ultimate 2013 下载地址

    VS2013_RTM_ULT_CHS.iso 文件大小:2.87G 百度网盘下载地址: http://pan.baidu.com/s/1bn4gavX 微软官网下载地址: http://downloa ...

  8. 发送邮件小工具(python)

    #!/usr/bin/python # -*- coding:UTF- -*- import sys import smtplib import email.mime.multipart import ...

  9. OGNL和类型转换

    转载 JavaWeb -- Struts 数据传输:OGNL和类型转换 1. 数据传输:OGNL和类型转换 OGNL和struts2 OGNL:Object-Graph Navigation Lang ...

  10. lua基本语法

    1.注释--  ;  --[[    ]] 2.控制语句: if ..then ..   elseif..  then..  else.. end while.. do..end repeat ..u ...