Ubuntu postgres 内网 安装 卸载
# 安装pg,(使用安装包, 不能连接外网)
tar包下载地址 https://www.postgresql.org/ftp/source/v11.1/
放在/home/sxy 目录(随便放)
cd /home/sxy
tar xvzf postg*tar.gz
cd postg*
mkdir /usr/local/pgsql # 安装目录
./configure --prefix=/usr/local/pgsql # 设置配置环境
Ubuntu 16.04报错(联网解决): (cent os 7 没有安装过)
configure: error: readline library not found
解决办法:sudo apt-get install libreadline6-dev
可能其他错误:
configure: error: zlib library not found
apt-get install zlib1g-dev
configure: configure: error: no acceptable C compiler found in $PATH
apt-get install gcc
./configure --prefix=/usr/local/pgsql # 再次配置环境
make && make install # 编译并安装, 出错会退出 (具体问题再baidu)
提示: Postgresql installation complete # 表示安装成功
ls -l /usr/local/pgsql/ # 会有4个目录(bin, include, lib 和 share) # 也说明安装成功
rm -rf /home/sxy/postg*
启动:
root 用户不能启动postgresql # (连接的时候会提示失败)原因baidu
修改密码:
passwd postgres # Ubuntu pg11默认安装了postgres 用户
mkdir -p /var/postgresql/data # 经常变动
初始化:
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/
touch /var/postgresql/logfile
chown postgres:postgres /var/postgresql/*
chown postgres:postgres /usr/local/pgsql/*
chmod -R 0700 /var/postgresql/*
修改配置文件:
vim /var/postgresql/data/postgresql.conf
listen_addresses = '*'
port = 5432
max_connections = 2000 # 改大点, 但用的时候还是要创建连接池
vim /var/postgresql/data/pg_hba.conf
添加:
host all all 0.0.0.0/0 md5
# (留下local)其他全注释
修改密码:
passwd postgres
su postgres
/usr/local/pgsql/bin/pg_ctl -D /var/postgresql/data/ -l logfile restart/start/stop # 启动数据库
/usr/local/pgsql/bin/psql -h ip # 本地连接数据库
# 卸载老版本
后补
Ubuntu postgres 内网 安装 卸载的更多相关文章
- CentOS 7 Redis 内网 安装 卸载
# 不能连接外网, 安装Redis服务器的过程 https://redis.io/download (官网下载安装包, 最新版) redis-*.tar.gz 放在安装目录/usr/local/red ...
- Linux anaconda 内网 安装 卸载
安装并不难, 官网介绍的很清楚, 但每次到官网找安装方法不方便,我总结了本文(很全) 官网下载Linux版anaconda, 地址https://www.anaconda.com/download/# ...
- Ubuntu更改源和搜狗输入法安装卸载
安装完Ubuntu 16.04后,要更换为国内的软件源: sudo gedit /etc/apt/sources.list #用文本编辑器打开源列表 在文件开头添加下面的阿里云的软件源: deb ...
- Microsonf visual c++ 14+ 离线内网安装
内网离线安装方法:先下载官方的visualcppbuildtools: <br href=http://go.microsoft.com/fwlink/?LinkId=691126 >& ...
- 内网安装python第三方包
内网快速安装python第三方包 内网安装包是一个很麻烦的问题,很多时候,内网的源会出现问题,导致无法安装. 这里给出一种快速在内网中安装第三方包,无需使用内网的源. 外网操作 1.根据开发环境下的所 ...
- k8s内网安装部署(二)
续上篇 https://www.cnblogs.com/wangql/p/13397034.html 一.kubeadm安装 1.kube-proxy开启ipvs的前置条件 modprobe br_n ...
- 内网安装ubuntu包
到http://packages.ubuntu.com搜索包下载下来, 再安装.
- redhat 7.2 内网安装docker
本文介绍在内网环境下如果通过网络代理映射来完成docekr的安装,首先在能上网的windows机器上安装squid,并启动,本实例中windows机器IP为 192.168.192.101 ,squi ...
- ubuntu lamnp 环境的安装/卸载 及 配置
安装mysql--------------------------------------sudo apt install mysql-server #5.7版本 安装php----------- ...
随机推荐
- SpringBoot Web开发(4) Thymeleaf模板与freemaker
SpringBoot Web开发(4) Thymeleaf模板与freemaker 一.模板引擎 常用得模板引擎有JSP.Velocity.Freemarker.Thymeleaf SpringBoo ...
- 1131(★、※)Subway Map
思路:DFS遍历 #include <iostream> #include <map> #include <vector> #include <cstdio& ...
- 《企业IT架构转型之道》读书笔记
1 出发点:企业IT系统建设普遍面临的问题和处境 很多企业面临的问题和处境: 『烟囱式』系统建设模式. 当业务部门提出业务需求,信息中心部门进行系统集成商的招投标,再进入到需求收集.需求分析.开发.测 ...
- Python Day5 模块 包
一:区分Python文件的2种用途 1个Python文件的2种用途 1.1 当作脚本执行: if __name__ == '__main__': 1.2 当作模块导入使用 if ...
- 从神经网络到卷积神经网络(CNN)
我们知道神经网络的结构是这样的: 那卷积神经网络跟它是什么关系呢?其实卷积神经网络依旧是层级网络,只是层的功能和形式做了变化,可以说是传统神经网络的一个改进.比如下图中就多了许多传统神经网络没有的层次 ...
- iOS开发SDWebImageOptions理解
iOS开发SDWebImageOptions理解 原文 http://www.cnblogs.com/WJJ-Dream/p/5816750.html typedef NS_OPTIONS(NSUIn ...
- 1732157 - Collecting diagnosis information for SAP HANA [VIDEO]
Symptom SAP Support asked you to provide a collection of the relevant diagnosis files (also known as ...
- json字符串装List<Object>
List<SearchParam> ts = (List<SearchParam>) JSONArray.parseArray(jsonStr, SearchParam.cla ...
- python读取excel表
from xlrd import open_workbookimport re #创建一个用于读取sheet的生成器,依次生成每行数据,row_count 用于指定读取多少行, col_count 指 ...
- CSS: Grid homework redact.
The web homework: Finished design: (I use six block with different color to show this homework and I ...