centos7中通过源码安装postgresql13.6
下载地址:https://www.postgresql.org/ftp/source/
0.安装相关依赖库
centos依赖包下载地址:https://developer.aliyun.com/packageSearch
确保安装了pgsql需要的依赖包
rpm -q readline-devel zlib-devel
离线安装依赖包
rpm -Uvh --force --nodeps *.rpm
1.解压tar包
tar -zxvf postgresql-13.6.tar.gz -C /opt/
2.编译安装
cd /opt/postgresql-13.6/
# 安装目录
./configure --prefix=/usr/local/pgsql
make
make install
3.添加用户
adduser postgres
# 设置postgres用户密码
passwd postgres
4.创建数据库目录
mkdir -p /usr/local/pgsql/data
chown -R postgres:postgres /usr/local/pgsql/data
5.使用postgres用户进行下面操作
su - postgres
cd /usr/local/pgsql/bin/
# 初始化数据库默认数据
./initdb -D /usr/local/pgsql/data/
# 启动数据库服务(start,stop,restart,status)
./pg_ctl -D /usr/local/pgsql/data/ start
# 进入默认的postgres数据库
./psql postgres
# 创建一个新的数据库
./createdb test
# 进入数据库
./psql test
6.设置postgre用户密码
./psql
执行以下sql
alter user postgres password 'postgres';
centos7中通过源码安装postgresql13.6的更多相关文章
- 在centos6.7通过源码安装python3.6.7报错“zipimport.ZipImportError: can't decompress data; zlib not available”
在centos6.7通过源码安装python3.6.7报错: zipimport.ZipImportError: can't decompress data; zlib not available 从 ...
- 通过源码安装PostgresSQL
通过源码安装PostgresSQL 1.1 下载源码包环境: Centos6.8 64位 yum -y install bison flex readline-devel zlib-devel yum ...
- 在CentOS7(虚拟机)下通过源码安装Postgresql10以及基本配置
操作系统:CentOS7 安装文件:postgresql-10.0.tar.gz 系统环境:gcc.Python 1:源码安装 [postgres@localhost ~]# tar zxvf pos ...
- Ubuntu 14.04 卸载通过源码安装的库
cd cere-solvermkdir buildcd buildcmake ..sudo makesudo make install 卸载通过以上方式源码安装的库 再次进入buildsudo mak ...
- 【Git】CentOS7 通过源码安装Git
yum源仓库里的Git版本更新不及时,最新版的Git是1.8.3,但是官方的最新版早已经更新到2.9.5.想要安装最新版本Git,只能下载源码进行安装 建议最好更新git为较新版本,便于使用 1.查看 ...
- CentOS7通过源码安装nginx
需要先安装安装环境和库: yum install gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum i ...
- Centos7 linux下通过源码安装redis以及使用
下载redis安装包 wget http://download.redis.io/releases/redis-5.0.3.tar.gz 解压压缩包 tar -zxvf redis-.tar.gz y ...
- linux通过源码安装nodejs
1.下载nodejs源码,下载地址:https://nodejs.org/en/download/ 2.下载回来后,解压缩,ubuntu系统ctrl + alt +T 打开终端 假如tar.gz压缩包 ...
- 通过源码安装最新版Git
下载源码 到Git的Github主页上下载最新的源码到本地,解压并进入目录. 编译安装 cd 你的git源码目录 autoconf ./configure make 第一个报错 报错内容: usr/b ...
- Ubuntu 16.04通过源码安装QUEM虚拟机
下载编译安装: wget http://download.qemu-project.org/qemu-2.9.0.tar.xz tar xvJf qemu-2.9.0.tar.xz cd qemu-2 ...
随机推荐
- Java学习笔记-11
StringBuffer:是字符串缓冲区,是一个容器.长度是固定的,可以直接添加多个数据类型.最终回通过toString方法变成字符串. 容器具备的特点:存储,删除,获取,修改 存储操作: Strin ...
- 读后笔记 -- Python 全栈测试开发 Chapter11:Python + Requests 实现接口测试
11.1 Requests 框架 11.1.1 requests 请求 1. reqeusts 库 安装 pip install requests 2. requests 库 GET 方法,参数通过 ...
- JVM运行时内存区
JVM运行时内存区是如何划分的? 方法区(Method Area):存储类的字节码信息.常量池 堆区(Heap Area):存储对象 Java方法栈(Stack Area):所有方法运行时,会创建一 ...
- springboot thymeleaf常用标签
xmlns:th="http://www.w3.org/1999/xhtml" <tr th:each="user,i : ${list}" th:cla ...
- 在Mac的哪里可以找到bashrc文件
- vim 转换大小写
只转化某个单词 guw .gue gUw.gUe 这样,光标后面的单词便会进行大小写转换 想转换5个单词的命令如下: gu5w.gu5e gU5w.gU5e 转换几行的大小写 4.转换几行的大小写 将 ...
- Vulnhub 靶场 DARKHOLE: 2
Vulnhub 靶场 DARKHOLE: 2 前期准备 前期准备: 靶机地址:https://www.vulnhub.com/entry/darkhole-2,740/ kali攻击机ip:192.1 ...
- SVNKit操作SVN
系统集成SVN(SVNKit操作SVN) 网址:https://svnkit.com/documentation.html 文档:https://svnkit.com/javadoc/index.ht ...
- pyintaller 打包后报No module named 'XXX'
在pycharm中运行一切正常,但是使用pyinstaller打包之后,双击exe就提示缺乏某某module 百度一番之后,尝试了说hidden-import之类的,以及说只留一个主程序在最外层啥的, ...
- concat()函数
该函数可以将多个字符串连成一个字符串.使用语法concat(str1, str2, ...)返回结果参数拼接成的字符串,如果有任何一个参数为null,则返回值为null例子1.从person表查出数据 ...