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 Studio第一次启动失败的解决办法
Android Studio Android 开发环境 由于GFW的问题,安装后第一次启动会在显示Fetching android sdk component information对话框后,提示错误 ...
- ActivemMQ之消息服务器平台(发邮件)
消息服务平台 处理公司内部各种消息业务 比如 发送邮件 发送短信 微信推送 接口有两种类型 异步 同步 同步需求: 当调用消息服务平台,需要返回消息服务平台调用第三方平台接口是否成功 异步需求: ...
- MyBatis映射文件中用#和$传递参数的特点
在MyBatis映射文件中用#和$传递参数的特点, #是以占位符的形式来传递对应变量的参数值的,框架会对传入的参数做预编译的动作, 用$时会将传入的变量的参数值原样的传递过去,并且用$传递传递参数的时 ...
- Centos7配置https,及多个https配置
Centos7.2配置https,及多个https配置 1.单个https配置 检查相关依赖,如果没有就yum安装 yum install mod_ssl openssl rpm -qa| grep ...
- hdu-2874 Connections between cities(lca+tarjan+并查集)
题目链接: Connections between cities Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/327 ...
- C语言中mktime函数功能及用法
今天联系写一个日历的程序,需要算出月份中的第一天是星期几,用到了mktime()这个函数,感觉这个函数挺有用的,分享给大家. 原型:time_t mktime(struct tm *) 其中的tm结构 ...
- 解决 maps to localhost, but this does not map back to the address
修改 /etc/ssh/ssh_config vim /etc/ssh/ssh_config GSSAPIAuthentication no
- HihoCoder1672 : 区间问题([Offer收割]编程练习赛41)(贪心)
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定N个区间[Ai, Bi],请你找到包含元素最少的整数集合S,使得每个区间都至少有两个整数在S中. 例如给定三个区间[1 ...
- Can't load AMD 64-bit .dll on a IA 32-bit platform错误
将tomcat的bin目录下的tcnative-1.dll文件删除.就可以了.
- LuoguP1419 寻找段落(二分 单调队列
题目描述 给定一个长度为n的序列a_i,定义a[i]为第i个元素的价值.现在需要找出序列中最有价值的“段落”.段落的定义是长度在[S,T]之间的连续序列.最有价值段落是指平均值最大的段落, 段落的平均 ...