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安装与配置 ...
随机推荐
- Android 普通okhttp、okhttp utils执行 post get请求,文件上传下载、请求图片
public class OKHttpActivity extends Activity implements View.OnClickListener { public static final M ...
- java.sql.SQLException: Illegal connection port value '3306:success'
严重: Servlet.service() for servlet jsp threw exceptionjava.sql.SQLException: Illegal connection port ...
- Eclipse for PHP Developers使用笔记
1 修改字体样式:Window-->Preference-->General-->Appearance-->Basic-->text font-->edit
- python处理txt文件的一种情况
在txt文本中,以换行符作为标记分段处理txt文件中的内容的方法: with open(path, 'r', encoding='utf-8') as f: for line in f: if lin ...
- 51nod_1236_序列求和 V3 _组合数学
51nod_1236_序列求和 V3 _组合数学 Fib(n)表示斐波那契数列的第n项,Fib(n) = Fib(n-1) + Fib(n-2).Fib(0) = 0, Fib(1) = 1. (1, ...
- 「NOIP2016」「P1850」 换教室(期望dp
题目描述 对于刚上大学的牛牛来说,他面临的第一个问题是如何根据实际情况申请合适的课程. 在可以选择的课程中,有 2n2n 节课程安排在 nn 个时间段上.在第 ii(1 \leq i \leq n1≤ ...
- bzoj 4503 两个串 快速傅里叶变换FFT
题目大意: 给定两个\((length \leq 10^5)\)的字符串,问第二个串在第一个串中出现了多少次.并且第二个串中含有单字符通配符. 题解: 首先我们从kmp的角度去考虑 这道题从字符串数据 ...
- 乱写的一个SQL框架
闲来没事,看了mybatis的实现形式,就心血来潮的自己弄了一个仿照mybatis的框架,性能肯定不好,而且有很多问题,但是是一次有益的尝试 1.基本配置文件 <!--加载数据源--> & ...
- Poj_1005_I Think I Need A HouseBoat
一.Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In ...
- Session与Cookie(1)
Session session是一种位于服务端,用于存储一个会话(指打开浏览器访问某个域名,及其下面的资源,然后关掉浏览器的过程)中所需的配置信息.也就是在一个会话中,只存在一个session.对于J ...