pgbouncer的安装和配置
tar -zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable/
mkdir /home/pg10/libevent
./configure --prefix=/home/pg10/libevent
make & make install
tar -zxvf pgbouncer-1.7.2.tar.gz
cd pgbouncer-1.7.2
./configure --prefix=/home/pg10/pgbouncer/ --with-libevent=/home/pg10/libevent
make & make install
mkdir /var/log/pgbouncer
mkdir /var/run/pgbouncer
mkdir /etc/pgbouncer
cp /opt/soft_bak/pgbouncer-1.8.1/etc/pgbouncer.ini /etc/pgbouncer
cd /etc/pgbouncer
vi pgbouncer.ini
[databases]
postgres=host=10.110.13.172 port=5432 user=postgres dbname=postgres pool_size=100
[pgbouncer]
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
auth_file = /etc/pgbouncer/userlist.txt
auth_type = trust
listen_addr = 10.110.13.172
listen_port = 9999
pool_mode = transaction
admin_users = postgres
vi /etc/pgbouncer/userlist.txt
"postgres" "hytera1993"
chown -R pg10:pg10 /var/log/pgbouncer
chown -R pg10:pg10 /var/run/pgbouncer
chown -R pg10:pg10 /etc/pgbouncer
chmod 755 /var/log/pgbouncer
chmod 755 /var/run/pgbouncer
chmod 755 /etc/pgbouncer
su - pg10
vi .bash_profile
export PATH=/home/pg10/pgbouncer/bin:$PATH:.
source .bash_profile
pgbouncer -d /etc/pgbouncer/pgbouncer.ini --r
1、lsof -i:端口号
2、netstat -tunlp|grep 端口号
都可以查看指定端口被哪个进程占用的情况
pgbouncer的安装和配置的更多相关文章
- linux ---pgbouncer的安装和配置
pgbouncer是一款轻量级针对postgresql的数据库连接工具,可以对客户端的连接做限制,防止恶意连接,另外也可以减少数据库的实际连接数,从而减少数据库的开销. 环境: centos 6.5 ...
- JDK安装与配置
JDK安装与配置 一.下载 JDK是ORACLE提供免费下载使用的,官网地址:https://www.oracle.com/index.html 一般选择Java SE版本即可,企业版的选择Java ...
- Node.js 教程 01 - 简介、安装及配置
系列目录: Node.js 教程 01 - 简介.安装及配置 Node.js 教程 02 - 经典的Hello World Node.js 教程 03 - 创建HTTP服务器 Node.js 教程 0 ...
- 烂泥:redis3.2.3安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前一段时间写过一篇codis集群的文章,写那篇文章主要是因为当时的项目不支持redis自 ...
- mysql源码包手动安装、配置以及测试(亲测可行)
笔记编者:小波/qq463431476博客首页:http://www.cnblogs.com/xiaobo-Linux/ 记下这篇mysql笔记,望日后有用! redhat6采用centos yum源 ...
- 环境搭建系列-系统安装之centos 6.5安装与配置
按照国际惯例,系列目录先奉上: 系列一:系统安装之centos 6.5安装与配置 系列二:准备工作之Java环境安装 系列三:数据为先之MySQL读写集群搭建 系列四:谈分布式之RabbitMQ集群搭 ...
- ZooKeeper安装与配置
一. 单机安装.配置: 1. 下载zookeeper二进制安装包下载地址:http://apache.dataguru.cn/zookeeper/zookeeper-3.4.3/zookeeper-3 ...
- mac 下JDK 与 tomcat 的安装与配置
一.Mac下JDK的安装 1.先检测Mac是否已经安装过JDK,在终端中输入java 或者 javac 显示说明,表明已经安装过JDK,JDK版本查询终端键入java -version,终端会返回JD ...
- 烂泥:zabbix3.0安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 这个月又快过完了,最近也比较忙,没时间写文章,今天挤点时间把zabbix3.0安装与配置 ...
随机推荐
- spring-boot-starter-parent
在官方文档的第三部分的13块讲述了引用的管理,官方推荐的是使用Maven和Gradle. 我一直在用的是maven,而且使用maven有些优势–spring-boot-starter-parent,这 ...
- java多线程系列 JUC锁01 框架
转载 http://www.cnblogs.com/skywang12345/p/3496098.html 参考 https://www.cnblogs.com/leesf456/p/5453091. ...
- HTML5/CSS3淡入淡出滑块焦点图
在线演示 本地下载
- PostgreSQL与Oracle对应的函数
一.对应的函数 1.sysdate oracle pgsql sysdate current_date. current_timestamp nvl coalesce trunc date_trun ...
- SpringBoot_Exception_01_No plugin found for prefix 'spring-boto' in the current project
一.异常现象 spingbott项目在eclipse中执行maven命令:spring-boot:run, 出现异常: No plugin found for prefix 'spring-boto' ...
- LNMP安装(一)
前传: 环境介绍: Centos7.2-minimal 下载地址:http://mirrors.163.com/centos/7.2.1511/isos/x86_64/ (网易镜像站) 所需安装包:链 ...
- jquery新添加元素无法删除
$("body").on('click',".delic",function(){ $(this).parent().remove(); })
- SoundHound Inc. Programming Contest 2018
A - F Time Limit: 2 sec / Memory Limit: 1024 MB Score : 100100 points Problem Statement You are give ...
- 「P4994」「洛谷11月月赛」 终于结束的起点(枚举
题目背景 终于结束的起点终于写下句点终于我们告别终于我们又回到原点…… 一个个 OIer 的竞赛生涯总是从一场 NOIp 开始,大多也在一场 NOIp 中结束,好似一次次轮回在不断上演.如果这次 NO ...
- CodeForces - 434D Nanami's Power Plant
Codeforces - 434D 题目大意: 给定一个长为n的序列,序列中的第i为上的值\(x_i\),序列第i位上的值\(x_i\in[l_i,r_i]\),价值为\(f_i(x_i)\),其中\ ...