linux32安装pgsql,Linux安装pgsql
作者QQ:67065435 QQ群:821635552
安装前的准备 yum install \
vim \
wget \
firewalld \
gcc \
gcc-c++ \
openssl-devel \
readline \
readline-devel \
zlib \
zlib-devel \
uuid-devel \
systemd-devel \
-y
安装PostGreSQL cd /home
wget https://ftp.postgresql.org/pub/source/v10.3/postgresql-10.3.tar.gz
tar -zxvf postgresql-10.3.tar.gz
cd postgresql-10.3
./configure \
--prefix=/usr/local/postgres/ \
--with-ossp-uuid \
--with-uuid=ossp \
--with-systemd \
--with-openssl \
make
make install
添加postgres用户并配置数据目录 mkdir /data/
mkdir /data/postgres/
useradd postgres
chown -R postgres:postgres /data/postgres/
chown -R postgres:postgres /usr/local/postgres/
chown -R postgres:postgres /home/postgresql-10.3/
配置启动防火墙 systemctl start firewalld
firewall-cmd --zone=public --add-port=5432/tcp --permanent
firewall-cmd --reload
修改环境变量 vim /etc/profile
export PGHOME=/usr/local/postgres
export PGDATA=/data/postgres
export PATH=$PATH:/usr/local/postgres/bin
ESC
:wq
source /etc/profile
初始化数据库 su postgres
/usr/local/postgres/bin/initdb -D /data/postgres
修改配置 su postgres
vim /data/postgres/pg_hba.conf
local all all trust
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust
host all all ::1/128 trust
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all 0.0.0.0/0 trust
host replication all ::1/128 trust
ESC
:wq
vim /data/postgres/postgresql.conf
listen_addresses = '*'
ESC
:wq
启动 su postgres
/usr/local/postgres/bin/pg_ctl -D /data/postgres -l logfile start
创建默认数据库及设置密码 su postgres
/usr/local/postgres/bin/createdb postgres
/usr/local/postgres/bin/psql postgres
# 已经进入了postgres控制台
\password
# 接下来输入密码
12345678
# 退出
\q
停止、启动、重启、重载 su postgres
/usr/local/postgres/bin/pg_ctl -D /data/postgres -l logfile stop
/usr/local/postgres/bin/pg_ctl -D /data/postgres -l logfile start
/usr/local/postgres/bin/pg_ctl -D /data/postgres -l logfile restart
/usr/local/postgres/bin/pg_ctl -D /data/postgres -l logfile reload
linux32安装pgsql,Linux安装pgsql相关推荐
- python2.7安装pytorch_Pytorch如何安装,Linux安装Pytorch,OSX安装Pytorch教程
Pytorch目前提供了Linux,Mac Os安装,官方提供了自定义安装方法,今天我们汇总一下Pytorch如何安装,Linux安装Pytorch,OSX安装Pytorch教程以及我们可以根据PIP ...
- p7za无root权限安装/7z linux安装
p7za无root权限安装/7z linux安装 最近在一个无root的服务器下载了超大的7z文件,结果解压的时候发现没有7za傻眼了,后面无root安装的时候还踩了几个坑,记录一下. 源码安装 首先 ...
- linux命令安装组件,Linux安装各种组件
[TOC] Linux安装各种组件 ============================= ## 安装JDK 官网下载最新JDK ``` http://www.oracle.com/technet ...
- linux 源码安装e1000e,linux安装网卡e1000e
在Intel网站直接下载的Linux驱动是e1000-5.2.52.tar.gz(版本可能会有改变),这个压缩包里面没有编译好的.o的文件,需要在Linux系统下编译之后才能使用, 因为网卡需要编译, ...
- linux 查看es安装目录,Linux安装Elasticsearch
本文介绍Linux环境如何安装Elasticsearch. 本文环境是在腾讯云服务器CentOS7.2搭建的,JDK1.8,elasticsearch-5.4.2. 1 安装JDK 网上教程很多,也可 ...
- python3.8.1安装教程-Linux安装Python3.8.1的教程详解
本例以Linux上安装Pyhton3.8版本为例进行说明 1.依赖包安装 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-dev ...
- python3下载安装配置-Linux 安装python3.7.3
我这里使用的是Redhat6.5,centos系统本身默认安装有python2.x,版本x根据不同版本系统有所不同,可通过 python --V 或 python --version 查看系统自带的p ...
- python3.7 6如何安装-深度linux安装Python3.7.6
深度linux安装Python3.7.6 注意:千万不要卸载或者强制卸载原来自带的python,具体原因请看度娘的介绍! 需要以下4步:1.下载 2.获取权限 3.安装 4 .运行测试 1.下载Pyt ...
- kalilinux安装qt_Kali Linux安装搜狗输入法(只需5步)
请注意,本文编写于 920 天前,最后修改于 448 天前,其中某些信息可能已经过时. 博主在上午使用整理硬盘数据时,不小心把以往的虚拟机都给删了,只好重装一个,又回归到最基本的系统配置问题 kali ...
- linux编译安装zabbix,Linux安装zabbix--CentOS7.3
Linux安装zabbix--CentOS7.3 背景: zabbix作为企业级的系统监控系统,它能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制,让系统管理员可以快速定位并解决存在 ...
最新文章
- Java虚拟机2:Java内存区域及对象
- 获取请求参数通用方式|| 中文乱码问题||请求转发
- [C++STL]常用遍历算法
- 类Unix系统下,vim各种模式之间的切换
- oracle学习笔记之 审计
- python 归一化_数据的标准化和归一化
- html——影响文档流属性详解
- CCF201604-1 折点计数(解法二)(100分)(废除!!!)
- C++中的萃取机制(traits)
- 多路复用器_多路复用、非阻塞、线程与协程
- 活久见: maven pom 竟然都会崩溃!
- PDMS二次开发应用案例——PipelineTool
- 我的数据库是半瓶子水的水平
- 第七篇 indicators(3)第三方指标库Ta-lib
- Linux平台基于poll实现网络编程IO多路复用
- php 1为false,false是1还是0
- web安全性测试用例
- TOS和DSCP总结
- Git基础(21):GitLab创建组、用户、项目
- 东师《近代物理实验》离线作业网考