Centos7 PostgreSQL安装
来源:互联网 发布:php 命名空间 编辑:程序博客网 时间:2024/04/30 04:58
Linux安装PostgreSQL 9.4步骤
一、安装PostgreSQL CentOS 7 64bit
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm
二、执行安装命令
yum update
yum install postgresql94-server postgresql94-contrib
三、验证是否安装成功
rpm -aq| grep postgres
执行结果如下:
postgresql94-libs-9.4.2-1PGDG.rhel7.x86_64
postgresql94-server-9.4.2-1PGDG.rhel7.x86_64
postgresql94-9.4.2-1PGDG.rhel7.x86_64
postgresql94-contrib-9.4.2-1PGDG.rhel7.x86_64
四、初始化数据库
/usr/pgsql-9.4/bin/postgresql94-setup initdb
五、启动服务并设置为开机启动
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
六、开放防火墙端口
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
七、访问PostgreSQL
su - postgres
输出结果如下:
上一次登录:一 5月 18 15:17:29 CST 2015pts/0 上
-bash-4.2$
输入命令psql将看到PostgrSQL的版本信息。
psql (9.4.1)
输入 "help" 来获取帮助信息.
八、设置postgres用户密码
postgres=# \password postgres
九、停止和启动postgresql服务
service postgresql-9.4 start
service postgresql-9.4 stop
- CentOS7上安装PostgreSQL
- Centos7 PostgreSQL安装
- Centos7 PostgreSQL安装
- CentOS7下PostgreSQL安装
- Centos7 PostgreSQL安装
- Centos7 PostgreSQL安装
- centos7 安装postgresql-9.5
- CentOS7安装、配置PostgreSQL
- centos7源码安装postgresql
- centos7 安装PostgreSQL
- Centos7安装postgresql
- centos7安装postgresql和pgadmin
- CentOS7.2 安装postgresql数据库
- Centos7下安装postgresql-9.5
- CentOS7安装并配置PostgreSQL
- centos7安装postgresql后的初始化问题
- centos7下安装配置postgresql和phppgadmin
- CentOS7下安装PostgreSQL 9.4 与 phpPgAdmin
- android 2016进阶路线与愿景
- 升级至4K超高清12G-SDI接口时需要考虑的三件事
- validate针对checkbox、radio、select标签的验证
- VS2013 MFC里父对话框里通过按钮打开子对
- "俄罗斯雅虎”Rambler.ru被黑,近一亿密码被窃
- Centos7 PostgreSQL安装
- R语言培训-第二期
- 搞明白这八个问题,Linux系统就好学多了。
- php-MediaInfo
- Java的HashMap和HashTable
- java学习书籍
- 大数据
- EditText和PopWindow制作下拉框
- 算法(1)二分查找