iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >pgbouncer centos7.4 install
  • 541
分享到

pgbouncer centos7.4 install

2024-04-02 19:04:59 541人浏览 八月长安
摘要

编辑器原因 ‘-#’符号需要去掉‘-’ -# yum install -y deltarpm-# yum install -y openssl-devel zlib-devel readlinie-deve

编辑器原因 ‘-#’符号需要去掉‘-’

-# yum install -y deltarpm
-# yum install -y openssl-devel zlib-devel readlinie-devel GCc-c++ libevent-devel
-# ./configure --prefix=/opt/pgbouncer/1.8.1
-# make
-# make install

-# cd /opt/pgbouncer/1.8.1/
-# mkdir log etc run tmp
-# ls
bin etc log run share tmp
-#
-# cp share/doc/pgbouncer/pgbouncer.ini etc/
-# cp share/doc/pgbouncer/userlist.txt etc/
-#

-# vi /opt/pgbouncer/1.8.1/etc/pgbouncer.ini
-#### modify ####
[databases]
-#### total_pool_size = pool_size + reserve_pool_size ####
testdb = port=5432 dbname=testdb pool_size=2 user=testuser passWord=testuser

[pgbouncer]
logfile = /opt/pgbouncer/1.8.1/log/pgbouncer.log
pidfile = /opt/pgbouncer/1.8.1/run/pgbouncer.pid
listen_addr = 0.0.0.0
unix_Socket_dir = /opt/pgbouncer/1.8.1/tmp
auth_type = md5
auth_file = /opt/pgbouncer/1.8.1/etc/userlist.txt
admin_users = pgbadmin
pool_mode = transaction
server_reset_query = RESET ALL
server_reset_query_always = 1
ignore_startup_parameters = extra_float_digits
max_client_conn = 1000
default_pool_size = 2
min_pool_size = 1
reserve_pool_size = 1
pkt_buf = 8192
listen_backlog = 65535

-# vi /opt/pgbouncer/1.8.1/etc/userlist.txt

"pgbadmin" "pgbouncer"
"user01" "user01"

日志配置

-# vi pgbouncer
/opt/pgbouncer/1.8.1/log/pgbouncer.log
{
missinGok
nocompress
notifempty
sharedscripts
create 0640 postgres postgres
daily
rotate 10
postrotate
/bin/kill -HUP cat /opt/pgbouncer/1.8.1/run/pgbouncer.pid 2>/dev/null 2> /dev/null || true
endscript
}
-#

启动脚本

-# vi /usr/lib/systemd/system/pgbouncer.service
-##### file content start ####
-# It's not recommended to modify this file in-place, because it will be
-# overwritten during package upgrades. If you want to customize, the
-# best way is to create a file "/etc/systemd/system/pgbouncer.service",
-# containing
-# .include /lib/systemd/system/pgbouncer.service
-# ...make your changes here...
-# For more info about custom unit files, see
-# Http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F

[Unit]
Description=A lightweight connection pooler for postgresql
After=syslog.target
After=network.target

[Service]
Type=forking

User=postgres
Group=postgres

-# Path to the init file
Environment=BOUNCERCONF=/opt/pgbouncer/1.8.1/etc/pgbouncer.ini

PIDFile=/opt/pgbouncer/1.8.1/run/pgbouncer.pid

-# Where to send early-startup messages from the server
-# This is nORMally controlled by the global default set by systemd
-# StandardOutput=syslog

ExecStart=/opt/pgbouncer/1.8.1/bin/pgbouncer -d -q ${BOUNCERCONF}
ExecReload=/usr/bin/kill -HUP $MAINPID
KillSignal=SIGINT

-# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300

[Install]
WantedBy=multi-user.target
-##### content end ####

-# chmod +x /usr/lib/systemd/system/pgbouncer.service

您可能感兴趣的文档:

--结束END--

本文标题: pgbouncer centos7.4 install

本文链接: https://www.lsjlt.com/news/41812.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • centos7.4+mysql5.6+v
    # yum update # yum install gcc 用来编译python3.6源码 # yum install lrzsz 用来上传文件 3.1 下载mysql的repo源 # wget http:...
    99+
    2023-01-30
  • CentOS7.4 部署 Django
    安装环境 Remote: CentOS 7.4 x64 (django.example.com) Python: Python3.6.5 Apache: Apache 2.4.6 Mod_wsgi: 4.6.4 Django: Djang...
    99+
    2023-01-31
    Django
  • CentOS7.4如何手动安装MySQL5.7
    小编给大家分享一下CentOS7.4如何手动安装MySQL5.7,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!MySQL数据库应用广泛,尤其对于JAVA程序员,不会陌生。如果在不想采购云数...
    99+
    2024-04-02
  • centos7.4怎么开启mysql服务
    在centos7.4中开启mysql服务的方法启动命令[root@xufeng Desktop]# service mysqld startRedirecting to /bin/systemctl start mysqld.service...
    99+
    2024-04-02
  • python3.3 install
    首先下载源tar包  可利用linux自带下载工具wget下载,如下所示:# wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz  或自己去网上找,这里提供一个最新版的下...
    99+
    2023-01-31
    install
  • Pip install和Conda install如何使用
    这篇文章主要讲解了“Pip install和Conda install如何使用”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Pip install和Conda&...
    99+
    2023-07-05
  • 【Python】用 conda install 还是 pip install 好?
    文章目录 一、conda install二、pip install三、conda install 和 pip install 优先使用哪个? 一、conda install conda i...
    99+
    2023-08-31
    python conda pip
  • 如何在Centos7.4下部署mysql5.7.24
    这篇文章主要介绍“如何在Centos7.4下部署mysql5.7.24”,在日常操作中,相信很多人在如何在Centos7.4下部署mysql5.7.24问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操...
    99+
    2024-04-02
  • python install cx_Oracle
       1.安装python      linux 自带安装了python2.6.6   2.安装easy_install&nb...
    99+
    2024-04-02
  • python install selen
    selenium是一个web的自动化测试工具,和其它的自动化工具相比来说其最主要的特色是跨平台、跨浏览器。支持windows、linux、MAC,支持ie、ff、safari、opera、chrome等。此外还有一个特色是支持分布式测试用例...
    99+
    2023-01-31
    python install selen
  • pip install mysqlcli
    解决办法: 1. 在网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/  下载对应的whl文件,如我的环境是python3.7.2  windows32位版本,则下载 mysqlclient-1....
    99+
    2023-01-31
    pip install mysqlcli
  • python install param
    在服务器管理的时候,经常要用到paramiko这个模块。如果安装服务器上没有这个模块安装起来相当费劲。归其原因,是对于安装的步骤不正确,虽然pip会解决一些依赖库的问题,但是对于系统的依赖库,还是需要自己手动安装一下的。以下步骤完全在cen...
    99+
    2023-01-31
    python install param
  • Install Office Onlin
    通过安装 Office Online Server 使用户可以在 Exchange Outlook 网页版中查看和编辑受支持的文件附件,而无需先下载这些附件,也无需在本地安装相关程序。1.环境:三台服务器域:sen.hi.cn1)DC: S...
    99+
    2023-01-31
    Install Office Onlin
  • Mac os 上的apt-get install 就是brew install
    Mac os 上面不支持apt-get install ,但是有个 brew install可以代替。 Homebrew是Mac OS的包管理器,可以方便地安装各种需要的软件。 1.1 安装Homebrew 如果没有安装Homebrew,需...
    99+
    2023-09-14
    运维 服务器 macos
  • pip install browserc
    目录 pip install browsercookie报错问题 背景 第一次尝试 说明 第二次...
    99+
    2023-01-30
    pip install browserc
  • python install install cx_Oracle失败问题解决
    问题背景:在本地机安装失败,但在服务器上安装成功; 环境对比:两个机器的python版本不一致; 报错如下: PS C:\Users\Administrator\Downloads\***\****> pip install cx_Orac...
    99+
    2023-09-10
    python 开发语言
  • CentOS7.4环境下怎么用源码安装Mysql 5.7.26
    本篇内容主要讲解“CentOS7.4环境下怎么用源码安装Mysql 5.7.26”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS7.4环境下怎么用源码...
    99+
    2024-04-02
  • 【Python】python -m pip install 和 pip install 的区别
    文章目录 一、pip install二、python -m pip install三、两者的总结 一、pip install 当你使用 pip install 命令时,你正在使用 Py...
    99+
    2023-09-01
    python pip 人工智能 原力计划
  • CentOS7.4怎么用rpm包安装mysql5.7.17
    本篇内容介绍了“CentOS7.4怎么用rpm包安装mysql5.7.17”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,...
    99+
    2024-04-02
  • pip install MySQL-py
    本来很简单的东西,因为安装了mysql5.7执行以下几步1.wget  2.cd MySQL-python-1.2.3 3.yum -y install  python-devel  mysql-devel 4.mkdir -p /usr/...
    99+
    2023-01-31
    install pip py
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作